Sunday, February 10, 2013

Early morning soldering fixed the Raspberry Pi Header

07:30 in the morning

Me and my five year old girl is out in the shed soldering. And I fixed the voltage divider on the new Arduino board. Then we ran back to the computer inside (since it is so cold) and tested it!

The problem with the header the other day was that I reversed the resistors in the voltage divider. According to the voltage divider calculator that would give the RPi RX pin a Vout of 1.667V instead of the 3.3 V it wants, I guess it goes into hysterises and cannot decide if its HIGH or LOW. 

I replaced one of the resistors (R2) with double the size of R1. That will give a Vout of 3.33 V. 

And tested it and it works, I have serial communication and can program the Arduino board from the RPi!

Beautiful isn´t it! The Arduino is programmed from the GPIO serial port on the Raspberry Pi
This means that I do not need a special shield to do it and no need for a breadboard circuit either

Issue 1 No protection on the RPi TX pin

I cannot program it from the PC and have it attached to the RPi at the same time, since the USB to serial programmer would put 5 V on the unprotected TX port of the RPi. I have soldered a 1K Ohm resistor just in case but cannot guarantee it will work.

Issue 2. No reset button

Now I can program the Arduino directly from the GPIO serial port by connecting the Raspberry Pi and Arduino board with the 26 pin flat cable. The only issue is that I do not have auto-reset and no reset button, I have to connect a wire from the GND on the arduino and touch reset pin on the arduino at the right moment for it to reset. That is the moment right after the compiling is done.

I´m going to order a couple of these and solder a proper reset button

No comments:

Post a Comment