Difference between revisions of "RS485/GPIO Shield for Raspberry Pi V2.0"
Qian.zhang (talk | contribs) (Created page with "== Introduction == This is a shield to add a RS485 level shift to the UART of Raspberry Pi. Moreover, it also breakout the rest headers for easy access. The level of RX,TX i...") |
Qian.zhang (talk | contribs) (→Introduction) |
||
Line 2: | Line 2: | ||
This is a shield to add a RS485 level shift to the UART of Raspberry Pi. Moreover, it also breakout the rest headers for easy access. | This is a shield to add a RS485 level shift to the UART of Raspberry Pi. Moreover, it also breakout the rest headers for easy access. | ||
− | |||
− | |||
[[File:RS485 for RPi_1.jpg]] | [[File:RS485 for RPi_1.jpg]] | ||
Line 10: | Line 8: | ||
[[File:RS485 for RPi_3.jpg]] | [[File:RS485 for RPi_3.jpg]] | ||
+ | |||
+ | == Schematics == | ||
+ | |||
+ | |||
+ | == Usage == | ||
+ | |||
+ | The UART on Raspberry Pi is on P1 and shown below: | ||
+ | |||
+ | [[File:RPI UART.png]] | ||
+ | |||
+ | The UART is /dev/ttyAMAO, it defaults to output system log. But if user wants to use this UART to connect to other modules through UART, for example, GPS module, we need to change the configuration. | ||
+ | |||
+ | The detailed steps are as following: | ||
+ | |||
+ | We need to modify two files: /boot/cmdline.txt and /etc/inittab. | ||
+ | |||
+ | Modify /boot/cmdline.txt: | ||
+ | |||
+ | Replace the original content: | ||
+ | |||
+ | dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait | ||
+ | |||
+ | With: | ||
+ | |||
+ | dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait | ||
+ | |||
+ | |||
+ | Modify /etc/inittab: | ||
+ | |||
+ | Comment out the last line of /etc/inittab. To comment out, it simply addess a '#'. | ||
+ | |||
+ | |||
+ | |||
+ | $ sudo vi /etc/inittab | ||
+ | #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 | ||
+ | |||
+ | Save the changes, and reboot. We will get an UART with baud rate of 115200. | ||
+ | |||
+ | == Resources == | ||
+ | |||
+ | *[http://learn.linksprite.com/raspberry-pi/shield/user-tips-of-rs485-shield-for-rpi/ User Guide of RS485 Shield for Raspberry Pi] |
Revision as of 07:26, 16 September 2014
Contents
Introduction
This is a shield to add a RS485 level shift to the UART of Raspberry Pi. Moreover, it also breakout the rest headers for easy access.
Schematics
Usage
The UART on Raspberry Pi is on P1 and shown below:
The UART is /dev/ttyAMAO, it defaults to output system log. But if user wants to use this UART to connect to other modules through UART, for example, GPS module, we need to change the configuration.
The detailed steps are as following:
We need to modify two files: /boot/cmdline.txt and /etc/inittab.
Modify /boot/cmdline.txt:
Replace the original content:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
With:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Modify /etc/inittab:
Comment out the last line of /etc/inittab. To comment out, it simply addess a '#'.
$ sudo vi /etc/inittab
- T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Save the changes, and reboot. We will get an UART with baud rate of 115200.