Introduction: Bluetooth/Gyroscope/Accelerometer Controlled Lightball (with Individual Adjustable Leds in Each Side)

Picture of Bluetooth/Gyroscope/Accelerometer Controlled Lightball (with Individual Adjustable Leds in Each Side)

Finally (nearly topically) i made my personal lightball.

(A.k.a.: Another day in the FabLab Aachen)

Each side is enlighted individually with an intelligent LED (WS2812b, on a small breadboard) behind. A micro-controller (MSP430G2553, PDIP.) can use a gyroscope/accelerometer (MPU6050, GY-521 module) to change the colors, the which can itself be controlled via bluetooth (HC-06). There is space for a compass module (HMC5883L, GY-271 module) too.

Tools required:

Laser-cutter (cutting by hand is no fun)

Hot glue gun (and a bunch of sticks for it)

Soldering iron

PCB mill (optional, a stripboard version works as well)

MSP430 launchpad (as programmer and for the micro-controller)

Material:

ca. 600*300mm acrylic for led backlight (0M200 SC)

(white) carton (seperating each side )

cables, 2.54mm connectors (female: 8, 6, 5, 3(*3), 2(*2) male: 3(*3), 2(*2)), resistor (4.7k(*2), 10k), capacitor (100nF(*7))

3* mignon cell holder for three batteries

32* WS2812B on a small board

HC-06 bluetooth module

GY-521 accelerometer/gyroscope module

(optional, unused) GY-271 compass module

Step 1: Cutting, Soldering

Picture of Cutting, Soldering

First the shapes for the sides of the ball (Football_Outside.svg) are cut out of the acrylic. Gladly i could use an lasercutter (epliog zing) in the fablab, doing that manually would be too much work.

The layout of the sides is done by another program (CutCad)

The parts for seperating each side in the inside are cut out of white carton (Football_Inside.svg) and glued together to pyramide structures (black lines are marked (folding edges), red lines are cutted).

12 pyramides with 5-edges and 20 pyramids with 6-edges are needed.

The Leds are soldered together with 3 wires between each other, connecting the voltage lines (5V and ground) and each output from one Led with the input of the next one. Mostly 5cm wire length is enough, but for first one (and maybe even the next five) longer wires are better for opening the housing for changing the batteries.

A longer wire, which leads to the first Led ends in a female 3-pin header to conenct to the microcontroller and battery.

Step 2: Construction

Picture of Construction

Now the construction can begin: Starting with a 5-edge acrylic, the next sides are connected in cycles. First fixate the sides provisoric with tape on the outside, and glue them together with a little bit hot glue. Then position the corresponding pyramid on the center of the side and later fill the gap between them with hot glue.

Ate the beginning i used instant adhesive and special acrylic glue, but the hot glue works out best.

The Leds are inserted in the small square on top of the pyramid and also fixated with hot glue. Coating the whole top layer with it will further stabilize the pyramids and isolate the solder pads. The led on the bottom should be the last led in the line (with the unconnected data output).

Working in cycles results in an simple mapping of the led line on the sides of the ball.

Don't forget to test the ball on the side, errors are easier to correct in each step now. Later everything is coated in glue and inaccessible.

Step 3: Finish Construction

Picture of Finish Construction

The top 5 6-edges and the last 5-edge will remain loose - the batterie might not last forever (almost 2A maximal current) :-).

Here, the pyramids are just glued on top of each side, and again the led on top of it.

Again, don't forget testing - but don't connect a 9V batterie to the 3V programming line, that relieved the magic smoke from my first controller version.

Step 4: Smoothing the Edges

Picture of Smoothing the Edges

Now "sandpaper" (i used a proxxon and dremel with a corundom tool first, sandpaper later for finer work) the edges to smooth them. That's was the less funniest part of the whole building process. If i would do that again, i will try to make a holder for the sides, where i can cut each bevelled side with the laser cutter: There is a certain angle between 5-edge and six-edge and also another certain angle between 6-edges, which correspond to the angle with which the edge should "sandpapered" to get a smooth connection between two tiles.

Step 5: Electronics

Picture of Electronics

The electronis uses 3 mignon cells in a row to provide 4.5V (and 3* parallel for more power), directly used as power source for the leds (instead of 5V), and 3.3V via 1117 fixed voltage regulator for the logic, buffered by the capacitors (only 100nF capacitors are used).

A MSP430G2553 is connected with the bluetooth module via RX/TX serial and to the gyroscope/accelerometer module via I2C (4.7k pullup resistor on each line) (and maybe later to a compas module). Don't forget a 10k pullup resistor on the micro-controllers reset input.

The logic input of the first Led is connected with pin 2.4 of the micro-controller, powered directly from the batterie.

Two wires can route the positive voltage to connector for a jumper one corner of the ball, to connect/disconnect the batterie power from the outside.

Step 6: Programming

Upload the Bluetooth.ino sketch on the MSP430G2553: I use a MSP430 launchpad as a programmer and the Energia-IDE. Either insert the micro-controller in the launchpad and program it there, or connect 3V, GND and the test and reset line (Spy-By-Wire-Interface) of the controller with the launchpad.

You need the WS2811Driver in the library folder - with a minor modification: The I2C connection uses pin 1.7, therefore we need to change in the ws2811.h file

#define WS2811_BITMASK BIT7

#define WS2811_PORTDIR P1DIR

#define WS2811_PORTOUT P1OUT

to

#define WS2811_BITMASK BIT4

#define WS2811_PORTDIR P2DIR

#define WS2811_PORTOUT P2OUT

Which allows to use pin 2.4.

The micro-controller expects commands like:

"I##CRGBT": Sets the led number ## (decimal value) to color red value R, green value G, blue value B (0...9)

"MRANDOMT": Random values for each led

"MACCELLT": Color change dependent on orientation (gravity vector)

"MROTATET": Color changes by gyroscope values (rotation)

"SrgbRGBT": 5edges and 6edges with different colors (rgb and RGB, each value from 0...9)

"POWER#TT": # (from 0...9) should be maximal allowed power consumation (0A...2A )

... replacing the 'T' at the end with a 'F' turns the mode of

These commands can be send e.g. from the serial window Arduino-IDE by connecting with the bluetooth module. Opening the LightballController with Processing allows to switch between the modes with a GUI.

(It searchs for serial port named "/dev/cu.HC-06-DevB" on my mac, for windows or linux other strings might be correct. Change line 38 to the correct string (all available ports are listed in the serial window below)).

Booth programs are just quick-and-dirty versions, but work well for now.

Step 7: Enjoy

Picture of Enjoy

Which means: Power up the ball and have Fun!

Comments

J05hua_H3RnaND3 (author)2015-12-10

Anyone know where I can just buy one?

PocketS4 (author)2015-11-23

Awesome project with the MSP430! May I know where you got the following files:

#include "I2Cdev.h"
#include "MPU6050.h"

for the MSP430G2553?

I'm trying to build and program a quadcopter from scratch using the same microcontroller. I already made my own electronic speed controllers so I just need the MSP430 libraries for the GY-521.

THANK YOU SO MUCH

AlexV31 (author)2015-09-16

AlexV31 (author)AlexV312015-09-16

wow

AlexV31 (author)AlexV312015-09-16

lol

AlexV31 (author)AlexV312015-09-16

XXDDDDDDD

AlexV31 (author)AlexV312015-09-16

hi tony!

AlexV31 (author)AlexV312015-09-16

(Insert Reply Here)

Build_it_Bob (author)2014-12-05

Very nice ! Excellent work and amazing result.

Thanks for sharing!

Build_it_Bob

janth (author)Build_it_Bob2014-12-08

Thanks!

mastersoncraft (author)2014-07-27

What a cool night light!

janth (author)mastersoncraft2014-07-29

Nice idea, hadn't thought about that... i could even control a alarm clock via bluetooth (turn the light as a snooze button) ^^

watchmeflyy (author)2014-07-15

Awesome!

janth (author)watchmeflyy2014-07-29

Thanks!

bohne (author)2014-07-16

great work!!! We have seen it live at dorkbot Aachen tonight.

wilgubeast (author)2014-07-15

So close to topical!

This is awesome enough that it needn't be cup-themed. Thanks for sharing (and especially for sharing the files and schematics.)

janth (author)wilgubeast2014-07-15

Thanks. It was more or less coincidal in time, the cup gave only the last kick to finish it :-)

About This Instructable

8,146views

115favorites

License:

Bio: ... found out that the FabLab Aachen has a Laser cutter and a PCB mill (and other fun stuff of course), decided to stay there for ... More »
More by janth:Color-changing Laser Cut JeweleryAcrylic Description Sheet With LEDAcrylic Rainbow Flowers
Add instructable to: