The Plan

I’ve been working on the plan, or what passes as a plan for the soil sensor. Right now it looks something like this.

the plan

I don’t know if it will work yet, I’m not really clever enough to work through the numbers, but I’ve ordered all the components, so they should trickle in over the next few weeks from china. While several people have mentioned that trickle charging lithium cells is a really bad idea, I’m hoping that two layers of protection firstly within the 18650 cell and then on the TP4065 charging board will cut down the risk of explosions and fire to a manageable level. The 5v Solar Panel has already arrived and looks to be suitable for the job, but as I’ve nothing else yet, we’ll have to wait and see.

I may yet drop an Arduino into the picture in place of the ADS1115 i2C if the ESP8266 seems to be a bit too unstable and needs supervision or an external watchdog. It never really sat well with me before, but when you think about it, you can buy a knock off pro-mini for the same price as an ESP-12 so it’s not going to break the bank.

ESP8266 Analogue input expansion

I’ve just read on the Internet of Home Things blog, a great idea for expanding the number of analogue inputs that can be read by an ESP8266.  Using an 74HC4051 CMOS analog multiplexer chip you can get 8 Analogue inputs selectable from a matrix of 3 digital inputs.  Great idea.

I’ve ordered some samples of the Maxim MAX4617CPE multiplexer to see if I can get any analog(e) joy out of it.

To be fair, A Reddit thread I just started seems to come down in favour of a separate ADC. It seems the ESP8266 only has a +/- 1v on it’s solitary ADC pin, so a i2C ADC makes sense. I’ve been pointed in the direction of this Adafruit product (ADS1015 12-BIT ADC – 4 CHANNEL) and while I love Adafruit, their shipping to the UK kills me. Luckly there seem to be some chinese clones floating about which profess to do the same job.

Suffolk Harvest

I’ve just got back from a holiday in Suffolk, where is was great to see this year’s harvest in full swing.  For an engineering geek like myself, seeing the huge Combine Harvesters running through the night was a great sight.  Even better were the large stubble fields which I took the liberty of trespassing on.  Specifically, I’ve been wanting to perform an autotune, which sees the quad throw itself around a bit so that it can tune it’s PID settings.  I managed to get it into autotune, but my batteries didn’t have the staying power to see it through to the end.  I’ve given up on the Turnigy 2200mAh 20c batts now, five out of the six that I got have puffed, and I’m not willing to use them anymore.  I think the voltage sag was taking cells down below their healthy voltage and damaging them permanently.

I’ve splashed out on some turnigy nano-techs, which depending on who you listen to are either just as bad or amazingly good.   They should be a little bit more resistant to sag and perhaps will give me enough juice to get an Autotune complete.

With the camera and gimbal in place and with the new 4000mAh battery (333g) it’s now weighing in at over 1600g.  That’s a fair weight and I’m going to be ultra cautious about flying with this config.

First taste of water…

I’ve just finished work on the prototype of the moisture sensor. As I type, it’s sitting, powered by batteries, with it’s probes in a hanging basket, sending data to my server in the cloud.

IMG_20150528_225628

Inside the large tuppaware box there is a 4xAA battery box, from a defunct string of Ikea Christmas lights. This powers the breadboard which still has an FTDI converter plugged into it, along with the ESP8266 ESP-12 in it’s freshly breadboard ready formfactor. The moisture sensor it’s self is a cheapo ebay special and very prone to all sorts of horribleness. Which is why I’ve powered it from a digital pin on the ESP-12, so I can keep it powered on for only as long as I need to.

It’s working, it’s sending data, the scale is wrong, and I don’t like Tupperware, but other than that I’m super happy with it.

DIY breakout for ESP-12

DSC_0196

I needed to prototype the soil moisture sensor on a breadboard, but as we all know, the ESP8266’s in their many different guises aren’t the most breadboard friendly modules you’ll ever come across. The secret here (for me anyway) was some tripad stripboard that I had lying around. I dropped two rows of 8pin headers into the breadboard so they were either side of the central divide, and cut a piece tripad big enough to allow the ESP-12 to sit on it, while the headers sat below. I pushed the tripad onto the top of the headers that were in the breadboard and soldered them on.

IMG_20150523_111922

IMG_20150523_113234

I then got some thin copper wire and soldered about 15mm to each contact of the ESP-12. This was fiddly, but didn’t take nearly as long as I’d thought it would. (In the photo you can see that I used a bit of White tape to protect the ESP-12 from the grip of the crocs on my helping hands.) Once soldered, I bent the wires on one side nearly 90º downwards and fanned them out a bit so they would fit through the 2.54mm spacing on the tripad. These were then soldered in place. Next, was the other side, this had to be bent a bit more aggressively, and then fanned out again to get through the holes on the triboard, and when I’d got the module sitting nearly level, I soldered these in too.

IMG_20150523_114626

I think it looks surprisingly tidy for my work, the module sits above the tripad by about 4mm suspended on rows of copper legs. It works great too. allowing for a rapid breadboard prototype to be built.

IMG_20150523_115125

More power for the ESP8266

DSC_0181

I recently powered up one of my ESP8266 ESP-01 modules to start experimenting with the ArduinoIDE build for it.  I knew that it sucks juice big time, in excess of 250mA for some operations.  I’d also been warned that the cheapo FTDI adaptors from ebay can struggle to provide enough power to satisfy it.  I wasn’t terribly surprised therefore when I started getting some really odd behaviour out of it.

I was connecting to it over the FTDI serial and trying out some AT commands.  It was responding to the basics, “AT” returned “OK”, “AT+GMR” provided the serial number, but anything more demanding than that and the module just died, the FTDI dropped out too, reseting the COM port which became very irritating, very quickly.

I’ve got some 3.3v Vregs in a TO-92 package which are a no-brainer for breadboard use, but I like to take the path less travelled. I’d Noticed that Adafruit have a really nice breakout for the ESP8266 7/12s which uses an interesting 3.3 Vreg called SPX3819M5 3-3 by Exar which come in the most stunningly unusable package, a 2mmx1mm SOT23-5 package.

My idea was to solider some thin single core wires to the neccessary pins, a plan slightly complicated by the need to bridge pins 1 and 3 (Vcc and EN) while leaving Pin 2 (GND) unencumbered.

I’m pleased to say I was able to nail it on the first attempt, and now I have a rock solid 500mA 3.3v supply to feed the beast that is the ESP.

DSC_0212