To estimate voltage divider’s resistors do i need to know whats the peak current on tx pin of arduino during data transfer?
I build few voltage dividers 5/3.3v based on 220/440ohm,1/2kohm,10/20kohm and all are working reducing voltage from 5 to 3.3. I am sure using only formula isnt right way to choose resistors there should be another step of choosing resistor value based on current too.
Thanks for reply. But shouldnt be there any rule to follow based on speed or current ratings? Now im ok but in future dont wanna build something even small as divider based on trial and fail method.
But shouldnt be there any rule to follow based on speed or current ratings?
There is no simple rule, because you have to take into account the properties of the relevant components in the sending device, receiving device and wiring all at once.
Indeed all values will work to bring down the voltage - it's the current that's different, so it depends on the application what you need.
For a TX line, the current will be nearly zero most of the time as the other end is an input - high impedance - so ideally doesn't draw any current. In reality it does of course (albeit pretty much negligible).
More important is the stray capacitance of the connecting wires, or the amount of charge that has to be transferred onto the wire to give it the desired potential. Longer wires have higher capacitance so need more charge, and to get that to the wire fast enough you need more current, so smaller resistors in your voltage divider.
I prefer to keep values as high as possible to reduce current on the output. For a Serial signal a total of about 5k sounds good. You may need smaller resistors if you want to go to really high speeds (1 Mb or so).
wvmarle:
Longer wires have higher capacitance so need more charge, and to get that to the wire fast enough you need more current, so smaller resistors in your voltage divider.
Actually, no!
Why? Because you do not put the resistors before the long wires, but at the receiving end.
In addition, this means that any noise that is picked up on the transmission lines, is attenuated.
surepic:
Thanks for reply. But shouldnt be there any rule to follow based on speed or current ratings? Now im ok but in future dont wanna build something even small as divider based on trial and fail method.
Look at the signal on a scope (x10 probe) and see if the transitions are fast enough, if not reduce the
resistance. This allows for the circuit capacitance with a safety margin (due to the probe's capacitance).
BTW never use a x1 probe on a logic circuit, always set to x10 so you don't get issues with reflections along the
cable, and don't add too much capacitance.