I've built a marble game. The aim of the game is to roll a marble from start to finish through an obstacle course as fast as possible.
The start and finish contain an infrared led + receiver.
As soon as the marble leaves the starting position, the time starts and is displayed in a 4-digit seven segment display. (3 segments for seconds, 1 for deciseconds).
The time stops as soon as the marble is at the finish.
This is powered by a rechargeable 9-volt battery.
At the moment, the game lasts about 3 hours on 1 battery charge. I would like to extend this to as long as possible (a whole day would be great).
I don't know if this is even possible, but since I don't have an electronics background, I wouldn't be surprised if I created a battery drain without even knowing it.
The display consumes most of the power, and if you want that on all the time, there is not much you can do to save battery life, other than to choose a better battery power source (2x18650 would work).
I wonder if you can shut down the start detector once a run starts, and then only power up the finish detector when the run is expected to finish. Then power this one off and restart the cycle. With this approach in mind you might also put the Arduino to sleep.
Also, depending on the physical setup, you might power the detectors intermittently just for a short moment at a time, perhaps 50% of the time. 20%? 10%? This depends on the size and speed of the marble so you don’t miss a hit.
And of course, make sure you use multiplexing and do not power all display segments simultaneously.
I was going to go through and do some back of the envelope math on how much current the LEDs, display and Nano used, relate that to a typical 9V rechargeable with ~600mAh capacity, but then I noticed something odd in the wiring diagram.
The supposed IR transmitters and receivers are only wired to power. There's no signal pin anywhere. So exactly what purpose are they serving? None that I can see, except to consume power.
Considering that, there's no point in mentioning anything else that jumps out at me about that circuit and makes me go "I wouldn't do that if I was worried about battery life".
As pointed out, won't work the way you show it in your wiring diagram. Please post a link, I'm assuming they are IR phototransistors?
You can reduce power by connecting the emitters to 2x Arduino pins and switching them on for a brief moment while the Arduino reads the phototransistor pins (assuming there are any).
You also need some way for the Arduino to shut down and save power while the game is not being played. You could attach an accelerometer to detect movement of the game, and if there is no movement for a few minutes, shut down into power saving mode.
Only powering the IR / detection periodical is a good option.
Completely shutting it down could be an option, maybe in combination with an accelerometer
You are right, without the wires to A0 and A1 this wouldn't at all
Done (except for the wires comming from the 9v battery)
Sorry, no good image available
When Idle I could shut off the finish detection there is no extra swich needed.
I could use some analog pins as digital pins for powering the IR led en sensor.
It had to be build in into a 20mm wooden slat, I didn't look for lcd's that small.