Failure to Communicate – FOMOphobia 1

Hey, let’s build a level-shifter! As I described earlier, the RPi serial ports operate at a measly 3.3v while the rest of the serial RS232 world is throwing around 5v and more.  So I built a little device to shift the 3.3v to 5v.

to5[4]

This came from some anonymous internets genius and works like this:

When input is 0V,Q1 is OFF and Q1’s collector will be 5V,then Q2 will be ON, and Q2’s collector is at 0V (as Vce of Q2=0). When input is 3.3V,Q1 is ON and Q1’s collector will be 0V(as Vce of Q1=0),then Q2 will be OFF, and Q2’s collector is at 5V. It’s simple two NOT gates combined. :D

There you go. Now you understand.

So I breadboarded one up. I don’t have a large collection of transistors. In fact I have two rattling around in my kit. It seemed like magic that the two I had were the two I needed. Or maybe they are just common transistors. P2N2222A?

IMG_1895

I tested the output and was surprised to find that the output which should be between 0-5v depending on what was output on the TX line of the serial port, seemed to always be High at 5v. Did I mess it up? I tested the incoming 3.3v TX line, and it was always High too. Why was that? Research, research. Apparently, the RPi TX serial line is normally high. Okay. I can see the line voltage drop when I send characters to the port. Is that right?

Oh and I had messed up some RPi boot options where you had to wrest the serial line away from the system which wanted to use it as a system console. I fixed that.

I hooked the output of my level-shifter to the Betabrites.  Guess what?!

It still didn’t work.

I guess I will just have to wait until I get my little MAX2323 device in the mail.

One comment on “Failure to Communicate – FOMOphobia

  1. Reply James Nov 11,2013 2:20 pm

    Voltage high is data=0 and voltage low is data=1 for RS232. There was probably a good reason for that but I have forgotten it :-) Not that you are using any of them, but the RS232 handshake lines are reverse. Just put that in the back of your brain for when you have use CTS/RTS pins for something (old Atmel boot loaders for instance)

Leave a Reply