Maker Faire 2017 – “Smart Outlet Show and Tell”

A friend of mine first told me about this event called “Maker Faire” back in 2012 and asked if I was interested in going. It looked very interesting and I thought to myself “why not!?”. That was the seminal moment that got me hooked on the Maker Movement – after the event, I got a trial membership at Techshop, took a few classes in woodworking, metal working and rapid prototyping, got my first Arduino and Raspberry Pi and have never looked back! I have been back at Maker Faire every year since, and go on both Saturday and Sunday to be able to take it all in (and still don’t get to check everything out!)!

This was the first year that I decided that I should present something at Maker Faire – and I decided to talk about this project I had been working on for the last year. Here is the excerpt from my Maker Faire 2017 submission

“BuffI the ampere slayer” is a smart outlet project that I developed for Power Integrations. In this demonstration, I will show the capabilities of the smart outlet – remote actuation, USB port, low no-load consumption, and metering data, showing various energy consumption parameters on the app.

It was a lot of fun presenting. My only regret was that preparing to present and presenting took away from my time checking everything out, but I figured it was my time to give back to the Maker community! I also wish I had gotten more than 15 minutes (my 15 minutes of fame?!) to present – there was so much to talk about!

Anyway, I hope you enjoy my presentation from Maker Faire, which my lovely wife Archana took a video of – thanks Archana! 🙂





Natural control of scale insects on your plants!

I could probably say that I am a very enthusiastic gardener, even if I couldn’t say I was an avid one! 🙂 Though I have killed an unlucky plant here or there, for the most part, I think I have done a decent job in keeping them alive!

One of our neighbors had given us a very pretty house plant – an Anthurium. (My plant doesn’t have flowers right now, so I’m using a stock photo here).


It was doing fine, until I saw the leaves covered with some sort of brown scale. Initially, there weren’t that many, and so I did not think too much about it, but pretty soon, it was more prominent.


When I realized that it was a problem was when I started seeing these scales on my curry leaf plants that were all the way across on the other side of the house!

A quick visit to Google told me that these were scale insects, and also some ways to remove/control these critters. Most involve isolating the sick plant (so that it doesn’t spread to other plants –  too late!), and scraping off the scale insects manually – a very tedious project, and you are never sure if you got all the suckers (pun intended!). Other methods include using rubbing alcohol on each individually, or using some insecticidal soap.

That’s when serendipity struck!

My curry leaf plants (that usually grow in tropical climates) were pretty slow growing in the temperate climate here, and so I decided that they needed some sun (now that summer was here), and took them outside into the garden.

Pretty soon, I saw that they were now covered with ants. “I wonder what the ants want with curry leaves”, I thought to myself. As I watched them over the next few days, I saw that the number of scales was also starting to reduce! It appeared that the ants were feasting on these scales!

And indeed, after a few days, my curry leaf plants were completely scale free. COMPLETELY!

I am now repeating that trick with the Anthurium plant. It has been sitting outside for a few days, and sure enough, the ants are back!

The scales are now far fewer on the Anthurium, and I expect it to be scale free in a few days!

Here is a photo of the work in progress – showing the scales, ants, and all! Aren’t natural solutions the best!!?!

This slideshow requires JavaScript.

I will update this post hopefully with a completely scale-free Anthurium, in a few days! Fingers crossed! 🙂

Blue skies!




Arduino Bluetooth LE Logger for TI SensorTag (and others)

Arduino Bluetooth LE Logger for TI SensorTag (and others)

Ever since I laid my hands on a TI SensorTag, I was quite fascinated. Such a small elegant package, packed full of sensors (ambient and IR temperature, humidity, barometer, gyroscope, accelerometer, compass in the version I first got – current versions sport additional sensors), and all powered by a coin cell battery that can last a year or more!

I saw that someone had used the SensorTag to collect data from an amateur rocket launch ( You had to either fly an iPhone with the rocket, or limit the data collection to at best 300 feet of flight data (the best case range for Bluetooth LE).

There are so many different scenarios under which a SensorTag can be used to collect data

  • rocket launch data of course, but also
  • Weather data like temperature, humidity and pressure changes in your garden, in your birdhouse
  • Track your G forces in flight, if you are a pilot
  • Track data for your RC plane or copter
  • And so much more!

In all of these cases, it would be great to untether the SensorTag from your smart phone – and let it collect data even when you are not there. Thus was born the Arduino Bluetooth LE Logger for TI Sensor Tag! It connects over Bluetooth LE (BLE) in master mode to the TI Sensor Tag, and turns on notifications for the characteristics you have selected (via push buttons), and starts logging the data to a microSD card, along with the timestamp, in a Comma-separated value (CSV) format, for easy importing into spreadsheets for additional processing and graphing.

Arduino Bluetooth LE Logger for TI SensorTag (and others)

Of course, the choice of hardware (Arduino) was dictated by the fact that I started hacking with an Arduino, and wanted to see what I could achieve with it (an 8 bit microcontroller with 32k sketch size (more like 30k since the bootloader takes up 2k) and 2k ram – fitting all of the functionality of the Logger into this proved to be quite a challenge).

The Arduino Bluetooth LE Logger for TI SensorTag (and others) is a compact unit (slightly bigger than the SensorTag) that is chock full of features, for logging not only SensorTag data, but also any other Bluetooth LE device, such as a Heartrate monitor, Health Thermometer, Blood Pressure, and so on, by modifying the Arduino sketch suitably.

Ok, let’s look at the various features of the Logger!

        Arduino Bluetooth LE Logger for TI SensorTag (and others)

Microcontroller – Arduino Pro Mini 3.3v (I chose this because the form factor is very small, and the fact that it is 3.3v meant that I did not need another additional voltage regulator to handle 5v to 3.3v conversions. This also enabled me to power it via a 1 cell Lipo Battery, which provides 3.7v.

Bluetooth LE – For this, I chose Bluegiga’s BLE112. The BLE112 can be used in both master and slave modes. I needed a module that would support master mode, if I was to connect to a slave (e.g. the SensorTag) and log its data. BLE112 also supports bglib, which is ported to run on Arduino ( – Thanks Jeff Rowberg!), so I can have a full featured master MCU that can connect, discover resources, turn on notifications and process data. BLE112 also provides BGScript, a custom scripting language for on-module applications – i.e. you can run your own custom logic in the BLE112, without the need for C programming or an expensive IAR compiler license).

Real Time Clock – A data logger is incomplete without a real time clock to log the time the data was collected. For this, I chose the DS1339, because it is a) tolerant of a wide range of voltages (so I could use it with the Arduino Pro Mini 3.3v), b) battery backup to maintain the date and time, c) The presence of an alarm (2 to be precise!) (so it is possible to get timed interrupts and potentially use this for low power operation of the Arduino) d) as a bonus, it also has a trickle charger (I’m not using the alarm and trickle charge functionalities, but you could!). The Logger has a coin cell battery holder for the RTC.

MicroSD card slot – The data from the SensorTag (along with timestamp from the RTC) is logged to a microSD card. I used a push-push socket so it is easy to insert and remove. The SD card slot is also oriented such that if the Logger is placed vertically in a rocket, the high G-forces from the launch will not dislodge the SD card (since it would be oriented horizontally). Similarly, the coin-cell battery holder is also oriented horizontally. The LED13 of the Arduino Pro Mini also shows SD card activity.

I have provided 3 buttons (the image above shows 4, but Rev 5 only has 3 buttons – I’ve left Digital 3 connected to the host-wakeup pin of the BLE112 module, if you want really fancy power management, and Digital 0 and 1 for uploading sketches and serial output, so I’m out of digital ports. (I could use the A6 and A7 (analog read only) pins of the Arduino Pro Mini for some additional buttons if needed) and 8 leds that you can repurpose as you wish! Currently, the 3 buttons are used to select the data to log (temperature, humidity, barometer, accelerometer, gyroscope, compass) – each button toggles a set of two features. LED 7 is used to indicate Bluetooth LE connection status, and LED 8 is used to indicate BLE module communications.

Arduino Bluetooth LE Logger for TI SensorTag (and others)

Finally, in the rear of the board, I have a JST connector for a 3.7v LiPo battery, as well as a power switch. And to make the system fully configurable and hackable, I’ve added a CC debugger connector, so you can upload different BLE112 firmware (including your own application logic written with BGScript!).

The version of the board show in the picture has a jumper wire, but Rev 5 of the board has this problem fixed and the jumper wire is no longer necessary.

Changing the Arduino sketch to connect to any other BLE device and log data would be quite trivial, and you can hack it into something else altogether, because of the all the configurability built in.

Of course, if you don’t want to hack anything, you can use it without much ado to log your SensorTag data!

-Sridhar Rajagopal