Skull With Gradient Eyes.

by Trifle Maker in Circuits > Gadgets

176 Views, 0 Favorites, 0 Comments

Skull With Gradient Eyes.

skull-green.JPG
skull-red.JPG

While cleaning the backyard we found the skull of a little rodent. We were close from Halloween and here came the idea.

If you don't have any skull in your closet you may replace it with an old doll head or anything you want to light.

Supplies

The parts needed for this project are:

  • Featherwing M0 (featherwing).
  • 2 NeoPixel RGB leds (NeoPixels)
  • 2 mechanical switch buttons.
  • 1 VCC regulator 9/5-3.3V (Regulator).
  • 2 x 9V battery connector
  • 1 9V battery
  • 1 small wooden box
  • Screw assembly parts

The Box

P1012551.JPG

I bought a small wooden box in a hobby shop. Just need to take care of the size to be sure that all the electronic can fit inside. The wiring may require more volume than initially expected.

The modifications brought to the box are rather limited.

2 small holes for the buttons on the front.

1 bigger hole on the top of the lid for a screw that support the skull. You may also need to make it a little bit bigger to allow the led connectors go through.

In order to guarantee that the main screw that hold the skull stays vertical just glue a nut 2-3 cm higher than the bottom of the box.

Power Supply

P1012581.JPG

I used a 9V battery.

The Featherwing requires a 5V max power input so we need the VCC regulator.

The regulator can be mounted directly on the Battery. But it has a power led that turns on as soon as it is connected. In order to spare the battery life, we uses two 9V connectors connected together with an On/OFF switch inserted between them. This way we can totally power off the system.

Featherwing

P1012579.JPG

I uses a Featherwing M0 to control the 2 "eyes".

It is simply mounted on a small piece of strip-board using some stacking headers. extra headers are soldered on the side to connect the different pieces.

The pins used on the board are:

  • 11: Left eye control
  • 12: Right eye control
  • 5: Color change button

A 10 kOhm resistor has been used for the button but you can also use the INPUT_PULLUP mode of the Feartherwing.

Program

The code provided bellow is rather simple.

After the initialization phase we enter into the infinite loop that creates a gradient of color that is used for both eyes.

The switch button allows selecting either a red gradient or a green one.

You will need the Arduino IDE to upload the program on the micro-controller.

Downloads