mattdsteele / side-projects

Holding space for side project ideas
0 stars 0 forks source link

Raspberry Pi Garden #14

Closed mattdsteele closed 6 years ago

mattdsteele commented 6 years ago

This is all @jmhobbs's fault.

Build something that gauges soil moisture, temperature and humidity. Hook it up to a sprinkler system/pump (for seedlings) or drip hose (outdoors)

Research:

jmhobbs commented 6 years ago

I've got two spare DHT11's you can have. I've also had lots of luck buying thermocouples and Arduino clones on AliExpress, FWIW.

mattdsteele commented 6 years ago

Just bought a boatload of sensors, so maybe we can consolidate our extras and become an artisanal Radio Shack.

mattdsteele commented 6 years ago

@jmhobbs Hey so I have questions!

How are you reading from the DHT11s? My plan was to do this all in JavaScript with Johnny-Five, but it looks like it requires a [I2C backpack]http://johnny-five.io/examples/multi-DHT11_I2C_NANO_BACKPACK/), which I don't know what that is but I'm pretty sure I don't have.

Also what db are you sending your events into? Googling around it looks like influxdb might be a fun option.

jmhobbs commented 6 years ago

No backpack for me, just a 1 wire interface. I'm reading mine with https://github.com/adafruit/DHT-sensor-library. I wrote pure Go to do it but it's very finicky for timing so it should be done in C, which is why I switched to an existing library.

I am using Influx, and it's great. Setting up influx and grafana was a piece of cake.

mattdsteele commented 6 years ago

@jmhobbs I'm using the adafruit library too; do you get intermittent temperature spikes?

image

I've got a 10k resistor hooked up, but don't know if I should just be throwing out weirdo readings?

jmhobbs commented 6 years ago

Yeah, I sometimes see way off readings. I'm rolling up readings over 5-10 seconds and averaging, I also considered keeping a circular buffer of previous readings and throwing away ones that jumped too far too fast. But yeah, I get weird reads occasionally.

screen shot 2018-03-08 at 10 34 06 am

That's one that got averaged in and still pulled things down 30 points. My thermocouple + MAX6675 reads steady as a rock though.

mattdsteele commented 6 years ago

Done and blogged.