Magnetic LED Hexagons

11,629

202

26

Introduction: Magnetic LED Hexagons

About: Just a uni student building fun projects to get me through.

Welcome to my "LED Hexagon" lighting project, interconnecting light up hexagons. Lately I've seen a few different versions of these lighting projects hitting the market but they all have one thing in common... the price. Each hexagon here costs just a few dollars and doesn't sacrifice on the quality or features of the ones available on the market! In addition they are highly customizable and not restricted to just my hexagon shape.

View my video here for help with setup I'll do my best to explain each part here.

Features:

  • Easy magnet connection
  • Simple easy design
  • Simple circuit
  • Customizable layout
  • Customizable led pattern
  • Low cost per hexagon

Step 1: Materials

Below I will list everything you need with the quantity per hexagon beside it.

  1. ATTINY85 - one per hexagon
  2. 10k Resistor - three per hexagon
  3. 1k Resistor - two per hexagon
  4. IC Socket - one per hexagon (this is not required but if code on the Attiny needs changing this makes it a lot easier)
  5. Ws2812B LED - twelve LED's per hexagon
  6. Neodymium magnet - eighteen per hexagon
  7. 2N3904 Transistor - Two per hexagon
  8. Proto board`
  9. 5v Power Supply - Only one required (will discuss the amp rating required further in the tutorial)
  10. Dc Female connector - Only one required
  11. Super Glue

Step 2: Tools

Not too many tools needed however you will need:

  1. A 3d printer (unless you want to create your own case)
  2. Soldering iron
  3. wire cutters
  4. wire strippers
  5. hot glue gun
  6. lab bench power supply (like this one, not required but nice for testing)

Step 3: Printing

I have uploaded my design to Thingiverse here.

The print itself is fairly simple i didn't use supports and found it worked well each time. If anybody plans on making another shape feel free to message me and I will do my best to explain what worked for me and what made me have multiple hexagons lying around the house...

Step 4: Uploading the Code

Attiny:

You want to upload Switch_LED_Hive to each Attiny

Because I was uploading and testing my code frequently I decided to make one of these for uploading code, its a nice simple tutorial on what to do and what you need. However if you just plan on using my code with no adjustments this kind of setup will do you just fine (just program all the chips whilst you have it set up).

  1. Fist go to file, preferences and in additional boards insert this URL like image above then press ok: https://raw.githubusercontent.com/damellis/attiny...
  2. Then go to file-> examples ->ArduinoISP->ArduinoISP and upload the sketch to your arduino.
  3. Next we want the Attiny running at 8mhz (may work at lower clocks however this is what I tested it at) with your Attiny connected using one of the methods above select all the settings above in the second image and press "burn boot loader"
  4. Finally we want to upload the signal switch code, simply press the upload button and you should get a message confirming the successful upload

Arduino Nano:

I recommend the use of the Fast LED library for the Arduino Nano just edit:

  • NUM_LEDS (Num of Hexagons *12)
  • DATA_PIN (The pin you have used on your Ardunino nano - 5 is default)
  • Also feel free to edit the BRIGHTNESS to any value between 0-255 255 being max

There is a great article on this library and LED strip here if you want to know more.

READ ME

I'm going to assume many of you will have the same issue as me and uploading to your arduino nano will fail when using the standard nano driver. A common problem with these seems to be the fact that these are Chinese knock offs, and use a different serial chip this causing the time out and failure during upload.

To fix first press uninstall and then press install using this program (if windows or go here to find your OS). Once done select "old boot loader" in the device menu and you should be good to upload.

Step 5: Wiring Pt One: LED's

So in order to try make this as confusion free as possible I will split the wiring into three parts, part one will be LED/Magnet setup, part two the circuit design and three will be the master hexagon.

These LED's are pretty simple themselves with just three inputs and outputs running the whole operation, because we don't want to use an entire strip of them in each hexagon I choose to cut them into pairs and place them in each corner giving a nice even coverage.

  1. Cut six pairs of LED's along their contacts
  2. Cut five of each different color of wire at 80mm long
  3. Pre tin both end of all the LED pairs
  4. Strip and solder the wires in between each of the LED pairs 5V - 5V, GND - GND, DIN - DOUT (not on the first input or last output)
  5. Next cut 6 of both the GND and 5V colour wires at 25-30mm long
  6. Now for the magnets, I found that the best technique here was to have one magnet face down on a piece of steel. Next test the other magnets against this magnet (you need nine that attract and nine that repel,for the first hexagon it doesn't matter as long as there is two groups of nine magnets face down with different poles)
  7. Scratch the surface of each of the magnets
  8. Ensure you have the magnet on a piece of metal! This prevents a large loss of magnetic force!
  9. Apply a generous amount of solder to each of your magnets (try avoid holding the soldering iron against the magnet for a long period of time)
  10. Strip and solder each of your small 5V & GND wires to the magnets. Three of each colourto each group of magnets.

Step 6: Wiring Pt 2: Circuit

Because of the design of this shape in certain layouts a hexagon can have more than one input at any time... basically this is bad for the LED's. My best solution was a simple Attiny85 circuit that reads each of the inputs and turns on or off transistors basically turning on and off transistors leaving just one signal for the next LED strip..

There are three 10k resistors connected to pins 1,2 and 3 each of these goes to 5V as well as this each one has one of the three inputs going to it.

there is two 1k resistors these go to the middle pin of the transistor.

I have included a Fritzing circuit as well as the images above to try best explain this circuit. As well as this I've made a PCB for this circuit that removes this whole step! (Tested and working!!)

From the second image IN 1, 2 and 3 are the inputs (coming from three input magnets) and Out 1,2,3 are the output (going to LED in pin).

Step 7: Wiring Pt 3: Master Hexagon

This will be the Hexagon running the light show.

Power Supply:

So when it comes to choosing a power supply you need 5V and an amperage rating that will suit your Quantity of LEDs. For me I wanted around 8-10 in Hexagons worth. If we take into account that at full brightness each LED draws about 60mA and we have 12 LEDs per shape so, 0.06*12 = 0.72 Amps so for 8 Hexagons it would be 0.72*8 = 5.76 Amps. However this is at Max brightness (this was very bright in person). I found that at around a brightness of 200 (255 is max) the LED's drew around 0.5Amps per hexagon. Meaning with 8 hexagons I would be drawing 4Amps. Because white light is not constantly running (this is the least power efficient color) a 5Amp power supply should work fine. I definitely recommend testing on a lab bench power supply if you want to optimism brightness for your power supply like I have above.

There is good theory on this here where they use 0.02Amps per LED with no repercussions. It comes down to your use and preference.

Note: Its always safer to get a power supply with a higher amperage than needed, Amps are not forced thus only used when needed and will not cause damage.

Setup

Much like every other hexagon this one needs the LED setup however it does not require the circuit to decide inputs as it will only output. I decided to put outputs on all sides except to the very bottom of the hexagon this allowed for more interesting shapes to be formed.

  • The setup is pretty easy much like the image above 5V and GND from the barrel jack going the Arduino nano and the signal pin with resistor running to the LED input.
  • The output from these LED's then run to each side of the Hex (making 5 outputs on this hexagon)

Step 8: Finishing Touches

Now for fun with hot glue! Basically I glue down the LED's, circuit and any lose wires. Glue the clear covers onto the main shell.

Annndd thats basically it!

Step 9: Final Notes

Alright guys thanks for reading my Instructable! As always leave any questions below and I will do my best to answer them. Depending on the response to this Instructable I'll try keep it updated and add anything new and any user content you guys come up with.
Please chuck me a follow it really means a lot having sunk countless hours (or months) developing this project and making this tutorial.

Colors of the Rainbow Contest

Sixth Prize in the
Colors of the Rainbow Contest

Be the First to Share

    Recommendations

    • Audio Challenge

      Audio Challenge
    • Sewing Challenge

      Sewing Challenge
    • Organization Contest

      Organization Contest

    26 Comments

    0
    reaver123
    reaver123

    5 months ago

    Would you like to update the links?
    Want to build some of them but half of the links are not available anymore. Especially guessing the size of the magnets could be a problem.

    0
    igorshinomori
    igorshinomori

    Question 7 months ago on Step 9

    Great project! Btw, will it work if i use the ATtiny13a instead of the ATtiny85?

    0
    benny.goldhagen
    benny.goldhagen

    11 months ago



    So what I have figured out,
    Input 1 goes to the LEDs?

    Where do the transistors go, and are they the right type?
    Also is there anything wrong with that schematic?

    LED Hive.png
    0
    FlawedDesign
    FlawedDesign

    Reply 10 months ago

    the two transistor outputs also go to the output, when the arduino reads each line it will therefore only send one signal through on the line.

    0
    FlawedDesign
    FlawedDesign

    Reply 10 months ago

    view image

    Updated Sch.png
    0
    Fido_Dido_69
    Fido_Dido_69

    Question 11 months ago on Step 9

    Hi Cam. Just to start off, I want to say that I have absolutely no idea what I am doing 😂
    now that we’ve cleared that up, I just want to say what a great instructable. I’ve been wanting to make something like this for some time now and your write up has given me the push to start it. I just wanted to clear something up. On the diagram Q1 & Q2 are shown as what looks like PNP transistors, yet the material list shows x2 2N3904. Should these be 2N3906 or is the diagram incorrect? I don’t want to get the wrong parts and then be wondering why it doesn’t work as I would have no clue how to trace the fault.
    On another note, after watching your video, I couldn’t help but wonder if you are from the Mother City (although, I see you are also in Oz)?
    Thanks again for a great post.

    0
    FlawedDesign
    FlawedDesign

    Answer 10 months ago

    hey there use what I have listed in materials as these will be what I have used. Mother city? I'm Australian hahha 3-1 explaination :)

    see below comment for

    0
    benny.goldhagen
    benny.goldhagen

    Answer 11 months ago

    I have used BC548 NPN in a breadboard setup, I am just stuck at how the 3 inputs become 1 output to the LED's

    0
    Julianrossi22
    Julianrossi22

    Question 11 months ago

    Hola, como va?
    Tengo unas consultas sobre la programación y el circuito de los attimy85.
    En la programación del attiny85, ¿también se le carga la del Arduino nano a continuación de los attiny? Me podras explicar que tendria q hacer?
    Y el circuito de los attiny tiene 3 entradas y 2 salidas? mi idea es hacerlo con forma de triangulos donde se conectarian 3 entradas o salidas, y por lo que entendi el circuito decide cual señal usa. tendras el circuito de como lo conectaste con los leds?

    0
    FlawedDesign
    FlawedDesign

    Answer 11 months ago

    Hola, en primer lugar, gracias por ver mi proyecto y ¡participar significa mucho!
    Para programar el attiny, use la configuración en el video proporcionado para cargar el boceto. Una vez que haya terminado con todos los attiny que necesita, puede cargar un boceto en el arduino nano (utilicé un led rápido y un efecto de arco iris para producir el efecto en el video.

    su idea para un triángulo debería funcionar con algunas modificaciones en el código y el diseño. Por ahora, solo explicaré los conceptos básicos. Los hexigones tienen 3 entradas (3 inferiores) y 3 salidas (3 superiores) que están cableadas al attiny. a partir de esto, el attiny lee las señales de entrada al inicio y decide si dejar los transistores apagados o uno de los dos encendidos. dependiendo de si hay señal. Con la increíble cantidad de apoyo, planeo reelaborar este instructivo después de los exámenes la próxima semana, así que no dude en hacer preguntas ahora :)
    Siga por más

    0
    Julianrossi22
    Julianrossi22

    Reply 11 months ago

    Cual es la configuración del video? Lo que yo quiero saber es que en una parte de la programación switch_led_hive.ino al final dice que hay qur cargar la programación de nuestro arduino nano. Y yo no entiendo eso, significa que al attiny también le cargamos la programación del arduino nano?

    0
    Julianrossi22
    Julianrossi22

    Reply 11 months ago

    Muchas gracias por responder, lo que yo quiero saber es teniendo 3 imanes que sean las señales si el attiny puede decidir cual va a ser entrada y cual salida, o ya tendria q saber yo cual es la entrada si o si?

    0
    stulofty
    stulofty

    Question 1 year ago

    love your instruct can pixel rings be used instead of the single led's

    0
    FlawedDesign
    FlawedDesign

    Answer 1 year ago

    Hey there sorry for the late reply, dont see why you couldnt use pixel rings

    0
    MaraCreates
    MaraCreates

    2 years ago

    Wow, great tutorial, thank you so much for taking the time and sharing your instructions!

    0
    wither0807
    wither0807

    2 years ago

    Your light modules are amazing! What tool did you use to melt the wires to the components?

    0
    FlawedDesign
    FlawedDesign

    Reply 2 years ago

    Thanks so much means a lot! Umm a little unsure what you mean but I used a soldering iron to solder all the components together

    0
    alcurb
    alcurb

    2 years ago

    Nice project.

    I always wanted to buy a few Nanoleaf kits, but they are prohibitively expensive and your solution is far more cost efficient.

    One thing I noticed, in your pictures of the lit hexagons, that there are 'hot spots' where the LEDs are located. I'm not sure if one would be able to notice that when looking at it directly. Seems that one would, especially when the brightness is turned down. Is there a way to mitigate the hot spots so that the light is spread evenly across the surface?

    Here's an idea, LCD screens that are edge-lit as most are, have a film that evenly disperses the light across the entire surface of the screen. Maybe that is something that could be exploited for this project. To reduce cost, find an electronics junk recycler and buy up a bunch of non-working monitors to harvest the special film. Then the film can be cut to shape and applied to the interior of the hexagons.

    0
    FlawedDesign
    FlawedDesign

    Reply 2 years ago

    Hey thanks for the post! So the real solution here is... well nothing. Unfortunately for me and my videos and photos I had to use my phone camera and whilst it's not bad it created these bright spots ... I tried to minimise this keeping the brightness as low as possible also creating less light flow.
    However if you were worried you could diffuse the light more with a different infill on the clear part or add paper as I've seen that diffuse very well. Or even add more leds