Other sensors
Moisture sensor
I want to measure the moisture in soil. This could be used to switch on watering for plants in pots, for instance. But I also want to measure actual soil moisture in the field.
I bought a cheap i2c capacitive moisture sensor from Cool Components for less than £10 including postage. I had to get a socket with leads too (a Grove 4 pin) as the standard Dupont cables are slightly too fat to fit in a line together. I just had to snip off a locking tab to make it fit.
To get the libraries and python program code, I followed 'Data 36' on YouTube (checkout data36.com). You also get temperature in the output.
I have an LCD screen attached to this pi, so when I am outdoors with the pi running on a battery pack, I can see the info. Neat!
Next, I have to calibrate the sensor so I know what the moisture content value is in terms of percentage water to soil. This may be soil type specific. The basic flow of data is between say 300 and 2000, just a number.
My neighbour 3D printed an enclosure/handle for the sensor to protect it. Thanks!
By taking moist soil and air drying it over a number of days to constant weight, I could calibrate the sensor. I measured the reading each day and then back calculated the moisture as % volume afterwards. I also had a Theta probe to compare it with, which works well.
Dry sandy soil gave a sensor reading of 400, and wet soil 660. But it was not a straight line: it changed slowly from 0 to 5% moisture (600 on the sensor) then soil moisture changed rapidly to 20% but the sensor only went to 660. So the sensor is not very sensitive at the point where you want it to be! But it could be used to say the soil is getting rather dry and hope your plants don't die.
The other problem is that the sensor is not waterproof so only measures the top of the soil and there may be moisture lower down in the pot/soil.
Sensor transferred to the Samosa project in December 2024.
Camera
I have a NoIR camera for the Raspberry pi 3B. I had to install the Buster operating system for it to work properly. The camera has No IR filter (hence the name) so can see in the dark but only if I have a IR source of course. I ordered one and received it. Cheap and limited range.
In the meantime, when the security light comes on from its PIR sensor, the camera records what's there. Usually cats, although we have seen a fox before. Hoping for hedgehogs again one day.
I had to enable the camera option on the pi and enable motion following 'pimylifeup' instructions. I can start and stop detection through the terminal window. Image files are stored in /motion folder and I have a screen plus keyboard+mouse to view the files. Ctl + A to select all files and right click to delete rather than putting them in trash, which accumulates.
I had an old gorilla tripod and I got the holder that goes with the camera to make a neat unit. I also got the one metre ribbon so the pi does not have to be close to the camera.
We think we have bats roosting so will try to catch them on camera when they start flying regularly later in the spring.
Old phone as a camera
An old mobile phone can be used as a camera. Download the 'Ewelink camera' app on the old phone and 'Ewelink' app on your new one. Create a free Ewelink account on their website and connect the two. The old mobile now works as a remote camera.
Fibre to Home
In December 2023, I changed Plusnet to 'fibre to the premises'. It was a quick and easy job by the Openreach engineers. They drilled a hole from the outside box by the front door into the living room, where there was a mains plug close by. With a 4-plug extension I could add various gadgets to the router like the MyEnergi Hub and the heating control hub. I have a TP Link adaptor that connects upstairs to a 4 way ethernet adaptor and hence to my PC, as well as a range of devices such as Raspberry pi, laptop, etc.
Once re-paired most systems worked fine. However, the Sonoff switches did not pair. I had a new Sonoff SV 12 volt switch that requires 2.4 GHz connection. The Plusnet Hub 2 is dual channel and this seems to interfere when 5 GHz is also available. In the router settings (192.168.1.254) I stopped the 5GHz and changed to Mode 2 (as per internet suggestions) and this allowed, eventually, the pairing to proceed. I could then reinstate 5gHz and Mode 1.
Pigeon scarer (January 2024)


Comments
Post a Comment