Go Down

Topic: Level shifting with the 74hc4050 chip (Read 29663 times) previous topic - next topic

boredat20

Jun 11, 2012, 09:48 am Last Edit: Jun 11, 2012, 06:24 pm by boredat20 Reason: 1
Hi all,

I was trying to find a resource online that would explain how to use the 4050 chip to shift between 5v and 3.3-3.9v levels. I have a few RTCs that I want to use (bq32000 from TI), however it operates from 3.0v to 3.6v at Vcc (maximum), and Vcc + 0.3 at all other pins. I'm assuming this means that the chip will operate at 3.3v levels (logic low is 0.3*Vcc, high is 0.7*Vcc) but please correct me if I'm wrong.

Regarding this, I have 2 questions:

a) Typical current draw for this chip is about 100uA, so would it be OK to use a resistive divider to provide Vcc to the chip? I understand this is not great practice for supply lines, but would it be suitable for a low current application such as this? I remember reading a post where GrumpyMike explained why a resistive divider would fail if too much current were drawn but I can't find that at the moment. If this is not appropriate, could I supply the chip with 3.3v through a pin on the 4050?

b) From looking at the application of the 4050 chip on the Sparkfun SD shield, it is not immediately obvious to me how to set the logic level of your output voltage. Am I correct in my understanding that the output voltage level will be equal to the voltage at Vcc of the chip?

On a side note, if someone could point me to a tutorial or some sort of resource that would give me a better understanding of how to use the 4050 and other buffers/level shifters.

Thanks!

CrossRoads

This one?
http://www.ti.com/lit/ds/symlink/cd74hc4050.pdf
Looks like you power it (VCC, pin 1) with the desired output level, then drive the inputs with your inputs that are up to 16V.
Be sure to connect grounds.

Don't you have a 3.3V source on your arduino to provide power to pin 1?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

boredat20

I do have a 3.3v source on my Arduino, but the project I'm working on will be a standalone atmega328p. I have a few of the TQFP atemga328 chips that I finally managed to bootload so, why not!

Didn't even think about that though, thanks for the suggestion. I might just go ahead and add a 3v3 regulator to my board design, although I am a little concerned about power consumption with an additional regulator on board since the project will be rechargeable battery powered.

I could use a 5v tolerant RTC (like the ds1307) but I am interested in using the trickle charge feature as I plan on using a supercap instead of a battery backup for reliability. Basically, I want to never have to worry about replacing a battery as my design is going to be more or less sealed.

CrossRoads

Add a boost regulator to take supercap and maintain 3.3V output.
Search www.linear.com, they make a chip for that. Need a 10uH inductor, get all the life out of a charged cap.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Docedison

There is also the old fallback ICL7660 +5 to +10V charge pump converter. There are several devices in that type of converter that also might work and they only require capacitors for operation, most use .1uF caps. The MAX232 operated on that principle and is GREAT for Bi-polar supplies for Op-Amps as it produces both + and - 10 to 12 vdc out @ 5 to 10 mA and 70 - 80% efficiency. Although that isn't a real good efficiency figure it is an example of the technology and possible applications not usually covered in the design notes for that product.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

boredat20

Quote
Add a boost regulator to take supercap and maintain 3.3V output.


Would this be beneficial (current consumption wise) over simply adding a low dropout, low current 3.3v regulator on the board? Something like this: http://www.nxp.com/documents/data_sheet/TDA3663.pdf

That is a 100mA regulator and I won't even get close to pulling that kind of current through it.

I guess I don't really understand why a boost regulator would be useful here. My power source is 7.4 volts so I don't think I'll be needing to step up? Unless I'm misunderstanding you...

The supercap charging is handled by the RTC chip.

I think I am going to build my circuit on a breadboard and start measuring current consumption to see what I get. Thanks for the help!


CrossRoads

7.4V battery is new info.
I missed that the supercap is for the RTC only.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Docedison

You touched briefly on "Linear regulator, Don't even think about it. Any Power used to heat the regulator won't be available to move anything else... There are 3 or 4 terminal switchers that are either boost, buck and or variable for both topologies as well as boost-buck which is neat because Vsupply can swing about the output voltage. (not as efficient but still 80%+) where a linear has to be specially fed to get 75%. Lest we forget there are a lot of "Low Dropout" regulators that have an ugly fact buried on page 10 of the data sheet and that is the required internal Control Current doesn't flow in the load like an NPN device does (emitter Follower) but to ground as the only way I know to do it is with a P type device (low dropout). It is arguable that P type "Fets are available... Now that technology took years to get to regulators, still not used in the greatest majority of last gen regs so there is a price carefully hidden and that is that the control circuits need lots more current for a given load, compared to no load. Literally I use linears where low noise and isolation are required as they are easier to bypass that a switcher but only required when sub millivolt noise is required @ milliamp supply currents or there is a radio involved of any kind. Blocking is just as good as a poor antenna as far as "Not" receiving a weak signal. Or other low noise, small signal, analog requirements. If there is a choice at all use a switcher.  IMO and experience in designing low power battery operated solar charged devices.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

boredat20

Apologies, should have mentioned my power source.

Quote
You touched briefly on "Linear regulator, Don't even think about it. Any Power used to heat the regulator won't be available to move anything else... There are 3 or 4 terminal switchers that are either boost, buck and or variable for both topologies as well as boost-buck which is neat because Vsupply can swing about the output voltage. (not as efficient but still 80%+) where a linear has to be specially fed to get 75%. Lest we forget there are a lot of "Low Dropout" regulators that have an ugly fact buried on page 10 of the data sheet and that is the required internal Control Current doesn't flow in the load like an NPN device does (emitter Follower) but to ground as the only way I know to do it is with a P type device (low dropout). It is arguable that P type "Fets are available... Now that technology took years to get to regulators, still not used in the greatest majority of last gen regs so there is a price carefully hidden and that is that the control circuits need lots more current for a given load, compared to no load. Literally I use linears where low noise and isolation are required as they are easier to bypass that a switcher but only required when sub millivolt noise is required @ milliamp supply currents or there is a radio involved of any kind. Blocking is just as good as a poor antenna as far as "Not" receiving a weak signal. Or other low noise, small signal, analog requirements. If there is a choice at all use a switcher.  IMO and experience in designing low power battery operated solar charged devices.


Doc, I think you know way too much for my own good  XD. I toyed with the idea of using a boost buck-converter in a previous project for the exact reason you mentioned (fluctuating Vsupply), but wasn't ready at the time to start learning how to set the converter up. Found a few online calculators that did inductor/cap values, so I might give that another shot down the road.

Thanks for the input!

Docedison

Linear Tech has one and the web tool to make it work So does both National and Maxim, in another place here I posted a long dissertation on switchers and some labor saving tips re: inductor choice and an easy way to find that optimum... least expensive part, alternately you could look for a 'reference design' they can usually be found in the master data sheet for a family of regulators or by request from the MFR you who makes tour part, frequently a sales engineer can be your best friend by having artwork masters readily available. The third choice is to find one on Ebay and copy it exactly (after you have tested it carefully) 'usually' those little building blocks are faithful representations of 'reference designs'. MY reasoning is fairly simple 1. They Work and 2. The layout works 3. is that the components are chosen (and usually with good part #'s not so obvious is the layout is done, use a set of calipers and some standard footprints and you're done.. The third choice would be more inline with not being able to find a layout. Much easier to Copy a layout then create one, the one you are copying has been tested, yours?
The last point is switchers are noisy, LOW ESR components are required on both the input and output sides of the device and an LC filter might be required on both ends as well. The filtering is again dependent on conditions of use and working environment. Finally use  as BIG a copper pour as you possibly can on both sides of the board and lots of vias to staple the top and bottom planes together, especially around the switcher itself. Via's are cheap. The notes and suggestions are more for higher current supplies but are applicable to your design as long as you scale them for the situation.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Docedison

That's twice I have been sidetracked. The original post referenced a 4050 for a level shifter, go look for a NXP app note AN10441 and read it, might save you some issues re: level shifting. It describes adding 2 2N7000 Mosfets to the usuay 3V3 and 5V pull-ups to make a bi-directional level shifter that I have tried/used and I also took the time to model it in MultiSim 11 and was able to extensively verify it there, it a Fet variation on an old TTL Gate, input circuit. I plugged in 2 bi-polars and a si diode and base current limiter resistor and that circuit worked as well, I didn't however test that one beyond simulation. Although the circuits are bi directional they work perfectly one way or the other as well.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

boredat20

Doc,

That app note is EXACTLY the kind of thing I was looking for (but wasn't able to put into words obviously). Brilliant. I can't say I've understood everything you've said in this thread, but I can't say I haven't learned anything from it either! THanks a bunch.

Go Up