Category Archives: Bluetooth Low Energy

Minnowboard Max RFDuino Lure

rfduino-lure

This lure is still a very rough draft, but it should allow for a number of pretty cool features:

  • Bluetooth Low Energy peripheral mode
  • Programmable with Arduino IDE
  • Adds some IO, PWM, SPI, I2C to the max
  • Communicates with Max over UART

TODO:

  • Define RFduino <-> Max communication protocol
  • Create protocol library for arduino
  • Create protocol library for Max (python?  C++?)
  • Write examples

The source including kicad schematics is here: https://github.com/tripzero/max-lures/tree/master/rfduino-lure

Bluetooth Low Energy LED – Part 1: Hardware

LEDs should be taking the world by storm.  They are so far the most power efficient lighting source available.  Because they are more power efficient, they can save you money.

There are many smart LED lights out there.  The Philipps “Hue” is one where Philips has opened up their API (to registered developers).  This allows people to write custom software to take more control over their lighting.

However, there are concerns.  The Hue is a connected device.  It is on the Internet which brings in security concerns.  Aside from the security concern, maybe you want to just do your own lights?  Perhaps you just want to learn and discover how such systems work?  Maybe you have a killer feature in mind that isn’t supported by the other lights?  For all of these reasons, I have undergone an attempt to create my own Bluetooth Low Energy Smart LED.

DC Power and Solar possibilities

LEDs are DC powered.  Meaning, in order to use them in your AC-powered home, you need a AC-DC converter.  The AC-DC conversion may not itself be inefficient relative to a DC-DC stepdown converter, however, if your power comes from solar, which is also DC, it adds inefficiencies to go from DC to AC and back to DC.

If you have a solar setup, which someday I hope to have, you may want to try to convert your home lighting system to DC powered, in which case, off-the-shelf smart LEDs won’t work because they have built-in AC-DC converters.

Bluetooth Low Energy

Bluetooth Low Energy (BLE) is a new protocol incorporated into the Bluetooth 4.0 standard for low energy consumption.  It doesn’t have the speed that classic bluetooth has, but it allows for a lot lower power usage.  It’s range is also limited, but for a small house, it’s probably tolerable.  Other smart LEDs use bluetooth low energy.  Some use Zigbee, another low-power wireless technology.

I use BLE in some of my other projects, so it made sense to use it here as well.

One cool device that supports BLE is the RFDuino.

RFDuino

This device combines the programming interface of an arduino with a chip that supports BLE.  It’s API is pretty flexible allowing you to customize the UUID’s, device name and even change the transmit power the radio uses.  Best of all, in ultra low power mode it only consumes 4uA.

RGB LED

There are lots of LEDs to choose from.  I went with a 10W RGB LED that I found on Amazon.

 

10W is bright, but not too bright.  With this hardware guide, it’s also possible to use a 20W.  If you go bigger, you’ll need to find different cooling than what I talk about here.  You can also use a plain white LED of 10W or 20W.  You’ll have to calculate the resistor values yourself, but there’s help here.

Cooling

LEDs can get hot.  So cooling is necessary.  I went with the passive cooling route and picked up 5 of these on amazon for pretty cheap:

They have mounting holes for 10W or 20W LEDs and come with the screws and thermal paste.

The Circuit

We want to be able to adjust the brightness on all three color channels.  To do this, we need 3 n-channel MOSFETs and some resistors.  Here’s my circuit diagram:

blelight_revB

LEDs 1-3 represent the Red Green and Blue channels.  If you have only a single white LED, you don’t need to worry about LEDs 2 and 3 or the MOSFETs.  This circuit diagram uses the RFDuino SMD module instead of the DIP.  If you are using the DIP, you won’t need the USB programmer connections.

NOTE: All the code including the RFDuino code, android app and circuit diagrams are all open source.  I will provide links in part 2 of this guide.

NOTE 2: I’m not an electronic engineer.  I’m learning this stuff as I go and sharing what I learn.  Please feel free to correct me, my designs or even better, submit a patch!

Power

For power I use a 12V DC power supply at 3.0A.  The LED takes 12V and the RFDuino uses 3.3V.  To supply the 3.3V for the RFDuino, I use a mini buck converter that takes 12V and converts it down to 3.3V.

The Bulb

How do we house all this hardware?  Well, I designed a “bulb” using a website called “tinkercad“.  Using this website you can design simple 3D models that you can print either using online services, or with your own printer (or in my case, a friend’s printer).

The case is round so that the round heatsink fits perfectly inside it.  I printed the case using clear resin.  My first bulb did not have holes in it to breath.  So it got kinda hot inside.  This latest revision has holes to breath.  Last but not least, it has a hole at the bottom for power input (sized to fit a standard socket adapter) and a lid that fits snugly at the top.

You can copy the design I made here.

For the power socket, I ordered these on amazon:

I used clear epoxy to cement the sockets in place.

WARNING: One flaw in this design, is that it uses a standard socket, but if you plug this LED into a standard socket, bad things could happen.  The LED expects DC current.  I modified a lamp to provide DC which I cover later in this guide.

After putting everything in the bulb, I was pretty happy with the results:
2015-02-22 (1) 2015-02-22

DC Powered Lamp

As noted above, I modified a lamp input to accept DC.  This was pretty easy.  I snagged an DC Barrel adapter from amazon.com, cut some wires, attached the adapter and done!

In part 2, I’ll go over the software to get this up and running including an Android App, Linux “LED” Server and the RFDuino code.  Stay tuned!

2015-02-21