Hi. I’m just completing my first Arduino project and am needing guidance on how to power it in the real world.
Basically, it’s a simple data logger that every 15 mins reads temperature, humidity, lux (and later UV) from sensors, gets date & time from an RTC, and writes this all to an SD card reader. I need this because we grow orchids, which are very sensitive to their environment, more so then can be accommodated by using met office data.
Currently I have this project running on a UNO and breadboard attached to my PC. I understand that to migrate it into something that can live in our shadehouse I need to buy a Nano (done), a protoboard (on order), learn to solder (working on it), buy a case and power it somehow. I’ve googled how to power a small project but either the info is not there or I’m too inexperienced to interpret it. Can anyone advise please?
Here’s some more information in case it is relevant.
There is no mains power in or near the shadehouse.
I want to run this for at least a year, to get a full set of data. I don’t mind a few gaps, say if components fail, as long as I get 90% of each season.
It samples once every 15 mins, although hourly would be ok too if that saves power.
If I have to use rechargeable batteries that’s OK but not something that I have to swap out more then once a week.
I have some SLA batteries. 12v7.2AH/20HR written on them. Various other sizes too. Can I use these?
the sensors used are just ones from a typical 37in1 kit. RTC and SD reader cost about 5bucks each so just cheapies I expect. A couple of LEDs round out the hardware.
The sensors used are probably not of outstanding accuracy but I’ve tested them and they are accurate enough for my needs.
So am I on the right track with this project or have I overlooked something, and how should I power it?
SLA batteries should be ok. However, I would not rely on the Nano's built-in regulator in case it overheats while powering the SD card. SD cards can draw quite a lot of current while writing to the card, and with 12V input, the regulator will have to turn more than half the power into heat. So I would get a DC-DC "buck" converter. A small one with even 1A output will be enough for your circuit today.
You can attach a small (<5W) 12V solar panel to the SLA to trickle charge it without needing a solar charge controller. SLA are fairly resistant to being overcharged, especially from a small panel.
A car battery can give up to 15 Volts. This is far over the spec. Your SLA probably has pinted on it: max 13.8V, which is still over the spec of the classic Nano. If you had bought a Nano Every this wouldn't have been a problem, even when using the on-board regulator to supply some other circuitry, like the sensors and the SD-card board.
Yes, great suggestion, but those buck converters are around £1/$1 each, and @thebackwardpointinggodwit already has an Uno and a Nano on order. Nano Every is about £20/$20.
...but.... don't expect to achieve the low currents shown in that guide if you are using Uno or Nano. They are not designed to achieve really low sleep power.
But with your 7.2Ah SLA batteries, you should be able to achieve at least a week's battery life.
If you will be logging every hour, or even every 15 minutes, but you have a separate buck converter powering the SD card, you will need a converter with an ENable pin so you can turn it off from the Nano, then go into deep sleep.
But you'll need some way to wake up, which probably means you need the RTC to have an alarm function. The DS3231 has that, but the DS1307 does not.
And if you have a DS3231, you can have its alarm pin control a mosfet which would completely shut down the entire circuit, not just sleep/disable.
So what RTC do you have?
The SLA battery with the right solar panel should be a good option for power.
This forum is fantastic - I wake up this morning, have a look, and so much quality advice! My problem solved.
The way forward I think is solar panel, buck converter and an SLA battery.
Whether I use a Uno or a Nano doesn’t matter to me. Size is not an issue. Power consumption is probably not if on solar recharge. The uno plus clip on shield looks like easy solution.
The low power/sleep modes sound good but I’ll avoid anything that adds complication (rank beginner here).
Another thing I’m thinking is maybe I should separate the sensors from the board, have them on a wire. That way I can put the sensors where I can get the most representative reading and the board in the driest spot away from the watering system. So that raises two more questions
Is it feasible to put the sensors on a 2 or 3 meter wire.
If I full enclose this thing so it’s waterproof does that raise any issues (maybe overheating?)
For most types of sensor, you should be ok with a 1m wire. But can't say for sure because you didn't actually tell us what they are yet. The sensors will then be exposed to the elements, how will you protect them? Obviously they need to be exposed, but most cheap sensors won't last long if they are exposed.
Nothing will be generating much heat. Sealing around cables can be difficult. You may want to use some small waterproof cable glands to fit the size of your cables. Don't put batteries inside sealed enclosures if they will be recharged in-situ.
I use these temp + humidity sensors outdoors and in greenhouse:
They contain sht21 or sht31 sensor chips or similar.
I also used these bh1750 lux sensors. They come with a small hemispherical cover which helps to diffuse the light so that the angle of the sun matters less. They also reduce the light level, so you have to calibrate them by taking measurement with and without the cover on a sunny day to find out how much light the cover filters out.
You still need to protect the sensors, though. I used a small sealed enclosure and drilled a hole in the top to fit the hemispherical cover, and super-glued the cover into the hole to seal it (the sensor board itself un-clips from the cover).
As for UV sensors, I tried using them but there are various problems. Can't find any weatherproof ones. Most clear plastic & glass filter almost all UV light out, so you can't put them behind those. I also found that the UV level always seemed to vary in proportion to the visible light level anyway, so you could estimate the UV level from that pretty well.
Thanks PaulRB. I haven’t specified what sensors I’ll be using because I got it running on cheap sensors because being my first project I wasn’t sure I would be capable of accomplishing even this modest goal. I know the ones I have won’t last long so I expect to massively upgrade them.
I’ll start investigating sensors now. Thanks for identifying those sensors for me. Any further advice from members on what temp/humid/light sensors they have found reliable will be very welcome. Reliability especially in humid environments is the key. Accuracy to scientific levels is not a requirement.
What is it that you grow in your greenhouse and what do you measure?
Mostly tomatoes, lettuce, chillis, herb and veg seedlings for planting out when it's warm enough.
Sensors measure temp, air humidity & soil moisture. Soil moisture sensor is just two ~100mm galvanised rods held apart by ~20mm by a large plugblock.
PS. On this forum, if you reply to the topic rather than replying to an individual post, or if you mention someone without putting @ in front of their name, that member doesn't necessarily get notified that you replied to them. I only noticed your reply by chance.