Instructables
Picture of Bluetooth Weather Lamp
This was a 2 hour project I whipped up in order to learn how to use a new Bluetooth LE 4.0 module I picked up at redbearlab.com, called a BLE Mini.

I've since thought of several much simpler ways (and more dependable) to accomplish the same thing, such as simply lighting 3 LEDs behind weather icon cut-out masks instead of the whole servo thing... but again, I wanted to learn to run the servo too. So there it is.

 
Remove these adsRemove these ads by Signing Up

Step 1: The Dirty Bits

Before we dig in, a parts list, for those who like lists:

1. One Arduino "Whatever" (Uno, Mega, Leonardo, Lovitz, etc).
2. One small bread board (included in above kit)
3. One BLE Mini Bluetooth module from redbearlab.com
4. One Philips 12 volt 3 watt LED porcelain bulb
5. One small servo
6. One 12 volt power supply (at least 1 amp)
6. One lamp with shade
7. Assorted: aluminum sheet (soda can), wire, cardboard, tape, blade/scissors, zip ties

8. Lastly, you'll need an iPhone and an Apple developer account, or some other method of communicating with the Bluetooth module.

Red Bear Lab has an example app on the app store called "BLE Arduino". You can control the servo from here, but you'll likely want to modify and build your own version of the code which pulls in weather for your area. If this is too much to take on for some, I totally understand. You can just as well turn this project into a clever shadow clock or other indicator (insert imagination here).

I'd release the app I've modified onto the app store, but honestly, I'm afraid it would get poor reviews. ;)

Step 2: Down to the Wires

Picture of Down to the Wires
I'll apologize now for the poor manor in which I describe the wiring and connections. Eventually I'll learn to use some nice schematic software. Also, my wire color choices are horrible, but this was a fast prototype. I know ground should be cauliflower blue...

From my count, you'll need 9 wires. Mouse over each in the picture for a description of where they are going to end up.

Step 3: Blue Teeth, Like Violet Beauregarde. Huh?

Picture of Blue Teeth, Like Violet Beauregarde. Huh?
I don't get the title either. Moving on.

Plug the BLE Mini module into the bread board (or solder it somewhere nice if you're fancy at heart).
Connect the 4 wires as shown in the picture, please.

This Bluetooth module will be responsible for getting info from your iPhone and telling the Arduino what to do (like Dorothy told Sophia what to do). Notice it has an "RX" and a "TX" pin. These should be connected to the opposite pins on the Arduino (i.e. RX connects to TX and TX to RX). The other two wires are for power. Simple.

Step 4: Servo Me a Drinko

Now this title, I get.

The servo will be responsible for rotating the weather icon mask in front of the LED light source. The Arduino program (pasted at end of Instructable) is always listening to the Bluetooth module. When your iPhone app sends it new commands, the servo moves to a new position.

Step 5: Porcelain Wrapped in Aluminum... mmmm...

I'll chalk this one up to poor part selection (and a rushed lunch hour).

Ideally, you'll find a nice high brightness single LED, but I had to make do.
If I let all three LEDs shine on, I'd get triple silhouettes being projected into my lamp shade. Not desired. I already see double typically, so that would make sixal... what?

I bend a piece of aluminum to fit over two of the LEDs so just one does the shadow casting magic. I thought to redirect the other two to illuminate the back side of the lamp shade, but alas... I am lazy.

WARNING:
Don't use paper or plastic. While they are LEDs, they do get very hot while running, including the porcelain enclosure.

Step 6: Let There Be Light!

The 12 volt LED bulb has two pins, which happen to fit perfectly into the bread board holes! Happy day!
Plug 'er in and connect the "GND" and "VIn" wires from Arduino to it. The bulb is reversible, so the polarity doesn't matter (nice touch, Philips).

Point the light out the side of the bread board (or your fancy pants custom PCB, if that's what you're into, fancy pants).

WARNING:
Select two rows on the bread board which DO NOT connect to any other components! If you inject 12 volts into the bluetooth module or servo, you'll fry them!

Step 7: Make Yourself a Breadboard Sandwich

Take your two slices of whole grain technology and smoosh them together, back to back. The Arduino Uno sits beautifully on the small breadboard. A couple of zip ties will hold them nicely.

Step 8: Stick a servo on that sucker!

I found that my mini servo fit perfectly and snug between the pins of the Arduino, so I zip tied it there. The servo shaft should protrude past the edge of the bread board so that the shadow mask disc will clear everything comfortably.

Step 9: Get Crafty

Sketch yourself a few weathery icons and cut them out from cardboard or card stock. They should be about an inch wide each.
Cut out a disc about 3-4 inches wide and attach the masks to it (or save some hassle and just cut them out of the disc to begin with).

Mark the center of the disc and attach a servo arm to it. My servo came with a bunch of the them.

Attach the disc to the servo and align it so the LED bulb can shine through the mask icons.

Step 10: Arduinie in the Lamp

Picture of Arduinie in the Lamp
cb130703-190611-0.jpg
cb130703-190601-5.jpg
cb130703-145937-4.jpg
Attach this vile lump of wire to the lamp where a bulb would normally go. If you're fancy (you know you are), get one of those bulb socket outlet converters so you can plug the 12 volt transformer directly into the bulb socket. I did not do this because I'm not so fancy. Just kind of fancy.

Don't forget to put your shade back on!

Step 11: The iPhone App-etizer

Picture of The iPhone App-etizer
Now this is the tricky part. It's also the part where I likely lose 95% of my audience... not because you can't do it, but because it's too much trouble for a ridiculous weather lamp!

Redbearlab.com supplies an app on iTunes app store called "BLE Arduino". With this, you can manually control the servo if you want to. It's quite easy:

1. Power up the Arduino (and BLE module will power up with it)
2. Open the app and hit connect. It will automatically find the bluetooth LE 4.0 device and connect. No pairing required!
3. Set the proper pin to be a servo control slider in the app and slide away!

It's fun for about 2 minutes.

The better way:
Download the Red Bear BLE Mini iOS SDK sample apps. Modify the XCode project called "simpleControls_BLEMini" so that the slider is driven by a timer which checks on a free weather service like OpenWeatherMapAPI.

I got this working basically using another service which seemed to cut out every 5 minutes or so. I plan to get a developer key from OpenWeather and implement this correctly. But that's another Instructable, friends...

(Did I lose you?)
Cool project!

I was wanting to replicate this, but am having trouble trying to sync weather with the BLE app for iPhone. Could you provide any help?

Also, you mentioned:
"The Arduino program (pasted at end of Instructable) is always listening to the Bluetooth module."
Is there anyway you can post your Arduino code? I'm hitting a wall trying to get mine to work. Thank you :)
dnagarajan1 year ago
I get the title! :D
cool project! My BLEMini is due on my doorstep for next Wednesday and I'm gonna make this as my first project. Only quirk being I'll be using Android (luckily, I'll be getting an Android 4.3 almost magically and it supports BLE).
This perfectly illustrates the problem I have finding a use for my Arduino. That BLE module is $35. Combine that with the cost of the Arduino and the fact that you need an iOS device... I just end up doing all my projects with a RaspberryPi and a normal $6 USB dongle. It's capability is way overkill, but it's so much cheaper to use commodity hardware.
bob30301 year ago
Thanks for the info. I think I might get one of those Bluetooth devices for a project I'm working on. Thanks for posting!
Lforador1 year ago
Good idea this is awesome