2
\$\begingroup\$

Am using adafruit (American hobbyist electronics components retailer) breakout for the max31850 thermocouple amplifier who's data line isn't 5v tolerant. Therefore I want to power my atmega328P @ 12mhz 3.3v. I have been told this is the optimum speed for a 3.3v power rail.

THe lcd am using to display the temperature is unfortunately a 5v lcd I believe since I tried powering it from 3.3v it didn't even light up. I used a commercial bench supply @ our lab to test this. As soon as I upped the voltage to 5v it lit up the first row. My question is will the 5v on the lcd cause damage to the atmega? MY understanding is current always flows towards lower potential. The difference in voltage can cause a large current to flow right?

\$\endgroup\$
  • \$\begingroup\$ Why not use the adafruit max31855 part, which uses SPI, and has level shifting, and just run everything at 5 volts and be done with it? \$\endgroup\$ – whatsisname Nov 28 '14 at 4:58
  • \$\begingroup\$ yeah thanks sadly am not inamerica. I can't seem to get it from proto-pic. \$\endgroup\$ – Ageis Dec 2 '14 at 10:18
  • \$\begingroup\$ Adafruit ships internationally. \$\endgroup\$ – whatsisname Dec 2 '14 at 17:04
3
\$\begingroup\$

If the 328p is signalling at 3.3V logic levels and the LCD wants 5V logic levels it should still work OK, unless it specifically says it won't that is. If you look at the normal thresholds for for 5V TTL logic compared with 3.3V TTL logic. Essentially the LCD will just receive good but weak 1's from the 328p and good strong 0's.

TTL thresholds, where Vdd = 5V, are >2V = '1', <0.8V = '0'.

If the LCD is using CMOS thresholds then it might still work but the 1's will be a little sketchy as they will lie on the threshold.

If the LCD needs to signal back to the micro-controller then you'll have more problems and you'll have to use a level shifting IC or even a resistor divider can work.

You don't need to worry about current with signals from the 328p to the LCD as the LCD is always sinking current into it's inputs. (i.e. current flows from the 328p to the LCD to pull the input up to a logic 1 and the 328p will sink current to pull the line down to a logic 0)

This all said, you could use a level shifting IC(s) to interface the LCD with the 328p and not have to worry but it's an extra component that you should be able to do without.

\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks this lcd is a pain in the butt. I just tried hooking up my atmega328 up to 3,3v. The lcd didn't display anything, not even the squares you get when you initialized it. Can I use the solution tut gave in the following to boost the signal to 5v electronics.stackexchange.com/questions/82104/… \$\endgroup\$ – Ageis Nov 28 '14 at 0:53
  • \$\begingroup\$ Just to clarify, did you hook the 328p up to 3.3V and the LCD up to 5V? You could use any of those, the diode based one's i haven't tried myself before, they look sound enough though, but I've done the BJT/FET based one before when the logic inversion hasn't been an issue and I've done many a project with level shifting ICs too. \$\endgroup\$ – hooskworks Nov 28 '14 at 1:02
  • 1
    \$\begingroup\$ yes i did hook the atmega to 3.3 then left the lcd @ 5v. Nope Now that I've reread the datasheet it does say minimum 4.5v for logic high. OOPs Freaking lenz law gets me all the time \$\endgroup\$ – Ageis Nov 28 '14 at 1:21
  • \$\begingroup\$ That's an annoying one, in that case it's going to have to be a level shifting IC but there are plenty of them around with or already on breakout boards from places like Sparkfun or Adafruit \$\endgroup\$ – hooskworks Nov 28 '14 at 1:25
  • \$\begingroup\$ It might be easier to use a grounded-gate MOSFET level shifter on the 1-wire data line, and run the ATmega at 5v, than to shift all the LCD signals - especially if you can give the max31850 a dedicated rather than parasitic 3.3v supply. \$\endgroup\$ – Chris Stratton Apr 24 '16 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.