Sunrise and sunset

Measured day rise and set times
Measured day rise and set times

So the weekend mini-project was to read out the light sensor (an LDR with a 10k resistor in series) at one of the outdoor wireless thermometers that sends its measurements every so many minutes to the router. And from this we can get the rise and set times which are plotted. The jumps are the transitions from daylight savings time. The other thing you see is that the point of earliest sunset and latest sunrise do not match. This is related to your position on Earth, the orbital parameters of the Earth’s orbit and the obliquity of the rotation axis relative to the ecliptic. In principle you could try to estimate where I live from this data, the times are local, the only thing you need to know is that it is somewhere in our GMT+1 winter timezone. The scatter in the plot is caused by the way sunlight projects into the sensor, the LDR sees the northeasterly skies and during sunset it observes the shadow of the house, while at sunrise there are some trees in the garden.

Last update: 19-4-2015

Advertisements

Wireless piezoelectric pressure sensor

I got his sensor at Maplin two years ago in the UK (there are no Maplin shop in the Netherlands) but did not look at it for a while, until I had some time to have a look at it this Easter.

15 - 1
This is what piezoelectric pressure sensors look like, apply a bit of force and you can see the output on a multimeter. Squeeze them harder and even high voltages are generated. Source: this comes from the internet.

Mount the sensor somewhere under a laminate floor or a doorstep (I gave it a small 3D printed pillbox to somewhat protect it). But as soon as you do this then the signal becomes really small, furthermore there is a cable generating noise between the piezo electric sensor and the rest of the project, in other words, you need to condition the signal. Eventually I empirically designed this (all comments are welcomed):

15 - 2
Signal conditioning for the piezoelectric sensor output, you definitely want to put a 1 mega Ohm resistor at the end of the cable coming from the sensor, and also you want to protect your op amp with two zener diodes. This goes in a charge amplifier, the RC time at A is 10 milliseconds which is ok (I thought), the gain is 100, then there is a peak detector with a RC time of 2.2 milliseconds (B). The gain in the second step is 1000, and in the end I take 1/4 th of the LM358 output, this part goes into the ADC of an Arduino with a radio modem. As long as VCC stays under 12 Volt or so we won’t kill the ADC. In the Arduino software you do a bit of threshold detection based on the pulse characteristics, when this detects a motion string goes to the router.

Finally you put everything in a 3D printed case, this was my 2015 Easter vacation project. On the router at the PC you get to see when someone passes the sensor.

So this is what it looks like, 3D printers are good for designing boxes, I still drill the holes that mount the green opamp board, the motino is clampedto the edge, this saves space in the box.
So this is what it looks like, 3D printers are good for designing boxes, I still drill the holes for the PCB with the opamp (rather than that you design them in the CAD software). The motino board is clamped to the edge, at the bottom end there is a connector for a 9 volt adapter, and the wires sticking out to the left go to the sensor.

And here are two screen shots for the case and the pillbox to protect the pressure sensor. All made in google sketchup which the best free CAD software there is in my opinion.

Pillbox for the pressure sensor, the smaller part of the sensor is the sensitive part, and this has to face down on the support in the left part, cyanoacrylate keeps the lid on the pillbox
Pillbox for the pressure sensor, the smaller part of the sensor is the sensitive part, and this has to face down on the middle support on the left, the right one is the lid, the opening is just large enough for both wires, and cyanoacrylate keeps both parts together
box for the pressure sensor signal conditioner and the radiomodem
Box for the pressure sensor signal conditioner and the arduino radiomodem, the moteino fits in the slit on the left, the lid on the right clicks on the box and keeps the dust away.

Last update: 11-april-2015