RFduino port expander
We have created a port expander for the RFduino, with the eventual goal of adding 8 more I/O's to the RFduino. We selected the MCP23008 because Adafruit has an Arduino library for it, but it turns out that the library isn't directly comparable with RFduino. I am sure the changes required are minor but I decided to do a simple tutorial on writing to this port expander directly!
This is my custom board incorporating an ATMEGA 328p MCU, lipo battery charger with USB connector for charger powering, 8MHz crystal oscillator, lipo battery powered, SPI programming header and header for a 1.8" SPI TFT display.
The device is for my "Bubba Keg", a creation made for a few friends. Essentially it is a control system for the 70oz Bubba Keg insulated mugs. It uses an ultrasonic sensor in the lid to determine quantity and a PTC thermistor in the cup to determine content temperature. For the old design I used a custom PCB that joined an Arduino Nano and 1.8" TFT display. It ran off a 9v battery and was housed in a generic enclosure. it was far more bulky than I wanted it to be. That is why I went for a SoC solution.
The display has gauges for quantity, temperature and voltage. The display also shows you calculated L/Hr consumption rate and time to empty.
Programming the ATMEGA without USB support was the challenge, but I found some tutorials on using another arduino (UNO) as an ISP (In Service Programmer). I wired the two together and used the Arduino IDE to program the chip. I was very pleased to see it working! Not having the bootloader on the chip means it starts up lightning fast and has more room for programming space. I chose 8MHz to conserve power as it was more important than performance.
Next step will be to custom design and 3D print a nice compact enclosure for it and test fit it on a mug!
Prices in US Dollars