Category Archives: Arduino

Monotrilicht Eclipse Project

Here comes the Eclipse Project of monotrilicht Android App as promised in an earlier post.

I have taken most of the code from the Android BluetoothChat example project and adapted it to my needs to connect and talk to monotrilicht via bluetooth. The modifications include a generalization of the BluetoothChatService to BluetoothService so you may reuse it in your own application. The Android Example has already been very well documented and I have followed their pattern so you should easily understand what is going on. Just by looking at it! This is my first Android App and I am open to any suggestions and remarks whatsoever.

Here is the zipped project file.

The Arduino .pde will follow. I have to do some more beautifying : )

Bluetooth enabled monotrilicht!

This is some news from the trilight zone : )

As I have mentioned in this post before, I recently played around with my Arduino. Sparkfun Electronics has some breakout boards for Roving Networks’s Bluetooth modules. I bought the Bluetooth Mate Silver with a RN41 bluetooth module on it last year. Now its time has come to show off a little. I have attached it to the monotrilicht and voilà, bluetooth chatting with the RGB LED. Great success and really much fun. I followed the Android Developer Guide for Bluetooth and found their bluetooth example project called BluetoothChat. Hence, chatting with monotrilicht : ) I had trouble getting the Android device and the bluetooth module connect at first, but after changing the UUID to the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB and configuring the bluetooth module via hyper terminal it finally worked. It’s great fun to enter a ‘r’ or ‘b’ letter in a textfield on the phone and see the light turn red or blue, respectively. I can also change the hue value in steps by 20 around the 360° color circle by entering ‘<‘ or ‘>’. Code is currently of a hacked state and not quite beautiful to look at. I will publish it together with the Eclipse Project files in another post.

[update: you can find the eclipse project files in this post]

 

tinoffifteen tin canned LEDs

tinoffifteen will house 15 RGB LEDs inside a small tin can. It’s work in progress and will not see the light of day before November this year. But I’m so exited about it. You can’t imagine : )

The LEDs will be driven by 2 multiplexers/demultiplexers (4067BE and 4052BE). The larger one has 16 input/outputs for enabling/disabling each LED (common anode) and the smaller one is a 2×4 of which I will only use one common input and handle 3 input/outputs (aggregating red green and blue lines for all LEDs). What you see dangling around in the pictures are the 15 future anode lines already attached to 4067BE.

The HMC 5843 triple axis magnetometer breakout by Sparkfun will hopefully serve as a sensor for changing hue, saturation and brightness. I say hopefully as the device is suffering from a known capacitor problem I have not tried to solve yet. If I can’t get it to work I will have to think about some alternative controlling mechanisms… so called creative work, I guess. Just as this whole thing isn’t about creativity  ; )

monotrilicht – interfacing with Hardware

This is monotrilicht, a single RGB LED driven by an Arduino Pro Mini. It may be seen as a prototype of tinoffifteen. The monotrilicht can change its hue, saturation and brightness with one potentiometer and one single push button.

I really love to see software and hardware interacting. It’s so much fun to see things suddenly move or light up because of code. Lovely! Arduino is a very nice electronics prototyping platform that let’s you easily get involved. This is actually not my first project but it’s one of those I like most.

All sensors on one image. The pushbutton switches through 6 modes, beginning with mode 1 on power up. The potentiometer is used to adjust settings like riding on the 360° on the color wheel or the speed of animation. Between the resistor on the right and the black push button you can see an LDR (light dependent resistor aka photo-resistor). Its value balances the brightness in some modes of operation. The modes are:

  1. adjust hue
  2. adjust saturation
  3. adjust brightness
  4. switch to saved color* that was set in the previous modes
  5. animation** with manual brightness
  6. animation** with manual speed

*fixed color with no reaction on potentiometer

**animation means riding the color wheel by itself, changing its color continuously

Paul V has written a nice function to convert hue, saturation & brightness to RGB values. This function was very helpful to me so I mention it here.

Canned in a tin:

You may see monotrilicht in action in this video(link).