Hello. I am a sixth grade teacher and am working on a project with two students. Here is what we have created (they more than me). The goal was to solve a problem encountered by many sixth-graders, the dreaded combination lock to open the locker. My kids wanted to create a system that would read a code and unlock the locker if the code was correct.
We have an Arduino Uno with the Adafruit Motor shield v2. We connected a 4x4 membrane keypad to read the code and a solenoid style lock to lock. We got it to work just fine! We connected a pigtail to the EXT PWR on the motor shield and we're running it off a 9V battery.
Links to what we've used:http://www.adafruit.com/products/1438http://www.adafruit.com/products/1512
Here is our dilemma:
We want to figure out where to go from here. My concern is that there's no current way for us to know if the battery will die, leaving the locker hopelessly locked. Also, we naturally need to graduate to a better battery. The solenoid will handle any voltage from 9V to 12V, so my thinking was to use a 12V lead acid battery. However, I need help with understanding:
1. Is there a way for the Arduino to read the voltage, given the battery will be plugged into the Motor shield?
2. Do we need to use any resistors and/or transistors in the mix anywhere?
3. Should we power the Arduino and Motor shield separately?
Thanks so much for any help you can provide. We've been Googling for days and are a bit out of our element here.
PS...Attached is a picture of our little project.