I have been having this issue for the past few days. I talking my first dive in to electronic’s since a few kits as a teenager. Hopefully I am missing some small here.
I have a TP-Link mr3040 (3.3v) with a serial connection to the arduino uno. Common ground, the 3.3v on the LV side RX to TX to the HV on the arduino side.
My problem is I can only recieve data (on pin’s 1 & 2) , I simply can not send any data on the pin’s no matter what baud rate I use! The sketch works 100% :shock: only if I attached the /dev/ttyUSBx device directly as aposed to using the 3.3v serial pins with the level converter.
void setup()
{
// start serial port at 9600 bps:
Serial.begin(9600);
Serial.print(1);
pinMode(ledPin, OUTPUT);
}
void loop()
{
// if we get a valid byte, read analog ins:
if (Serial.available() > 0) {
// get incoming byte:
inByte = Serial.read();
digitalWrite(ledPin, HIGH);
delay(10);
Serial.print("Got: ");
Serial.println(inByte);
digitalWrite(ledPin, LOW);
}
}
Are you sure you cannot get anything on the TP-LINK rx end? Like physically. Probe it with an oscilloscope or drive the pin high and then read the output. Make sure you level converter has the correct connections to it. Could you post a schematic? Hand drawn works.
Wait! Going from low voltage to high voltage doesn’t work like that. All of the current will drain through the 10k to ground. No voltage will be seen on the top side.Instead use a transistor, like the [Logic Level Converter.](http://www.sparkfun.com/products/8745)
pots:
I have a TP-Link mr3040 (3.3v) with a serial connection to the arduino uno. Common ground, the 3.3v on the LV side RX to TX to the HV on the arduino side.
Look again… He’s connecting 5vdc Arduino TX to a 3.3vdc RX. All you need is a voltage divider…
…I’m sorry I cannot read. Long day… I thought you were trying to hook up the TP-LINK RX to the middle of the two 10k’s with the arduino rx on one end and ground on the other. Wow now I feel stupid.
I am using one of these Sparkfun logic level converters: http://www.sparkfun.com/products/8745 between the TP-Link and the Arduino, as I said a common ground and RX to TX on both sides. I will put a diagram together this evening.
Are you saying on the TX all I need is a voltage divider?
The level converter has (2x) voltage dividers on it so if you ever need a converter to go from HV to LV that’s all there is to it.
I still don’t really know what a TP-Link is, except that it’s a router. I’m not sure how you are tapping into a 3.3v serial line with that…
Supposedly the voltage divider on the level shifter uses two equal values (I’m not sure SF fixed this in current releases of the board). So if you put in 5vdc you will get 2.5vdc out of the shifter. For some circuits this is not enough to get up passed the logic ‘1’ threshold. (some will work, some won’t) Take a look at the first comment under the level converter page…
I ran the LV side through my multimeter and can confirm that the LV is 2.5v. I guess this explains why the exact same converter works on my Linksys WRT54GL and not on the less tolerant TP-LINK.
As I said I am fairly novice, what would be recommended to bump these voltages up closer to the 3.3v the router expects?
Ok now I am following what you are saying… That would mean a 10G ohm (Yes, 10,000,000,000 ohm resistor) in parallel to the current 10K RX-0 to GND resistor. A 5G resistor would also be very very close, but those run for about $5 on Digikey… Where at that point it is more worth it replacing the 10k on board with another 20k resistor.