George
Sounds interesting. You can make the microcontroller consume well less than a micro amp if you reduce the clock frequency and carefully manage what kind of circuitry you surround it with. Unfortunately, the Nano board is what it is. The interface circuits probably use as much power as the AVR. An LCD is inherently a very low power device. Backlights and such increase power dramatically. You should investigate how to put the microcontroller into sleep mode and only wake it when someting requines attention. This is commonly done with interrupts...you should learn about that. A meter can be had for anywhere from free when Harbor Freight has a promotion to under $10 at other times. Check out Amazon too. You put the meter in series between the power supply and the power input of each circuit subsystem. Doing this shows where the major current draws are so you can work on them. There are many microcontrollers that will operate with less than 2V, so you should be able to operate with a couple of small cells if you can manage the current.
Good Luck
Jos
-------- Original message --------
From: George Alvarez mightycpa@users.sf.net
Date: 01/10/2018 4:49 PM (GMT-05:00)
To: "[gcbasic:discussion]" 579125@discussion.gcbasic.p.re.sf.net
Subject: [gcbasic:discussion] RE: [gcbasic:discussion] Coin powered projects
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
Yes, I have the sleep thing coded already, and it shuts everything down according to the way the data sheet says to do it. Haven't tested it, but I used the same methods I found on the internet that bring power consumption down to micro amp values. I can wake it up too, using interrupts. So that's done, and all I really need to do is count loop cycles to and figure out the loops to time relationship.
Thanks for the info on how to measure the current. I have at least three multimeters, one measures AC current (like home wiring), so for all I know, I can measure tonight.
As I'm reminded again and again, I can be really stupid sometimes. I went to check on the status of my project, and the truth of the matter hit me, right betweeen the eyes. You know the "Standard" and the "Deluxe" model? Well, I have both displays running at the same time. ALL of my testing has been with both displays running at the same time. So in terms of current consumption, it is nearly double what I calculated, seeing as how the LCD is the long pole in the tent.
Also, interestingly, the smaller LCD dimmed out first. The "Deluxe" one, with more pixels, is still alive. Go figure! I have to follow up and get the data sheet for that smaller LCD module. I found a data sheet for an EXTREMELY similar competing product (might be exactly the same) and at 3.3V, it consumes 10mA when fully lit. On average, I'd estimate that I have half the pixels lit at any given time. Sometimes, maybe 25%, rarely more than half. So if that's 5 + 5 from the mcu + 12 from the big LCD, then that's 22, which agrees with how fast I've been chewing up batteries so far.
I also need to disconnect, and try the button batteries again, one LCD at a time. Also, don't know if I've said this here already, but I read somewhere that @11mA consumption, these coin cells have dramatic voltage drop.
I guess a visit to digikey is in order.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Progress! I pulled the smaller LCD off and tried the button batteries again, 2x CR2032, wired in series to provide 6V. Success! I also pulled the other LCD off and tested the small one alone with buttons. Success!
Now I'm testing how long it can stay on continually. They're draining fast, relative to the other batteries, but it's a good test, even if it will never be used like this.
As it turns out, I do have a multimeter where I can measure current usage. I'll post back when I have some data.
Thanks, Joe. Sometimes it just helps to talk it out loud with someone, because putting it to words focuses the mind.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
George
Sounds interesting. You can make the microcontroller consume well less than a micro amp if you reduce the clock frequency and carefully manage what kind of circuitry you surround it with. Unfortunately, the Nano board is what it is. The interface circuits probably use as much power as the AVR. An LCD is inherently a very low power device. Backlights and such increase power dramatically. You should investigate how to put the microcontroller into
sleepmode and only wake it when someting requines attention. This is commonly done with interrupts...you should learn about that. A meter can be had for anywhere from free when Harbor Freight has a promotion to under $10 at other times. Check out Amazon too. You put the meter in series between the power supply and the power input of each circuit subsystem. Doing this shows where the major current draws are so you can work on them. There are many microcontrollers that will operate with less than 2V, so you should be able to operate with a couple of small cells if you can manage the current.Good Luck
Jos
-------- Original message --------
From: George Alvarez mightycpa@users.sf.net
Date: 01/10/2018 4:49 PM (GMT-05:00)
To: "[gcbasic:discussion]" 579125@discussion.gcbasic.p.re.sf.net
Subject: [gcbasic:discussion] RE: [gcbasic:discussion] Coin powered projects
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
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/
Hi Joe,
Yes, I have the sleep thing coded already, and it shuts everything down according to the way the data sheet says to do it. Haven't tested it, but I used the same methods I found on the internet that bring power consumption down to micro amp values. I can wake it up too, using interrupts. So that's done, and all I really need to do is count loop cycles to and figure out the loops to time relationship.
Thanks for the info on how to measure the current. I have at least three multimeters, one measures AC current (like home wiring), so for all I know, I can measure tonight.
As I'm reminded again and again, I can be really stupid sometimes. I went to check on the status of my project, and the truth of the matter hit me, right betweeen the eyes. You know the "Standard" and the "Deluxe" model? Well, I have both displays running at the same time. ALL of my testing has been with both displays running at the same time. So in terms of current consumption, it is nearly double what I calculated, seeing as how the LCD is the long pole in the tent.
Also, interestingly, the smaller LCD dimmed out first. The "Deluxe" one, with more pixels, is still alive. Go figure! I have to follow up and get the data sheet for that smaller LCD module. I found a data sheet for an EXTREMELY similar competing product (might be exactly the same) and at 3.3V, it consumes 10mA when fully lit. On average, I'd estimate that I have half the pixels lit at any given time. Sometimes, maybe 25%, rarely more than half. So if that's 5 + 5 from the mcu + 12 from the big LCD, then that's 22, which agrees with how fast I've been chewing up batteries so far.
I also need to disconnect, and try the button batteries again, one LCD at a time. Also, don't know if I've said this here already, but I read somewhere that @11mA consumption, these coin cells have dramatic voltage drop.
I guess a visit to digikey is in order.
Progress! I pulled the smaller LCD off and tried the button batteries again, 2x CR2032, wired in series to provide 6V. Success! I also pulled the other LCD off and tested the small one alone with buttons. Success!
Now I'm testing how long it can stay on continually. They're draining fast, relative to the other batteries, but it's a good test, even if it will never be used like this.
As it turns out, I do have a multimeter where I can measure current usage. I'll post back when I have some data.
Thanks, Joe. Sometimes it just helps to talk it out loud with someone, because putting it to words focuses the mind.