Menu

RE: [gcbasic:discussion] Coin powered projects

joe rocci
2018-01-10
2018-01-10
  • joe rocci

    joe rocci - 2018-01-10

    The big question is what it the mAh capacity of the cell and what does the circuit draw. Divide the former by the latter and you'll have an estimate of the run time in hours. What is your requirememt?

    -------- Original message --------
    From: George Alvarez mightycpa@users.sf.net
    Date: 01/09/2018 6:04 PM (GMT-05:00)
    To: "[gcbasic:discussion]" 579125@discussion.gcbasic.p.re.sf.net
    Subject: [gcbasic:discussion] Coin powered projects

    Is anybody successfully running their project on coin cells? I'm finding that the low, low, low current the batteries deliver won't let me run a nano. I need a button and an LCD and enough memory to run 35K of code.
    Anybody?

    Coin powered projects

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gcbasic/discussion/579125/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     
  • George Alvarez

    George Alvarez - 2018-01-10

    Hi, thanks. Before I begin, please understand that I know next to nothing about this stuff. They don't teach you any of this in accounting school.

    I've checked with the seller I bought the LCD from, and he hasn't gotten back to me, but there is a similar one that draws 0.04W. If I can use the internet correctly, 0.04 W @ 3.3V = 12 milliamps operating current for the LCD.

    The button doesn't really draw current, other than whatever the pin might put out when the circuit closes, I guess. It's a momentary switch, so we're probably more concerned about spikes, when it is pushed. I'm putting 5V in, and using a 10K pull up resistor.

    I can't find the right info for the Arduino nano. But for the ATMega328p, I found this:

    The literature says that each I/O pin is rated at 40mA. That sounds like a maximum. I read something that lead me to believe that a button push is going to use almost nothing in current, given my pull up resistor. There are several values provided for pin 27, the input voltage, like leakage @ 1uA. But worst case, it uses 5.5mA when active. The uA are negligible, so let's use 6mA when the thing is running and a button is being pushed.

    Without considering whatever else the arduino nano board is using up, that's 18mA consumption when it is used. A typical coin cell battery in the size range I'm using has about 35mA capacity. So two hours on a good day?

    The trouble is that I can't run my project for even two seconds on a coin cell. I have connected two cells in series, to double the voltage to roughly 5.7V, and the only thing that happens is that I get a repetitive blink on an on-board LED, which acts exactly likes the most basic of programs that comes with that board. I've tried with and without a voltage regulator, but it simply doesn't work.

    I got the bright idea to switch to two AA batteries and put them through the voltage regulator, and I figured I could time how long they stayed alive, and do the math from there to arrive at current consumption. But my voltage regulator doesn't work at < 2.8 input volts, and sure enough, the battery drain overnight from constant running drained the voltage down to 2.8 and my project died overnight.

    According to this link a Duracell battery under a 0.2A load will drop from 1.5 volts to 1.4 volts after about 15 minutes, and to 1.2 volts after about an hour. Assuming consumption is roughly linear, then 0.02A should do the same thing in maybe 10 hours. From the time I started to the time I checked in the AM, that means my current consumption is in the right ballpark.

    I'm trying a 9V battery right now, 650mAh capacity.

    So far, my conclusion is that my arduino board and coin cells are not a good match. I'd love to hear your thoughts on what I just reported, and what I may have left out. Again, I know next to nothing about all this, and many times, my assumptions are completely wrong. You will not offend me with corrections.

    But assuming I'm pointing in the right direction, the question is, has anybody been able to find a good match that does work well?

    Thanks again.

     

    Last edit: George Alvarez 2018-01-10
    • joe rocci

      joe rocci - 2018-01-10

      George

      In order to get a precise answer, we’ll need precise information:

      1) Describe the application and special functional requirements.
      2) What is the hardware platform (commercial board, home brew PIC, etc)?
      3) How long is the battery expected to run? Will it run continuously or does the device “sleep” when not in use?
      4) How often do you expect to replace or recharge the batteries?
      5) Are there size/weight/cost constraints?
      6) What is the current draw of each piece of the system? If you don’t have specifications, get a $5 meter and measure it.
      7) Is it imperative to use coin cells?

      Your final question points out the difficulty in getting good advice: “...has anybody been able to find a good match that does work well?”. Please define your requirements more precisely. As an engineer to an accountant I think we’ll both agree that specificity in communications is essential to getting a good result.
      From: George Alvarez
      Sent: Wednesday, January 10, 2018 12:03 AM
      To: [gcbasic:discussion]
      Subject: [gcbasic:discussion] RE: [gcbasic:discussion] Coin powered projects

      Hi, thanks. Before I begin, please understand that I know next to nothing about this stuff. They don't teach you any of this in accounting school.

      I've checked with the seller I bought the LCD from, and he hasn't gotten back to me, but there is a similar one that draws 0.04W. If I can use the internet correctly, 0.04 W @ 3.3V = 12 milliamps operating current for the LCD.

      The button doesn't really draw current, other than whatever the pin might put out when the circuit closes, I guess. It's a momentary switch, so we're probably more concerned about spikes, when it is pushed. I'm putting 5V in, and using a 10K pull up resistor.

      I can't find the right info for the Arduino nano. But for the ATMega328p, I found this:

      The literature says that each I/O pin is rated at 40mA. That sounds like a maximum. There are several values provided for pin 27, leakage a 1uA, and worst case, 5.5mA when active. The uA are negligible, so let's use 6mA when the thing is running and a button is being pushed.

      Without whatever else the arduino nano is using, that's 18mA consumption when it is used. A typical coin cell battery in the size range I'm using has about 35mA capacity. So two hours on a good day?

      The trouble is that I can't run my project for even two seconds on a coin cell. I have connected two cells in series, to double the voltage to roughly 5.7V, and the only thing that happens is that I get a repetitive blink on an on-board LED, which acts exactly likes the most basic of programs that comes with that board. I've tried with and without a voltage regulator, but it simply doesn't work.

      I got the bright idea to switch to two AA batteries and put them through the voltage regulator, and I figured I could time how long they stayed alive, and do the math from there to arrive at current consumption. But my voltage regulator doesn't work at < 2.8 input volts, and sure enough, the battery drain at about 24 hours of constant use drained the voltage down to 2.8 and my project died overnight.

      According to this link a Duracell battery under a 0.2A load will drop from 1.5 volts to 1.2 volts after about an hour. Assuming consumption is roughly linear, then 0.02A should do the same thing in maybe 10 hours. From the time I started to the time I checked in the AM, that's in the right ballpark.

      So, my conclusion is that my arduino board and coin cells are not a good match. I'd love to hear your thoughts on what I just reported, and what I may have left out. Again, I know next to nothing about all this, and many times, my assumptions are completely wrong. You will not offend me with corrections.

      But assuming I'm pointing in the right direction, the question is, has anybody been able to find a good match that does work well?

      Thanks again.


      RE: [gcbasic:discussion] Coin powered projects


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gcbasic/discussion/579125/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • George Alvarez

    George Alvarez - 2018-01-10

    Hi Joe,

    First, an update. It's been 21 hours since I started the 9V, and it's still running, although the LCD is dimming. I'm guessing it will be about 24 hours when it dies. I suspect it will die because it drops below 2.8V threshhold. I found some data that says that after a 9V gives up 400mA in continuous load (~22 hours for me), there is a significant voltage drop for the next 100mA, from 7 to about 2. I die at roughly three, so my guestimate of 24 hours seems about right. I also read that 9V battery voltage will rise back up if the load is taken off and the battery rests. I have no idea whether that is credible or not.

    Joe, I understand what you're getting at, I really do. I guess I was trying to approach this from another angle. I wondered if there were MCU's out there that could run a button and an LCD module using I2C and not much else using coin cells... in other words, has anybody done anything like that already and had some luck.

    For example, a while back, I created a little tennis score keeper that you wear on your wrist. I used one of those $4 pedometers that you could find anywhere, and copied the board and put a PIC 16F916 on it instead of the little Chinese dedicated processor that was ensconced by an epoxy shell. Just copied the board outright, and substituted a PIC. Needed a lot of pins to drive the LCD. The LCD had something like 15 pins spaced 1mm apart, and it ran on one coin cell. When I put the the PIC in, all of a sudden, it needed two coin cells, and it had a much shorter life, but it would work. Unfortunately, that LCD doesn't have enough segments, and I can't use that platform. The LCD I am using now is a current hog, compared to that thing. The pedometer can stay on for weeks without losing power. I don't recall it going to sleep ever. You had to turn it off, and it has 3 buttons. So I just wanted to see if anyone had built something that lasts on coin cells.

    But your approach has merit, so I'll answer what I can right now:

    7) Is it imperative to use coin cells? No, but it would be great, because everything else affects the size of this thing. I want to be able to mount it unobtrusively on a guitar. If I don't use coin cells, then I don't really have a power issue. I can get away with a rechargeable 9V, and build a case around that. It will be bigger, heavier and not quite as pretty.

    1) Describe the application and special functional requirements. For the "Standard" version, basically, you turn it on, use the button to navigate through a menu where you select the note that is the key of the song you want to play. Using the formula commonly known as the Nashville Number System, it calculates which chords sound natural in that key and displays them.

    In the "Deluxe" version, which currently uses a 128X64 display (SSD1306), when you display the chords, you can navigate to each one, click on it, and it will show you the various fingering positions to play that chord, and that chord with accents (sus2, sus4, dom7, aug, etc.). After some as of yet undetermined time (a minute), the display would revert back to show the chords again. There is also an additional menu item for you to display fingering, except that you don't have to select a key. You just select notes and go from there.

    2) What is the hardware platform (commercial board, home brew PIC, etc)? Right now, it is the Arduino Nano Chinese version. I thought I'd start with a known platform that is widely used/supported. I bought a Beetle and I'm going to try that next. I'm open to suggestions.

    3) How long is the battery expected to run? Will it run continuously or does the device “sleep” when not in use? I suppose you might sit around and play for a couple hours at most. Sometimes you'll need it, sometimes you won't. When you do, you'd need it for an entire song, so let's say that lasts 5 minutes or so before you get the hang of what you're going to play. It can go to sleep after that, and by "go to sleep" I mean I turn off the LCD and pretty much everything else. It wakes up at the touch of the button, and resumes wherever it left off. So, 5 minutes at a time, multiple times in a one or two hour time frame, and then it goes to sleep until you pick up a guitar again.

    4) How often do you expect to replace or recharge the batteries? Well, if I use a 9V, I can recharge every few uses. Like any modern electrical device, I don't relish constantly changing batteries. What is acceptable to me is that they last forever, or plan B, I can recharge them, no more than once a day unless heavy, heavy use. That's reasonable to me.

    5) Are there size/weight/cost constraints? Are there ever not? ;-D I want to mount it on my guitar. Where? Maybe on the headstock, with a clip. Maybe on the body of the guitar, so I can look down and see it. That speaks to size and weight, and why I want to use coin cells. Right now, I can do the 9V rechargeable battery option, and the cash cost of everything is maybe $25 plus my time. I can live with that, if I were to commercialize this, I'd send it off to China and do things differently. I'm thinking maybe my pals might want one too, but really, I'm thinking that if I can figure out how to run this thing on coin cells, that gives me a hardware platform that I can use for any of several projects.

    6) What is the current draw of each piece of the system? If you don’t have specifications, get a $5 meter and measure it. Don't know. I might have the meter, how do I measure, for example, how much current the LCD is using? How do I hook it up? Is there some youtube guidance on this? Where do I get a $5 meter?

    Thanks Joe

     

Log in to post a comment.