Introduction: Arduino Star Map

Hi,

This is my take on MrTrick's Star map https://www.instructables.com/id/Star-Map/ with a little inspiration from qazwsx755's RGB Arduino project and of course meawert's programming advice.
I thank you all for what now adornes the wall of my living room.

After seeing MrTrick do his rather impressive array I decided to make one that would fit on the wall and not overpower the room with a little Djandco twist.

Step 1: Fibres and Prep

First of all decide your size, mine is a humble 1340 x 740 board giving an outer frame measurement of 1400 x 800.
This dictated the size of the xmas tree I would need, however one thing I forgot was that an xmas tree has a base and a lower stem which im my case did not have any fibres in :-(
I chose a 3" tree from the supplier that you can get nearly anything from: eBay @ £16.00 inc delivery.

After selecting your tree remove the outer binding ro release the fibres. I had no intention of releasing an i'ble at the time so I did not take any photo's of the stripping, all I will say is follow MrTrick's advice and try not to bend the fibres.
Also, I found the a hobby knife / scapel did the trick for me, mind you they are sharp!
Keep a handy bag for the bits you are throwing away and some tissue to mop any leaks up.

I was trying to patent my "soft raising device" but it turns out that the toilet roll already has a name :-( (and more than one use)
These are good for supporting the board while you poke the fibres through as they don't snap the fibre off if you catch the side of it.

Step 2: LED Clusters

I will skip the rest of the assembly steps and jump to where I made my personal changes.

The first change was using a crushed velvet material, this gives a very nice finish just don't pull it too tight! it can go a bit thin so you end up seing through it.
As my base board was 9mm MDF I found out the hard way that you need to drill ALL of the holes BEFORE you put the material on.
Otherwise you end up with bigger holes than you want.

When it comes time for the acrylic rods I cut them down to 6mm lengths, use a craft knife to cut the material around the hole then simply use a hammer to belt them in. Just get them flush with the front which should leave enough of a gap behind for the LED.

For the fibre optic side of life, I chose to use a cluster of LED's each one with their own resistor instead of using one large light source.
I used a 6 LED cluster mostly White but with just one Blue led. This was supposed to give a blue tint to the fibres but light doesnt seem to mix when you put them side by side, who would have thought?

These were then carefully taped to the ends of the fibre bundles. This is also very handy for finding the odd fibre that you may have missed.

Due to timing more than planning I ended up puting the fibres in place then mounting the unit into the frame work.
The frame is an ally door section that I had to wait until they had offcuts the right size. Simply mitre the corners then used a flat plate with self tapping screws to hold it in place. I then used another of my vices to hold the the main board in to the frame, good old expanding foam. You just gotta love it! Once this cures it is very solid.



Step 3: Star Placement

The LED clusters were designed to run on 12V but the Arduino likes 5V, so I used a DC - DC converter again from our local eBay supplyer £2.23 inc delivery.

I also used a standard Arduino Uno and one ULN2003A ic to amplify the outputs.

LED Clusters:
5mm White LEDs
510 Ohm resistors

Stars:
5mm LEDs
3mm LEDs
220 Ohm resistors
8 core alarm cable.

tHE 220 Ohm resistors were carefully chosen by looking in the box and seeing what I had left. If calclations are correct these should have been 100 Ohm. Frankly I was not that fussed :-)

Spend a little while stripping back the alarm wire, solder onto the LED legs and twist the pairs together.
I found that it helped to lay out all of the LEDs over the star locations then assemble the whole array before placing them on to the board.

when you are ready place the bread board in a spot and screw it in place, then run all of the stars out. Once they are in place drip some hot glue being careful not to get too much on the fibres.

Step 4: Arduino

I intended to have the odd star to flash randomly but it basically did my head in, all you end up doing is looking at the flashing one!
I split the stars into 6 sections randomly scattered across the board.
These were controled from the Arduino via the 2003A.
If I get chance I will draw up a schem but for now all I have is the Arduino code:




int three = 3;
int five = 5;
int six = 6;
int nine = 9;
int ten = 10;
int eleven = 11;
int flickerONE = 7;
int flickerTWO = 8;

int threeNow;
int fiveNow;
int sixNow;
int nineNow;
int tenNow;
int elevenNow;
int threeNew;
int fiveNew;
int sixNew;
int nineNew;
int tenNew;
int elevenNew;
int flickertONE;
int flickertTWO;

void setup ()
{
pinMode (three, OUTPUT);
pinMode (five, OUTPUT);
pinMode (six, OUTPUT);
pinMode (nine, OUTPUT);
pinMode (ten, OUTPUT);
pinMode (eleven, OUTPUT);
pinMode (flickerONE, OUTPUT);
pinMode (flickerTWO, OUTPUT);
threeNow = random(40);
fiveNow = random(40);
sixNow = random(40);
nineNow = random(40);
tenNow = random(40);
elevenNow = random(40);

threeNew = threeNow;
fiveNew = fiveNow;
sixNew = sixNow;
nineNew = nineNow;
tenNew = tenNow;
elevenNew = elevenNow;
}

#define fade(x,y) if (x>y) x--; else if (x<y) x++;

void loop()
{
analogWrite(three, threeNow);
analogWrite(five, fiveNow);
analogWrite(six, sixNow);
analogWrite(nine, nineNow);
analogWrite(ten, tenNow);
analogWrite(eleven, elevenNow);
threeNew = random(40);
fiveNew = random(40);
sixNew = random(40);
nineNew = random(40);
tenNew = random(40);
elevenNew = random(40);

while ((threeNow != threeNew) ||
  (fiveNow != fiveNew) ||
  (sixNow != sixNew) ||
  (nineNow != nineNew) ||
  (tenNow != tenNew) ||
  (elevenNow != elevenNew))
{
fade(threeNow,threeNew)
fade(fiveNow,fiveNew)
fade(sixNow,sixNew)
fade(nineNow,nineNew)
fade(tenNow,tenNew)
fade(elevenNow,elevenNew)
analogWrite(three, threeNow);
analogWrite(five, fiveNow);
analogWrite(six, sixNow);
analogWrite(nine, nineNow);
analogWrite(ten, tenNow);
analogWrite(eleven, elevenNow);

  flickertONE = random(5);
digitalWrite(flickerONE,HIGH);
delay(flickertONE);
digitalWrite(flickerONE,LOW);
delay(5-flickertONE);

  flickertTWO = random(1000);
digitalWrite(flickerTWO,HIGH);
delay(flickertTWO);
digitalWrite(flickerTWO,LOW);
delay(1000-flickertTWO);
}
}

This gives the overall effect of the stars fading in and out, they can sometimes go off altogether but then thats all part of the fun.
The Blue LED in the cluster gives the fibres a blue glow and because the whole thing is random you simply never know what you are going to get.

By the way, the whole thing pulls 310mA @ 12V DC.
Not bad!

Step 5: New Code

After watching the stars do their thing for a while I noticed that only one set seemed to dim, then the cycle time seemed wrong.
I did a bit of reading up on the Arduino code and it seems that you should only have one delay command in each sketch.
I may be wrong here and feel free to correct me but I removed the flicker sections and the whole thing seems to run smooth.
Should have took notice of meawert and his first take on this sketch!
 
https://www.instructables.com/id/Arduino-Examples-1-Make-An-RGB-Led-Randomly-Flash/step3/Program-The-Arduino-Common-Cathode/

Anyways, here comes the revised version:

It uses all of the PWM pins and I have numbered them to try and make it easier to wire up.

int three = 3;
int five = 5;
int six = 6;
int nine = 9;
int ten = 10;
int eleven = 11;

int threeNow;
int fiveNow;
int sixNow;
int nineNow;
int tenNow;
int elevenNow;
int threeNew;
int fiveNew;
int sixNew;
int nineNew;
int tenNew;
int elevenNew;

void setup ()
{
pinMode (three, OUTPUT);
pinMode (five, OUTPUT);
pinMode (six, OUTPUT);
pinMode (nine, OUTPUT);
pinMode (ten, OUTPUT);
pinMode (eleven, OUTPUT);
threeNow = random(255);
fiveNow = random(255);
sixNow = random(255);
nineNow = random(255);
tenNow = random(255);
elevenNow = random(255);

threeNew = threeNow;
fiveNew = fiveNow;
sixNew = sixNow;
nineNew = nineNow;
tenNew = tenNow;
elevenNew = elevenNow;
}

#define fade(x,y) if (x>y) x--; else if (x<y) x++;

void loop()
{
analogWrite(three, threeNow);
analogWrite(five, fiveNow);
analogWrite(six, sixNow);
analogWrite(nine, nineNow);
analogWrite(ten, tenNow);
analogWrite(eleven, elevenNow);
threeNew = random(255);
fiveNew = random(255);
sixNew = random(255);
nineNew = random(255);
tenNew = random(255);
elevenNew = random(255);

while ((threeNow != threeNew) ||
  (fiveNow != fiveNew) ||
  (sixNow != sixNew) ||
  (nineNow != nineNew) ||
  (tenNow != tenNew) ||
  (elevenNow != elevenNew))
{
fade(threeNow,threeNew)
fade(fiveNow,fiveNew)
fade(sixNow,sixNew)
fade(nineNow,nineNew)
fade(tenNow,tenNew)
fade(elevenNow,elevenNew)
analogWrite(three, threeNow);
analogWrite(five, fiveNow);
analogWrite(six, sixNow);
analogWrite(nine, nineNow);
analogWrite(ten, tenNow);
analogWrite(eleven, elevenNow);
delay(30);
}
}

Comments

author
Cometeer (author)2013-08-12

Can you post a video?

author
Djandco (author)Cometeer2013-08-13

the fade is quite slow, I did try and take a video when I first built it and I even reduced the random time in the code to try and highlight the fade, it just made it look broken!

I will have another go with my phone and will post it if it looks any good.

Kind regards

Darren

author
florinc (author)2012-01-22

This is a great project! I always wanted to build something similar, but it really is beyond my skills, time and patience.
Do you have a video of it in action?
Here is a suggestion: make smaller ones and sell them on etsy.com

author
Djandco (author)florinc2012-01-22

Thanks :-)

The fade in and out is rather subtle and takes a while to cycle, this does not make for a good video!

It has been suggested that as I used LED clusters rather than a single bulb for the fibres I should try to incorporate a rapid flicker to the cluster. This gave the illusion of movement randomly in the mini stars.
It did look good but then I kind of broke it while messing!
So, it is back to its old self without the flicker.

Honestly, this can not be beyond your skills given the things you have done!
Go on, give it a go :-)

As Doctor Pepper once said
"What's the worst that could happen?"

Kind regards

Darren

author
maewert (author)2011-11-28

Djandco,
Sure looks nice! Great job :-)

Best Wishes,
Mark

author
Djandco (author)maewert2011-11-28

I do appreciate your help not only with the original code but also with understanding the it.
The problem is I now have an urge to build more!

So you may end up with lots of requests for more help!

Can't thank you guys enough !

author
MrTrick (author)2011-11-28

Well done, it looks great!

author
Djandco (author)MrTrick2011-11-28

Thank you :-)

Everone who has seen it ends up looking for the change in brightness.
Keeps the whole family happy!

About This Instructable

15,746views

116favorites

License:

Bio: I build therefore I am.
More by Djandco:EZ-Robot Wall.EAnother board of many ping-pong ballsA quick and easy edge lit sign
Add instructable to: