SparkFun Forums 

Where electronics enthusiasts find answers.

General suggestions or questions about the SparkFun Electronics website
By cdnsnowboarder
#14289
I'm making a project that will use the PIC18F452 to read the accelerometer MMA7260Q then output a bunch of stuff to LCD-16x2-Black(as listed on this site). The accelerometer runs on 3.3V and I'm pretty sure the PIC is fine on 3.3V so I'm hoping the LCD will also be fine on 3.3V.

I checked the datasheet and it makes it sound like there are 2 different versions of the LCD, 1 that runs on 5V and 1 that runs on 3.3V. It also says that you need 4.2V on pin 16 for black.

Can I run the LCD-16x2-black on 3.3V?
Do I need to do anything special to make it work with 3.3V?

Thank you for any suggestions
Kyle
By jasonharper
#14293
It looks like the LCD itself will run on 3.3V, however you've got two other problems to solve in order to actually see anything on it...

* The LED backlight isn't going to light up at all at 3.3V, you need about 4.2V for that - this could perhaps be achieved from your unregulated power source via a current limiting resistor, or a second regulator if that varies too widely.

* The contrast voltage is specified as 4.3-4.7V at room temperature, you probably wouldn't be able to read the display if you tried to use 3.3V for this. Note that the contrast voltage is measured as Vdd-V0; to achieve 4.7V when Vdd is 3.3V, you'd actually need to apply negative 1.4V to the contrast adjustment pin. This may complicate the power supply design...

Here's what I'd do, assuming that the device will be battery powered, or at least have no external connections so that a nonstandard ground level won't hurt anything: Consider the positive side of the battery to be your 3.3V supply. Use a negative 3.3V regulator on the negative side of the battery, and consider its output to be ground. The negative side of the battery will be negative with respect to this ground (Vbatt-3.3V), and can be used for the backlight and contrast adjustment.
By Kuroi Kenjin
#14299
You could try a step up (boost) converter. It'll add a few parts to the project, but it would be pretty simple (if you don't mind messing with a few analog components). Microchip, Analog Devices, Linear Tech, and a bunch of others sell these. The datasheet usually has simple, common set-ups, and recommended parts lists. Depending if you are using surface mount, the switcher chip can be pretty small (SOT-23 5pin, or similiar), otherwise you'd find them in an 8-pin DIP (most likely). I don't have any specific ones in mind, but you'll find what ya' need.
User avatar
By leon_heller
#14300
If you have a spare timer/counter you could output a square wave and use a couple of diodes and capacitors to get a negative supply. Once set up it wont affect your program speed.

Leon
By cdnsnowboarder
#14320
This will be going in my pocket so size is a concern. Currently the board is 2" x 2.2" which does leave room for small additions. I was hoping to just use 3 x AA batteries = 3x1.5V = 4.5V. I guess what sounds best is to have 4 AA batteries and use what I think Jason is getting at.

-=====+ -=====+ -=====+ -=====+
| | |
<-1.4V 0V >3.3V
adjustable |-------- 3.3V regulator ------------|
resistor |-------- PIC in and out --------------|
voltage |-------- LCD supply ------------------|
divider for | |
contrast | |
| | |
-1.4V 0V 3.3V
0V--------------------backlight driver--------------4.7V

I think this will work. For the voltage divider I'm guessing I should aim for an adjustable resistor with as much resistance as possible so it doesn't waste power, and also so theres enough current for the backlight driver. I'm guessing backlight current is "LED forward current" of 120mA. Is that right?

I'm also connecting to the max232 which switches 0and5V to 12Vand-12V for RS232 transmission. I checked the datasheet and it said "supply voltage" 4.5V to 5.5V, Is that all I need to look at?

See any problems?

muchos thankyous
By cdnsnowboarder
#14321
hm.. guess I learned why to preview before submitting


-=======+ -=======+ -=======+ -=======+
|--------------|--------------------------------------------------|
<-1.4V------0V---------------------------------------------->3.3V
adjustable---|------------------- 3.3V regulator ------------|
resistor------|------------------ PIC in and out --------------|
voltage------|------------------ LCD supply ------------------|
divider for---|--------------------------------------------------|
contrast-----|---------------------------------------------------|
|--------------|--------------------------------------------------|
-1.4V--------0V-----------------------------------------------3.3V
0V-----------------------------backlight driver--------------4.7V
0V-----------------------------max232 supply--------------4.7V
By jasonharper
#14322
A 25K trimpot, between 0V and your negative voltage (which would be more like -2.7V if you used 4xAAs), would work fine for the LCD contrast voltage - the current draw on that pin is very low. Note that you will need to adjust the contrast as the batteries run down, as the contrast voltage isn't regulated.

The backlight would work as you have shown, since it is not otherwise referenced to any part of the circuit. However, the MAX232 will NOT work like that - consider its logic threshholds. Anything the PIC puts out would be considered a '1' by the MAX232, since there is 2.7V of offset between their grounds. Easiest solution would be to use a MAX3232 or similar driver chip that can run on 3.3V.
By cdnsnowboarder
#14323
Yes I see your point on the logic of the max232 and PIC. Thanks for that and the different chip to use.

I don't understand where you're getting -2.7V from? It's just the voltage over one of the AA's which are all 1.5V (i've seen some that are 1.2V but i'd use 1.5V ones).

With the battery voltage dropping off, my friend said there is almost no drop off untill just before the battery dies. I'm guessing its different for all the different kinds of batteries, but is this more or less true?

Thanks
By jasonharper
#14325
Oh, I think I misread your diagram - you intended to have 0V connected between two of the batteries, and use a positive 3.3V regulator powered from three of the batteries, right? That would work just fine with disposable batteries. It might be a problem with rechargeables, since the battery on the negative side would have a different current drain than the rest - they wouldn't recharge equally.

The discharge curve varies widely between battery types - you can usually find datasheets at the battery manufacturers' websites that will give you more info on this.

One other option you have is to put all the batteries (probably only 3 in this case) on the positive side, and use the negative voltage produced by the MAXxxx for the LCD contrast. You're allowed to draw a small amount of current from its voltage inverter, although you may need to use somewhat larger capacitors than the minimum.
By cdnsnowboarder
#14333
Nifty idea with the max232, but it won't work for me. That will be an external board that stays with the computer.

You talked about current drain of the batteries only when charging, what about when discharging (being used)?

For charging, I would remove them from the device, so they would all be the same.

For discharging, The backlight driver should be the main thing killing the batteries, and all 4 are hooked up in series to power it. So the batteries should all die around the same time, just from that.

Any mistakes?
By jasonharper
#14343
If your external charger actually charges all the batteries individually, there would be no problem. If they were charged in series, then it's impossible for the charging current to be different for each battery - you'd end up either undercharging the most heavily drained cell(s), or overcharging the least drained ones.

You've got a good point about the backlight being the main drain, and equally spread across the batteries.

Note that most forms of rechargeable AAs are actually 1.2V, not 1.5V.
By cdnsnowboarder
#14347
I had a fealing i've seen 1.2V AA's before but didn't know where.

I just noticed that the LED forward voltage has a max of 4.6V which means if the batteries' voltage went over 1.3V the LED would be fried. I could always put in a voltage divider but that is the last straw and I have now decided it would be easier to simply use a max603 and max604 (3.3 and 5V regulators). The whole reason I wanted 3.3V was because it would make everything simplier to only have 1 regulator and also i would need 1 less battery. This is making everything harder, with no benefits, so screw it.

thanks anyways.
By jasonharper
#14348
Well, you're going to need a current limiting resistor in series with the LED anyway, having a regulated 5V would change nothing other than the value of that resistor. 22 ohm 1/2W should work for 4x1.5V batteries.
By cdnsnowboarder
#14349
i want it to be marketable so it should work with 1.5 or 1.2V
By Kuroi Kenjin
#14358
For 1.5 or 1.2 volts of battery, a switching converter helps a lot. Something like the TC115 (mostly for 3 to 5 volt conversion), would save you much battery space and weight. With carefull component selection (what few components there is), you should be able to extend the step up a bit, since it's rated for 0.9 to 10V input and 3, 3.3, or 5 V output. Although there is probably a better choice that more closely fits your application, they should be able to take the headache out of compensating for the range of input voltages to a fixed output votlage. The Microchip switchers are under there analog/linear devices as switching regulators. Or better yet:

http://www.microchip.com/ParamChartSear ... &pageId=79