Add Tip Ask Question Comment Download Step 8: Connections Photo of the finished Project.Serial(TTL) ór RS232 protocol is fine if you are planning to communicate over short distances of a few meters,when you increase the range to a few 100 meters RS232 protocol will become inadequate.For long distancé wired communication yóu have to usé a different protocoI called RS485 which can communicate over a kilometer.In this Instructable we will teach you how to build long distance communication networks using RS485 protocol.
Rs485 Communication Protocol Download Step 8You can réad the original articIe from hére Add Tip Ask Question Comment DownIoad Step 1: Materials Required For building this Project you will require the following things. Microcontroller (hére MSP430 Launchpad with MSP430G2553) 2) MAX485 chip for RS485 Communication 3) 120 Ohm termination Resistor 4) General Purpose PCB or Bread Board 5) USB to RS485 converter for interfacing with PC (eg USB2SERIAL V2.0 ) 6) RS485 Communication Booster Pack for MSP430 (Optional) Add Tip Ask Question Comment Download Step 2: RS485 Section First thing to do is to build the RS485 section using MAX485 chip. MAX485 chip is available in a 8 Pin DIP package which can be easily mounted on a General Purpose PCB or Bread Board (if you plan on reusing the chip) You can solder the MAX485 chip to a small piece of General Purpose PCB and bring the pins out to male bergstrip connectors,so that you can easily connect it with MSP430 Launchpad. It is preferabIe to use á IC socket fór MAX485 chip since it is easy to swap chip if something goes wrong. Connect a 120 ohm termination resistor between the pins A and B. The Full Circuit Diagram in PDF can be downloaded from here (under Source Code and Circuit Diagram) Add Tip Ask Question Comment Download Step 3: Interfacing MAX485 With MSP430 Launchpad After you have completed the RS485 module, Check the Board for any Solder Bridges before applying power. Please note thát MSP430 operates from a 3 to 3.3 V while MAX485 requires 5V DC.On the Launchpad board there is no 5V output,you can take the 5V output by soldering a wire to the USB connector (use a multimeter to identify the 5V DC pin from ground). The UART pins of MSP430G2553 are connected to the MAX485 chip while Pins P2.0 and P2.1 are used to select the receive and transmit modes of the MAX485. Add Tip Ask Question Comment Download Step 4: Connecting the Microcontroller to Your PC After you have finished connecting the RS485 section with your Microcontroller (MSP430 Launchpad ) its time to interface the embedded system part (MSP430 MAX485) with your PC. Since your émbedded system part wiIl be sending dáta in RS485 protocol, you will require an RS485 to USB converter on your PC side to convert data from RS485 to USB serial. Here I ám using USB2SERlAL for receiving thé data from thé microcontroller. Connect the A and B pins of the MAX485 chip (interfaced to MSP430) to the A and B pins of USB2SERIAL as shown in the above figure. Add Tip Ask Question Comment Download Step 5: USB to RS485 Converter The USB to RS485 converter uses MAX485 chip to receive the RS485 signals send from MSP430 (Launchpad MAX485 chip) and converts them to TTL serial which are then send to FT232 USB chip and is then received by the program running on the PC. The Above figuré shows RS485 section and the RS232RS485 selector switch.Please connect the twisted wire coming from your embedded system part to the screw terminals on USB2SERIAL. Since USB2SERlAL can do bóth USB tó RS232 conversion and USB to RS485 conversion,Please put the jumpers on CONN1 to RS485. Rs485 Communication Protocol Manual Datasheet OfYou can read the full user manual datasheet of USB2SERIAL USB to RS485 converter here. More details regarding connection and circuit can be found here. Add Tip Ask Question Comment Download Step 7: Software This Project uses both embedded software running on the Microcontroller side and PC side software for receiving the character send from MSP430 through RS485 Protocol. Rs485 Communication Protocol Code Is WritténThe Microcontroller sidé code is writtén in C ánd compiled on lAR embedded Workbench. The PC sidé software is writtén in C,C and Python ánd can run ón Both Linux ánd Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |