Serial RS232 Connection

1Set up the Raspberry Pi
2Electrical Connection of Sensores and Actuators
2.1AD Converters connected via SPI
2.2Relay on GPIO via Opto-Coupler
2.3PWM Control of Ventilation via i2c
2.4OneWire Temperature Sensor
2.5Ultra-sonic Distrance Measurement
2.6Serial RS232 connection
Hacking a serial RS232 connection
2.7Stepper Motor Control
3Heating Control
4Ventilation Control (Paul Lüftung, Thermos 200)
5 z-wave


2.6 Serial Interface

Raspberry_Serial.png

Since Raspberry Pi outputs work at 3V, but the Paul Ventilation panel uses 12V, a level shifter is required. To keep things simple, I ordered a pre-assembled MAX3232 chip via internet and glued it on my PCB.

To use the serial interface of the RaspberryPi you have to add yourself to the dialout group (and, if the web interface will need access later, the www-data too)
sudo nano /etc/group
And than open
sudo nano /etc/inittab
and commend out the line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
and in
sudo nano /boot/cmdline.txt
search
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
and delete any reference to ttyAMA0 to gain
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

How to utilize minicom and the wiringPi library to talk RS232, I show in hacking RS232.

Login
Valid HTML 4.01!