voltage divider

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello,

i am implementing sd card with atmega8 and i need to lower voltage from 5V to 3,3V in a few places. I have soome zeners, but they are 3,5V. So i wonder which one is beter(less bad), to use these zeners or resistors voltage divider?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Generally, zener diodes are a very poor choice. They are not very accurate and, at low voltages, are very "soft".

If you have to do it, use resistors. If speeds are high, you may want to take care about what the resistor values are. Otherwise not such a critical issue.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, thanks Jim. just one more question, by saying "soft" do you mean temperature sensitive? I didn't know that zeners are that bad, i thought they have their uses.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, zeners have their important uses.

In this context, "soft" means no sharp "knee" in the I-V curve which you DO get above 5V. The result of "soft" means that the voltage varies a lot depending on the current flowing through the diode.

One of the other problems with zener diodes in this application is that they have a lot of capacitance. That means that if you want the circuit to haver a short rise and fall time, small resistor values have to be used. This is generally true of zeners, not just low voltage ones.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered running everything at 3.3V? Running two separate supply voltages is messy, as you're finding out.

- S

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The following design isn't the best around, but it is functional. Note that this was for a 3V MMC card, essentially the predecessor to the SD card, running on a 5V microcontroller.

Three signals were fed through resistor dividers to convert the +5V/Gnd signal to +3V/Gnd. One signal was boosted from 3V to 5V using two, small signal NPN transistors.

Not elegant, but functional.

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think only proper level shifting with ICs should be done, zeners and resistors are only asking for trouble.

With the abovementioned 12k and 18k resistors, they will seriously limit the bus speed. If there is even 10pF of stray capacitance, the rise time will be 160ns, and bandwidth reduced to 2.2MHz. Minimum rise times seen in card specifications are between 10ns and 50ns.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk
thanks for enlightening, i see i need to do some more research on his:)

mnehpets
yes i did, but then i thought that i will have 3,3V mega8 communicating with 5V spi and 3,3V rs232 communicating with -+12V uart. So i thought maybe it's easer to modify voltages just in one place.

DocJC
thanks a lot, that's exactly what i needed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UART is no problem, many converters can work with either 3.3V or 5V supply.

And you seem to need both 3.3V SPI for memory card and 5V SPI for something else, so you need level translation of SPI anyway.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am doing the project

Quote:
UART is no problem, many converters can work with either 3.3V or 5V supply.

it works with 3,3V, but doesn't it still produce TXD of 5V? if it does, there will be another divider needed.

Quote:
And you seem to need both 3.3V SPI for memory card and 5V SPI for something else, so you need level translation of SPI anyway.

isn't there a problem, that having uC working on 3,3V and having inaccurate voltage dividers i can reach sometimes input low voltage of 2,7V?
And won't i be forced to use lower clock speed too?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

from what i see it all comes down to which programmer i am using. If it's capable of 3,3V, it's easier to add a divider on TXD line and another on mega8 source voltage. If programmer is using 5V, it's probably less trouble to sort out SD lines. And also mega8 and rs232 will be working on their natural speed, so more reliability.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Depending on how many of these things you are making, and the trade off between BOM cost and development time, you might just want to use something like this:
TXB0104 level translator IC
http://www.ti.com/lit/ds/symlink...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Swap the MAX232 for a MAX3232 which works on 3v3.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gytis111 wrote:
i am doing the project


That has got to be the worst example ever to start with.

- Only good thing is it uses a single 3.3V supply for everything.
- Half of the AVR power supply pins are unconnected. It won't work properly.
- Mega8 is not meant to work at 3.3V. (But Mega8L is.)
- MAX232 is not meant for 3.3V operation. (But MAX3232 is.)
- AVR has no crystal so it uses the internal RC oscillator that may be too inaccurate for RS232 without manual calibration.
- If supply is 3.3V, what use there is for zeners anyway? Is the programmer 5V only as there is no VCC connection to programmer? Even if it is 5V programmer, there are no resistors to limit current through zener. And the programmer would still have to understand AVR's 3.3V as logic 1 reliably.
-AVR SS pin is not used as SD card chip select. It does not matter much, but for the AVR SPI to work reliably the AVR SS pin has to be an output anyway, so why not use it.

Gytis111 wrote:

Quote:
UART is no problem, many converters can work with either 3.3V or 5V supply.

it works with 3,3V, but doesn't it still produce TXD of 5V? if it does, there will be another divider needed.

Of course not. You use same supply for both AVR and RS232 translator chip. There is absolutely no need for a divider.

Gytis111 wrote:

Quote:
And you seem to need both 3.3V SPI for memory card and 5V SPI for something else, so you need level translation of SPI anyway.

isn't there a problem, that having uC working on 3,3V and having inaccurate voltage dividers i can reach sometimes input low voltage of 2,7V?
And won't i be forced to use lower clock speed too?

I don't understand. Why would it be any more inaccurate than if the AVR would run at 5V? Don't use voltage dividers then, or use more accurate resistors if you want to use voltage dividers.

If you want to use Mega8, you must use near 5V, and it will work up to 16MHz. But as I said, there is no crystal, so with the internal oscillator it will only work at up to 8 MHz anyway. So you can use Mega8L which can work at 3.3V too, and it only goes up to 8 MHz ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
That has got to be the worst example ever to start with.
I found it a little bit strange too, but i am using it only as a guide anyway. I'll add external oscillator, use 5V on everything and the design from DocJC for SD. Don't see why it is not supposed to work, if i choose resistors accurately. The main reason i don't want to use mega8L and rs3232 is that it's a home hobby project and i have mega8 and rs232 already.
Quote:

isn't there a problem, that having uC working on 3,3V and having inaccurate voltage dividers i can reach sometimes input low voltage of 2,7V?
And won't i be forced to use lower clock speed too?

I don't understand. Why would it be any more inaccurate than if the AVR would run at 5V? Don't use voltage dividers then, or use more accurate resistors if you want to use voltage dividers.

If you want to use Mega8, you must use near 5V, and it will work up to 16MHz. But as I said, there is no crystal, so with the internal oscillator it will only work at up to 8 MHz anyway. So you can use Mega8L which can work at 3.3V too, and it only goes up to 8 MHz ever.


didn't use mega8 before, probably i had to do some research before asking something like that :)