Greetings everybody,
Recently I bought a very inexpensive USB to RS232 adapter cable, mostly because it was less than 4 bucks, compared to other boards like the one sparkfun sells, this is almost nothing. So I figured I couldn't do anything wrong buying it.
When it arrived, I just hooked it up directly to Pins 0&1, but all I got was inverted bits being sent from my PC to the Netduino, nothing else. After some research I learned about inverted logic, which explained the bits being inverted. Also, the 3.3V from my Netduinos Tx didn't seem to be enough to be noticed at all.
There are some ICs out there doing this exact thing, but why buy one for 2 bucks if you can have one for almost free with materials you most likely already have:
Since I only needed to invert the signals, and amplify the Signal coming from my Netduino, I experimented with the most simple inverter possible, only using a transistor, and two resistors. Unexpectedly, it worked both ways on the first attempt, even at high BAUDs.
This first attempt was very messy, so I decided to solder it on a small PCB. I managed to have it about the size of a thumbnail, using only two SOT23 npn transistors and 4 4.7k resistors:
If anyone wants one as well, here is the schematic:
You can use any npn transitsor, the value of the resistors isn't crucial as well, I used 4.7k for all of them. All GPIOS are 5V tolerant, so your Netduino should be totally fine, if you want to be on the safe side, you can just add a 9k resistor across the collector and emitter of the transistor on the right, limiting the maximum output voltage to 3.3V.
Here's another image of the complete assembly:
I hope some of you might find this useful.
Greetings,
Martin