RBG 3D Printed Moon Controlled With Blynk (iPhone or Android)

by henkol1 in Circuits > Arduino

1981 Views, 28 Favorites, 0 Comments

RBG 3D Printed Moon Controlled With Blynk (iPhone or Android)

IMG_0644.JPG
IMG_0647.JPG
IMG_0646.JPG
IMG_0648.JPG

This is a 3D printed moon with a stand. Built with a RGB LED strip of 20 leds connected to a arduino uno and programmed to be controlled with blynk. The arduino is then possible to control via the app from blynk on iPhone or Android.

Parts and Tools:

IMG_0624.JPG
IMG_0625.JPG
IMG_0633.JPG

1x - ws2812b LED strip, i used a 1m 30led strip and cut out 20 leds for this.

1x - 3D printed moon, link to download from thingiverse: https://www.thingiverse.com/thing:2531838

1x - 3D printed moon stand, link from thingiverse: https://www.thingiverse.com/thing:2672538

1x - 3D printed LED strip holder, self made download the added zip file to get the file. You need to scale it to 1000%!

1x - arduino uno + cable

1x computer with network

Building Process:

IMG_0626.JPG
IMG_0627.JPG
IMG_0628.JPG
IMG_0629.JPG
IMG_0630.JPG
IMG_0631.JPG
IMG_0632.JPG
IMG_0634.JPG
IMG_0635.JPG
IMG_0636.JPG
IMG_0637.JPG
IMG_0638.JPG

I started by putting tape on the led strip and attaching it to the led strip holder. Make sure to not cover any of the lights and also use non conductive tape when you attach it to the roll.

To make the stand for the moon more sturdy, I used some double sided tape and put some pressure for a few seconds and they held very well together.

The led strip with the led roll holder was put on top of the stand, I pushed the cables from led strip through the stand and connected it to the arduino. I also used some double sided tape to hold it in place.

How the cables are connected:

- Black cable to ground(gnd)

- Red cable to 5v from the arduino

- Green cable to pin 8, the code from the zip file will also use pin 8 + 20 leds.

I did not use any external power supply so i lowered the brightness used to the leds.

The arduino uno is a little big for this stand so i had to pull out the bottom layer on the stand and set the whole stand over a little box with some room underneath the moon.

I just put the moon over the roll, so it is possible to just lift up if that would ever be necessary.

Progamming Arduino + Blynk App:

cmd1.PNG
cmd2.PNG
IMG_0639.PNG
IMG_0640.PNG
IMG_0641.PNG

The program is mostly taken from blynk example page: https://examples.blynk.cc/?board=Arduino%20Uno&shield=Serial%20or%20USB&example=GettingStarted%2FBlynkBlink

I used the zebra RGB control and a slider to set the brightness.

When you have set your auth code and uploaded the code onto the arduino, then you can start cmd if your on windows or Terminal on mac or linux link to a guide here: https://www.youtube.com/watch?v=fgzvoan_3_w

Code:

<p>#include <br>#include 
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YOUR CODE HERE"; //set your code from the blynk app here
Adafruit_NeoPixel strip = Adafruit_NeoPixel(20, 8, NEO_GRB + NEO_KHZ800); // the 20 is for number of leds, 8 in the pin used at the arduino board
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  if (WheelPos < 85) {
    return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  } else if (WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else {
    WheelPos -= 170;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
}
BLYNK_WRITE(V2){
  int brightness = param.asInt();
  
  strip.setBrightness(brightness);
}
BLYNK_WRITE(V1)
{
  int shift = param.asInt();
  for (int i = 0; i < strip.numPixels(); i++)
  {
    strip.setPixelColor(i, Wheel(shift & 255));
    // OR: strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + shift) & 255));
  }
  strip.show();
}
void setup()
{
  // Debug console
  // Blynk will work through Serial
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
  strip.begin();
  strip.show();
}
void loop()
{
  Blynk.run();
}</p>

Final Pictures:

IMG_0642.JPG
IMG_0646.JPG
IMG_0647.JPG
IMG_0648.JPG

You can now control the color and the brightness of the moon with your phone. Also you see a much more detailed moon with the yellow/white lights on a lower brightness. But the colors look really good on the 3D printed moon.

Hope this helped somebody :)