_koen
Posts: 2
Joined: Thu Jul 21, 2016 6:34 am

5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 6:37 am

Hello,

I've bought a Pi Breadboard kit. In this kit 10K resistors and 560R resistors. Now I have a module that sends with 5V. I've read this needs to be converted to 3.3V to be safe.

But can I achieve this with these resistors ?

Thanks a lot !

scotty101
Posts: 3564
Joined: Fri Jun 08, 2012 6:03 pm

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 8:26 am

Using 2x 10K resistors as a voltage divider will bring the voltage down from 5V to 2.5v whcih may still work with the Pi.

Using 3x 10K resistors as a voltage divider and tapping the voltage off at the second resistor will give you 3.3V (or 3.3333333..V) which also should be ok.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 11:20 am

You 'can' use resistors as level shifters; however, its dangerous.

... I always use level shifters designed for the purpose, like the ones from Ada Fruit.

marcus
marcus
:ugeek:

drgeoff
Posts: 9250
Joined: Wed Jan 25, 2012 6:39 pm

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 11:54 am

MarkHaysHarris777 wrote:You 'can' use resistors as level shifters; however, its dangerous.
I'm sure you didn't post that without expecting someone to bite. :)

Ok, I'll bite!

User avatar
Burngate
Posts: 5868
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 5:02 pm

MarkHaysHarris777 wrote:You 'can' use resistors as level shifters; however, its dangerous.
Whose dangerous? Sorry - couldn't resist. ;)

_koen
Posts: 2
Joined: Thu Jul 21, 2016 6:34 am

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 5:14 pm

Ok, thank you... So

Receiver output --- 10K Resistor --- 10K Resistor -< 1) pin RPi 2) 10K Resistor -- to ground

will work and is safer than the 5V immediately to the pin of the RPi ?

And is this "really" dangerous (with resistors) ? I saw many examples on the internet without any resistors/logic level converters :shock:

User avatar
Burngate
Posts: 5868
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 5:19 pm

We're waiting for marcus to tell us what he means by "dangerous".

He probably doesn't imply risk to life and limb, and probably doesn't mean loss of your pension rights.
But I'm struggling to see a risk to the Pi or what's attached to it - unless it's mis-wired, which could happen with the board to which he linked.

B.Goode
Posts: 7699
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 5:39 pm

_koen wrote:
Receiver output --- 10K Resistor --- 10K Resistor -< 1) pin RPi 2) 10K Resistor -- to ground

will work and is safer than the 5V immediately to the pin of the RPi ?
It is safer.

Have you calculated or measured what voltage will be applied to the GPIO pin when the external signal is 5 volts?

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: 5V to 3.3V with 10K and 560R resistors ?

Thu Jul 21, 2016 7:55 pm

Hi,
The danger of connect 5V to 3v3 input pins is the current, not the voltage.
Pin have protection diodes, reverse polarized from VCC to GND.
Input current flow from pin to VCC, applying power to VCC line.
The protection diode is not capable of high current need to power the whole circuit, and can damage, shot-circuiting. The damage can be restricted to this diode or spread throughout the rest of the chip.

To protect input circuit, just need to limit the current.
A 10k resistor, limit current to (5-3.3)/10000=0.00017A (17uA).
Due lack of specification, is not possible to say if 17uA is a safe current.
A way to improve this protection is to add a reverse polarized diode (1N4148) between VCC (3v3) and input pin.

A correct calculated voltage divide are safe to convert 5V to 3v3.
What is danger?
Resistor fault? (need to be a really bad quality resistor).
5V is not 5V? Some is wrong on signal source circuity.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: 5V to 3.3V with 10K and 560R resistors ?

Sat Jul 23, 2016 8:53 am

The other possible pitfall of using resistors in a voltage divider is if there's some capacitance in the source or the pi that either needs to be charged or discharged for the value to change. By having large value resistors in there you'll be limiting the current that can flow which could introduce a delay between the module sending a signal and the pi registering it.

That's unlikely to be a problem in this case, but it can have an impact on certain types of peripherals.

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: 5V to 3.3V with 10K and 560R resistors ?

Sat Jul 23, 2016 11:26 am

Hi,
mfa298 wrote:The other possible pitfall of using resistors in a voltage divider is if there's some capacitance in the source or the pi that either needs to be charged or discharged for the value to change. By having large value resistors in there you'll be limiting the current that can flow which could introduce a delay between the module sending a signal and the pi registering it.

That's unlikely to be a problem in this case, but it can have an impact on certain types of peripherals.
Yes, need to take into account input capacitance. Also, no public documentation about this.
It can be assumed based on similar chips, that the capacitance is near 15pF. And also have some inductance.
So, input and output are RLC circuit.
10k resistor have low pass frequency cut near 1MHz and delay of 345ns.
Good enough to fast speed I2C bus.
Same problem apply to active shifter using FET.
This is based on Philips application note, that recommend to use at fast speed (400kHz).
Frequency response of voltage divider can be improved adding a capacitive voltage divider, with internal 15pF capacitor on gnd side.
A screenshot of circuit simulation showing difference with capacitor.

boyoh
Posts: 1268
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: 5V to 3.3V with 10K and 560R resistors ?

Sat Jul 23, 2016 7:07 pm

Designing potential dividers , is some times not as simple as it sounds
The impedance of what you are feeding ,must be taken it to account.
The Pi IN/PUT is very high , so a low a low power in/put signal is ok
Care must be taken when using deviders on low impedance in/puts
You can't have 10ma flowing through it ,,and expect to take 20ma off it
So I think 10x times the current through the divider of what you expect to
Take off it The design voltage across the divider must constant
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Beginners”