After deciding with which camera we go, we began to build our first Breadboard prototype.
- µC: Arduino Pro Mini 8Mhz@3.3V with MySensors OTA Bootloader
- Camera: Arducam Mini, power controlled by µC
- RF: nrf24l01+ PA/LNA
- Snapshot triggered by PIR
- IR LED lightning
- Internal and external Temperature measurement
- Battery voltage measurment
- Software: MySensors
The solar setup
Our initial solar setup for the Arduino nodes consisted of a regular 10Watt solar panel, the Steca Solsum F 6.6F solar charger, a 12V 12Ah lead-acid battery and a LM2596 switching voltage regulator to supply the 3.3V working voltage.
Later on we replaced the 10Watt panel through a 20Watt panel to get more juice out of it. Also cheap LM2596 voltage regulators weren’t probably the best choice by energy consumption and noise. We countered the noise problem later on with shielding the RF module and placing an LC-Filter in between.
The microcontroller is a pretty standard Arduino pro mini 8Mhz@3.3V china clone. The onboard voltage regulator and the LEDs are removed from the PCB in order to save energy. The standard Arduino bootloader is replaced by the MySensor OTA Bootloader. The OTA Bootloader allows you to reflash your firmware over the air on the nrf24l01+ link.
As radio we chose the nrf24l01+ pa/lna module. On the paper the nrf24l01+ pa/lna module looked like a perfect fit. It promise 2Mbps on a range of about 1000 meters, and after dirty fixes, it holds what it promise. In Tests we got a stable link on about 900 meters free line of sight. The datarate itself is limited by settings (Auto-ACK), software and Microcontroller speed. In the beginning we got about 5kb/s out of it. With the modification of the RF24 library and slight modification on the MySensors library we got about 20kb/s, which is good enough. The reason for this is processing speed limitations on the microcontroller, although there are probably still a few points that could be improved.
Switching the camera on and off + lightning
The promised energy saving methods on the Arducam mini weren’t as good as promised. Working current was about ~90mA as promised but low power current was still ~40mA, which was way to high. Placing a N-Channel MOSFET to cut GND from the cam wasn’t effective, the cam was still sourcing arround 30mA with disconnected GND. So we took the long way. Placing a P-Channel MOSFET in front of the cam, pulling the Gate high with a resistor and pulling it down, on demand, with a N-Channel MOSFET connected to the µC.
The IR-LEDs are directly powered by the 12V. 8 LEDs in a row controlled by a 2N7000 N-Channel MOSFET.
As PIR we choose the widley available and cheap HC-SR501, modificated to run on 3.3V.
Internal and external Temperature
The internal temperature of the nodes are done by the internal atmega328p thermometer. External measurement is done with a TMP36, connected to a analog input. Will probably later replaces by a ds18b20.
Battery voltage measurement
The battery voltage measurement is done directly on the arduino pro mini. To get the voltage down from 12V to a measurable level, we used a simple voltage divider.
Old picture of the breadboard prototype: