First time posting here. I'm new to arduino with very limited experience in programming or electronics, so bear with me please.
First to explain my project: Im building an automatic chicken coop door opener, triggered by light levels. and it has to run on a single 18650 battery.
To achieve that i want to use an Arduino pro mini, without power LED. Measure the light with a photoresistor coupled with a 1K resistor.
On my Uno-based prototype that i got working im using the L293D to drive the 28BYJ-48 5V Stepper motor to lift the door to the coop. But im still doubting to switch the L293D out for a MP6500 stepper driver that i had laying around (any recs on this?) The gear rate makes it perfectly capable of holding the door up after power switches off.
I want to power this with 1 or maybe 2 parallel 18650 batteries. I want to keep them charged with a Solar Cell on the roof of the coop, coupled with a TP4056 module to charge the batteries.
When its time to move the motor, i wanted to use a MOSFET to make a connection from the battery to a 3-5V DC-DC booster module that should be capable of delivering 1A (the little cheap red ones you'll find on aliexpress when you search for "5v booster". That booster module should deliver the power to drive the stepper.
I think ill probably need to add some caps between the arduino and the battery to reduce noise from the stepper?
The Arduino will do 1 measurement every 15 minutes and act on that. Between measurements he'll spend in Powerdown mode using the rocketscream low power library.
After that long piece of text, my ultimate question is: how much power do you think this build will consume, and how big would the solar panel need to be to be able to keep my battery charged and running? i was thinking a 5v 1W panel, but maybe that's overkill... the stepper will work for 30-40 seconds each day, and i don't have a clue on how to calculate power usage for that thing.
Let's make some crude guesses to paint a very rough picture.
Suppose your motor draws 2 amps for 30 seconds when it is raising or lowering the door, and draws no current when it is not doing anything. Suppose it only lifts and lowers once each per day. That would be 2 amp minutes per day. If it works at 5v then that would be 10 watt minutes per day or 0.17 watt hrs per day
Suppose your Arduino and other stuff connected to it draws 100mA all the time (24/7) also at 5v. That will be 0.5 watts for 24 hrs or 12 watt hrs per day.
Your solar panel will need to be able to provide more than that (say 20 watt hrs per day) on average in the worst winter weather when there is very little sunshine.
A 5 watt panel will only produce that output in brilliant sunshine - so guess maybe 1 watt, or even 0.5 watts on ordinary days. And in winter it might only do that for 4 or 5 hours per day giving maybe 0.5 * 5 = 2.5 watt hrs per day. That would be only 1/10th of what you need.
All these numbers are guesswork just intended to illustrate how to do the calculations. You need to use the proper numbers to get a realistic indication of what is needed. (And you need to check my maths )
Also take account of chicken sh*t on the solar panels.
My guess is that the pro mini should draw more towards 1 mA instead of 100, by using the powerdown command and only waking up once every 15 minutes to do a measurement (and act on it if necessary) and removing the power LED. Which would mean 0,08 watt hrs/day if i calculate that correctly (using 3.3v of the pro mini, not the 5v version). that + 0.17 watt hrs/day for the stepper = 0.25 watt hrs/day...
In that case 2.5 watt hrs/day would be more than sufficient, even with chicken sh*t taken into consideration... would those numbers be realistic?
ThaReaper:
In that case 2.5 watt hrs/day would be more than sufficient, even with chicken sh*t taken into consideration... would those numbers be realistic?
Sounds like it would be worth trying.
If it does not work you can always add more solar panels.
do some motor evaluation. a stepper is not very efficent in use of power.
you trade power for function.
forget all the false information about steppers using more power when no moving. your APPLICATON turns the power OFF. so your application drives the math, not the other way around.
a smaller DC gear motor would run longer, at less power, but at higher efficiencies.
also, if your door is balanced, your power needs are less.
lasty, use an RF transmitter, 433 or some such to send signals. WiFi, although more informative, is much more costly in power.
my last question... if you ran the motor during the bright day, lifted a weight, then at the prescribed hour (not by light), the very low power solenoid, releases the weight.... is it more effieient to use the electricty directly or charge the battery ?
as a note, I would have thought the chickens would go in at dusk, not just because it was cloudy.....
Indeed make sure it doesn't close the door just because you have a particularly thick cloud cover (we have that here when heavy rain comes), but really because the sun sets.
Also you have to consider a way of making sure your chickens are actually in the coop before closing the door. You don't want to have chickens locked out, or stuck in the door for that matter.
Unless your coop doors are made of construction paper, I don't think that dinky stepper is going to lift any kind of door. And since the motor is probably the biggest factor in power consideration, no one can help you figure power consumption until you get a sufficient motor.
dave-in-nj:
a smaller DC gear motor would run longer, at less power, but at higher efficiencies.
also, if your door is balanced, your power needs are less.
lasty, use an RF transmitter, 433 or some such to send signals. WiFi, although more informative, is much more costly in power.
I considered a DC motor, but i wanted to keep things simple. a Stepper could lower and raise the door an exact number of steps, and that way i shouldnt have to use endstops if i calibrate it well.
Im not using a transmitter at all. i dont see why i'd need that, and as you said: it hogs power
wvmarle:
Indeed make sure it doesn't close the door just because you have a particularly thick cloud cover (we have that here when heavy rain comes), but really because the sun sets.
Also you have to consider a way of making sure your chickens are actually in the coop before closing the door. You don't want to have chickens locked out, or stuck in the door for that matter.
My garden is very, very dark at night, so i can set the light level at which the door closes sufficiently low that the door only closes when its totally dark outside and the chickens are (supposed to be) inside the coop. I wanted to try that out first before adding more complicated stuff. A stepper also moves slow enough not to get a chicken stuck under the closing door.
INTP:
Unless your coop doors are made of construction paper, I don't think that dinky stepper is going to lift any kind of door.
i tested it, and it was able to lift up (and hold after power shut off) a 2kg (4lbs) door. Thanks to the internal gearbox that puny stepper produces some surprising torque.
ThaReaper:
I considered a DC motor, but i wanted to keep things simple. a Stepper could lower and raise the door an exact number of steps, and that way i shouldnt have to use endstops if i calibrate it well.
How can you know at which position the stepper is upon startup? Or what if the stepper misses some steps occasionally?
You may consider using a servo, they're much more power efficient than steppers, and have absolute positioning. It's quite straightforward to slow down the movement using software, to the speed you want (the inertia of the door also slows it down, but unlike a stepper you always know where you are as there are no steps to be missed).
A counterweight (or spring) on the door is also a good idea, then your motor doesn't have to work so hard to open/close the door. That's another serious option for power saving, even though the movement is only 2x 10 seconds or so a day, especially when done with a stepper it may take as much power as the Arduino uses the rest of the day.
wvmarle:
How can you know at which position the stepper is upon startup? Or what if the stepper misses some steps occasionally?
I want to position the door myself in the closed position when i start the arduino for the first time. Its the easiest position to start from and replicate everytime i would change something
You may consider using a servo...
I just don't see how i could fully open or close a door with a servo unless i make a huge lever...? am i missing something here, bacause a huge lever would result in much more force needed to be used.
I'm still trying to figure out how to handle missed stepper-steps. i was just hoping that those could be avoided or minimized with a decent setup.
A counterweight (or spring) on the door is also a good idea
thats a good sugestion indeed. adding counterweights shouldn't be too hard.
jremington:
This is an idiotic requirement:
could you explain why? I have some LG HE4 18650 batteries that are capable of 20+A drain, and the capacity of a 18650 should also be sufficient. where do you see the problem of using a single 18650?
and i'm asking this because before measuring because i'm still building the coop, and would like to order all parts so that i don't have to wait for it later. i'm simply not able to build the complete setup at this point to test and measure.
would like to order all parts so that i don't have to wait for it later.
Same problem, completely unreasonable requirement.
You will end up ordering the wrong parts, and have to buy new ones, wasting both time and money.
No one here has any idea about your construction skills, and cannot advise you on how well the mechanism you eventually cobble together will work. Therefore, it is impossible at this point to estimate power requirements.
But it is possible to point out the well understood fact that steppers are far more inefficient and power hungry than brushed DC motors.
Don't be discouraged, we see this all the time on the forum. Beginners very often put the cart before the horse and start by ordering parts, before they know what the project actually requires.
Fair point. my construction skills are kinda... basic... ill keep other kind of motors in mind and do some testing. for the moment i'll assume a 1W 5V solar panel will be enough to keep my battery topped up and order that. i'll adjust it as i go.
ThaReaper:
I just don't see how i could fully open or close a door with a servo unless i make a huge lever...? am i missing something here, bacause a huge lever would result in much more force needed to be used.
How is a servo in that respect different from a stepper?
wvmarle:
How is a servo in that respect different from a stepper?
correct me if i'm wrong, but isn't a servo limited to "swerving" motions, whereas a stepper is able to rotate, and wind up a door?
The door that i'm going to use isn't one that rotates open, but has to be lifted op. i cant see how a servo would be able to lift a door 60 cm in the air.
wvmarle:
That's what happens when you leave details out. I assumed a rotating door.
from my initial post:
On my Uno-based prototype that i got working im using the L293D to drive the 28BYJ-48 5V Stepper motor to lift the door to the coop....
...The gear rate makes it perfectly capable of holding the door up after power switches off.
I thought that was clear, but i understand the confusion. It was a wall of text and those details are easily lost