From WiFridge to WeIOFridge

Now that I have my WeIO, I thought I could try to “migrate” my WiFridge (which already worked on an Arduino UNO + WiFly board and an Arduino UNO + Adafruit’s CC3000 shield)

I tried to use a WiDo from DFRobots but it it based on an Arduino Leonardo and the bootloader being larger than for an Adruino Uno, I can’t get my program to fit in memory ! I’ll try a bit later to either get my code lighter or remove the bootloader and program the chip directly.

So for now, I’ll just try to leverage WeIO power to get a new version of my WiFridge : the WeIOFridge !

I had first to connect 2 DS18B20 which are going into the fridge and freezer. But there is no direct support for it so I used a workaround described here : use the UART to “simulate” 1-wire protocol. At the time of writing, a new version of WeIO software should be out in a few days which is including all necessary librairies and a little helper to simplify the use of DS18B20 on UART port.

Then, I tried to connect a DHT22 for kitchen temperature and humidity… and got some troubles. But thanks to the help of WeIO team (see posts here and here), we finally managed to get it working. As for DS18B20, update for this will be included in next WeIO software which should be out soon.

And after a bit of coding

  • in Python for the server side : reading data from the sensors, and sending them to a private emoncms web site and any connected Web client
  • in JavaScript for a nice Web UI displaying instantaneous data

I now have this :

WeIOFridge UI & Emoncms

I am now stabilizing my code (still a few glitches…) and in a next post, I’ll describe the hardware connections and associated programs.

 

New WiFridge based on Adafruit CC3000 Wifi shield

Because I could no get a stable WiFridge (see here, here and here for details on my first version of WiFridge) using RN-XV Wifly module, I decided to give a try to the new Adafruit CC3000 Wifi shield.

By the way, I made a mistake when I ordered the shield (although it is quite clear on Adafruit’s web site…) there are 2 versions :

  • one with uFL connector and then needing an additionnal antenna and adapter wire
  • one with built-in ceramic antenna

So unless you really need an external antenna, the ceramic antenna should be sufficient for most use…

Apart from Wifi module, hardware is quite similar :

  • 2 waterproof DS18B20 temperature sensors
  • 1 AM2302 sensor

Temp Probes

  • 3 3mm LEDs (green, yellow, red)
  • 3 1kΩ resistor
  • 1 10kΩ resistor
  • 1 4.7Ω resistor (AM2302 does NOT need a pullup… it is built-in !)
  • 1 Arduino Wireless shield
  • 1 RN-XV Wifly module
  •  Adafruit CC3000 Wifi shield
  • a bunch of wires

WiFridge CC3000 640x480

Connections are quite straightforward :

  • Led are connected to digital I/Os 3, 6 and 7 through 1kΩ resistors. They are used for operation status.
  • Both DS18B20 are conected to port 8 (yellow wire) and make use of a 4.7kΩ pullup resistor
  • AM2302 is conneted to port 9… no pullup required !

Code for arduino is here.

It has now been running for 1 day with no glitch… and it will hopefully continue !

2014-02-11 23_18_13-Emoncms