Im thinking about making a solarpanel charged system that opens a lock only when its charging over a certain voltage.
Instead of the lock I`m also thinking about piston or steppermotor hiding the box when charging signal is to weak.
I`m an automation tech but working mostly with field instruments and not so much programming.
any Ideas to how I should start planning this?
I have not bought any equipment yet, and just started reading on this forum today...
Search for Reverse Geocache in the forum and on Google. That should get you started.
I have read about the reversed geocache, but that is a bit more complicated than what i have in mind.
I just need to charge batteries with a solarpanel, and a voltage measurement that ca trigger a output to a servo.
I guess it will be a simple program, and not so advanced mechanics.
By reading in the forums i can see that several have made solar chargers.
do I need a external card/shield to measure the voltage?
What are the cheapest solution i can use to make this?
As a geocache its allwas a possibility that it will be stolen or destroyed...
If someone with a bit more experience than me could help me with a shopping list?
thanks in advance
Is this overkill to run the arduino and a servo?
Here is a fast schecth of the plan.
Thinking of two compartments so just the arm of the servo is inside the compartment with the door, the arduino and the battery can be in the compartment under the solarpanel
will this be enough power to run a stepper motor 2 times a day?
Why not put a button that activates the unlocking mechanism, but works only when the light level is high enough. That way you need to unlock it only once, and when needed and not lock and unlock it twice a day whether necessary or not. It would significantly reduce power requirements.
would that be a flip switch then? so that the person opening it will have to close it after he/she is finnished signing the log.
Or just a button that needs to be held down?
anyone that can recomend hardware setup for this project?
Interesting concept, haven't heard of a Geocache.
Normally geocahes is a lock`n lock or simular box hidden somewhere around the world, on coordinates posted on www.geocaching.com.
We have been hunting them for a few years now, and also put out around 100 boxes.
now I want to make something noone have seen before
You want the box to be for multiple uses? When one person finds it he/she leaves it at the same place?
In that case I wouldn't go for a flip switch because that way you depend too much on the person that tries to open it. I'd use a push button that unlocks the box, and a microswitch that detects when the lid has been closed so that the box can be locked once again and only when the lid is closed.
Multiple users is correct
The pushbutton and door switch was a very good input
Can I use the pushbutton to wake the arduino aswell, to save power? push the button and it wakes utill door is closed, or a max time of 15 minutes...
Sure, why not?
Interrupt should do it.
When the button is pushed the light level is checked, if it is withing certain parameters the box is unlocked, if not, it goes back to sleep.
now I just have to pick the parts needed and learn to program....
Any suggestions what to buy?
A starter pack from ebay? then build from there, or should i buy exactly what I need for this project piece by piece?
How much current is the arduino pulling? (I should probably use the search function for this )
Have you run this idea past your local friendly geocaching reviewer to make sure it will be approved before going to too much effort? If somebody around here found an abandoned tupperware box with a solar cell on it the bomb squad would be arriving pretty shortly.
I know what tou think
Luckily I think that if you put it in a non urban enviroment and put clearly visible information and contact info on the box, you will save the police from such calls...
The reviewers are of course going to be informed before its going out in the nature
I guess that when I get it to work, I can change the arduino with a homemade printcard with the atmega328p chip to keep power consumption and price down?
Well, if all you need is a sensor and a motor control, a single ATtiny chip should be enough.
Maybe im over complication things??
if I use a attiny 85 with a ligth dependent resistor and a motor control for the servo, The battery will probably last long enough without the charging?
Then I dont need to buy the solarpanel or the charging controller.....
The start of the code:
starting with an explanation of how I want it to work....
//mission is to use the servo as a lock on a box.
//the servo should only be able to open the lock when the LDR AND a pusbutton is active.
// when sun is shining + a person pushes the button.
// when the lid is closed a micro swith should trigger the signal to reset the servo to start position
//permission to activate servo :
//Digital input from door-microswitch (closed) HIGH
//LDR should be letting approx 4?volts passed on analog input
//digital input from pushbutton HIGH
// when servo opens initiate lock 10 minutes delay
//Permission to reset servo :
// microswitch closed
Is this going to be realistic?
I will then need 2 digital and 1 analog inputs, and one ? output for the servo.
I also see that this topic has some code that is usable, just needs a bit of tweeking.
You need one PMW pin for the servo and one analog input pin for the LDR.
Push button and microswitch will have to fight for the other two pins. (Or you could put them both on the remaining analog in pin, but hooked up in parallel each with a different resistor so that you can tell if the button is pushed, the microswitch is toggled, or both are messed with). That would leave you with one more PMW pin for something extra.
Fo servo control take a look at:
As for power consumption, I have no idea.