Voltage divider

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.

All of those will work at low Baud rates, but at higher Baud rates, the higher resistance values may not.

This is primarily because of small capacitors in the components and wiring that are being charged. I generally use values in the 1-5K Ohm range.

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.

You are correct, the current draw or current capacity of the driver chip must be taken into account.

5V/660 ohms is 7.6mA (plus input pin current).

5V/3k ohms is 1.67mA (plus input pin current).

Etc.

The input pin also requires a minimum amount of current.

5V/30k ohms is 0.167mA (plus input current). There may be enough current for the input pin to read a high level.

On top of that you will need to take into account the tolerance of the resistors. A level shifter chip would be a guaranteed way to make this work.

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.

You are making a system.

Thanks for replies. So its always better to go for lowest resistance in case of voltage divider for tx/rx pins.

Well, you don't want the resistance so low that it puts an undue load on the TX line...

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).

And indeed a proper level shifter is best.

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! :astonished:

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.

@MarkT checking with scope good idea will do on weekend!