MicroView and Phoenard Arduino Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
suzy

Junior Member
Registered:
Posts: 2
Reply with quote  #1 

I'm building a project using the SparkFun MicroView, which is essentially an ATMega328 + OLED display, and I'm trying to decide what size LiPo to use... I like the size/footprint of the 110mAh battery SparkFun offers. However, I don't know how many amps to expect the MicroView to use. My project will be a simple handheld game, so I would like the battery to last at least 3-4 hours before needing a charge.

Doing the calculations: 0.11Ah / 4h = .0275A = 27.5mA. Is it reasonable for something like the ATMega328 + OLED display to draw around 27mA or less? I also designed my buttons with pull-down resistors, since they are normally open and I don't want them to draw current (albeit minute) while open.

MLXXXp

Avatar / Picture

Senior Member
Registered:
Posts: 75
Reply with quote  #2 
Yes, the MicroView will likely draw less than 27mA. The processor should draw about 10mA maximum, leaving 17mA for the display.

However, a lot will depend on what you put on the display. Each pixel in the display is an LED which will draw current when lit. The amount of current the display uses at any moment will be proportional to how many pixels are on at that time.

According to the OLED display module's datasheet, it will draw approximately:

  • 8mA typical, 10mA maximum with 30% pixels lit.
  • 13mA typical, 16mA maximum with 50% pixels lit.
  • 23mA typical, 30mA maximum with 100% pixels lit.

So, for minimum current consumption, you should design your game to have a mostly black background with a minimum number of lit objects.

Also F.Y.I. To save a bit of cost and space, you don't need to use pull-down resistors on your buttons. You can use the built in pull-up resistors of the processor's digital input pins. With Arduino, you do this using pinMode(pin, INPUT_PULLUP). Your code then just has to reverse the button logic and treat a low or 0 on a button input as "button pressed" and a high or 1 being "button released". The internal pull-ups are about 20k to 50k. You would connect each button between the pin and ground.
suzy

Junior Member
Registered:
Posts: 2
Reply with quote  #3 

I received an answer from my friend: 
It is possible to run an ATMega328 at anything between 0.1mA and 20mA for only its core (I'm using an estimation from memory here, but there abouts) using the internal RC oscillator speeds. Lower clock speed = less processing power, but also lower power use.

So that will very much depend on the complexity of your program and how quickly it should run through that complexity.

The OLED is harder, because Sparkfun cleverly doesn't really tell us which display they are using, but for 48x64pixel RGB OLED, I would expect average use to be in the 20mA range. But this is just a very big ball-park guess, as I am not a super-expert on the stuff (so I might be off by a decent margin still). As much as the end-average use, even if you know the peak use or any other statistic, because an OLED display's power drain depends on how many pixels you use and how many colours for each pixel.

The best thing is to just measure what the display uses in your situation over a good span of time. Several minutes to an hour.

Using the Atmel datasheet you can make some predictions if you know at what speed it runs and using 3.7V (probably nearest curve will be 3.3V, so round up a little at least). Those sections are usually in the Chapter 24 to 32 region, somewhere at the back, called "Electrical Characteristics".

Also use at least 20% margin in your battery capacity to run time calculations, so you don't get disappointed when the actual battery is a bit off and/or starts aging, or might be defined at 10mA drain for a 110mAh type, where you drain 30mA, which would decrease that usable capacity.

MLXXXp

Avatar / Picture

Senior Member
Registered:
Posts: 75
Reply with quote  #4 
Quote:
Originally Posted by suzy
The OLED is harder, because Sparkfun cleverly doesn't really tell us which display they are using


The datasheet for the OLED display can be found here:
http://pdf.masters.com.pl/WISECHIP/UG-6448HLBEG03.PDF

Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!