Now the weather has turned cold my automatic chicken hut door has stopped working properly, I’ve been trying to find a solution but not managed to make any progress, any chance you can offer a suggestion.
Mechanically Its very simple, a modified servo with a winch drum is pulling a guillotine type door open using a string / thread.
Electrically it has:-
• Arduino Uno clone, a hobby components Uno plus.
• BH1750 light sensor connected to the I2C
• 3231 clock module, also on the I2C bus. This is used to stop the door opening before 7:20 in the morning and recording the time the door opens and closes. This is keeping time well even when the door is not operating correctly.
• 18B20 temperature sensor,
• Micro SD card to store the door opening and closing times and the temperature.
• TB6612 motor driver; to supply the servo motor.
• 2 Hall effect switches; think these are A3144’s, to detect the door state, open or closed.
• Raspberry Pi PSU
all the parts are soldered onto a prototype shield. (its not on breadboard)
It has worked fine through the summer and autumn. From looking at the data on the SD card it looks like everything works great down to about 8°. If it drops below this during the night, I think the Arduino continues to run ok. In the morning, when the light level reaches the point where the door should open the watchdog timer times out and the Arduino reboots and keeps doing so until the temperature reaches about 9°; at this point it will work ok until it gets cold again.
An earlier version using a 1307 clock, LDR and reed switches is suffering the same problems.
I’ve copied the code for information. This is my first Arduino project so sure it won’t be written very well. The better bits are probably bits I’ve found on the internet. A CSV file with data from this year is also attached.
I am very grateful for any suggestions / help you can offer.
With those parameters, the power supply is the first thing to test, and not a voltage test, but how much current will it supply at the low temperature.
Coupled with what @Paul_KD7HB has said if the cold causes increased friction in the moving parts the motor will be trying to draw an increased current.
If the Arduino is resetting my first assumption would be that the voltage is falling too low for it to work properly.
It is 8° centrigrade. This is not very cold. My testing is currently done in the Conservatory, its currently dropping to about 2° during the night.
I thought the Raspberry PI PSU was of a decent quality, but maybe not. I kept away from batterys as I'm aware performance falls away as the temperature drops and don't think my daughter will remember to charge it regularly. I'll try a 3 cell lipo & watt meter as a test, it will have to wait until the weekend as I'm now working away from home.
Agreed - most likely related to your power supply.
Moisture is another suspect. Dropping temperatures may mean you drop below the dew point. That can be pretty bad for electronics. The recovery at higher temperature is not very consistent with moisture issues, though.
I doubt you're using a servo as the parts list doesn't add up. A TB6612 is an H-bridge, used to control a brushed DC motor. Servos (and many BLDC motors) don't behave well when the polarity is reversed - and may very well be dead after trying this.
The 3 cell lipo (11 volt) I fitted made the motor run too fast; it over ran the reed switch . It took me a little while to sort a two cell battery (7.0 volts) and by this time the weather turned quite mild. It dropped to 1.5° last night so back on test......
You were all spot on, its worked fine!!!!
Raspberry Pi PSU is now in the bin...... Just got to sort a different power supply.
Sorry I didn't explain everything very clearly. The servo is a radio control sail winch with the amplifier removed; its DC motor is connected straight to the H bridge. I did think about moisture and coated both PCB's with conformal coating a while ago.