Introduction: Evil LED Goat

Around Halloween, even the most innocent of things seem to turn evil. For example our office mascot, Goat, has started acting weird lately...

This tutorial teaches you how to make your own plush toy with LED eyes that can be controlled by an iPhone. The perfect Halloween scare!

Step 1: Get the Parts

goat-1

We will be using an Arduino compatible microcontroller called the LightBlue Bean to change the color of the LEDs. It connects to your phone over BLE and comes with an iPhone app called LightBlue that you can use to control it.

This is what you'll need:

  • One LightBlue Bean
  • A plush toy of your liking. We used this goat.
  • Two common cathode RGB LEDs (common anode also works but requires a bit of extra work)
  • Six 270-330 ohm resistors
  • A 2xAA battery holder
  • Two AA batteries
  • Wire and some heat shrink tubing
  • Basic sewing gear
  • Soldering iron
  • Wire stripper
  • Step 2: Solder the LEDs

    Connect the battery to the BAT pin on the Bean and ground. Then connect the RGB pins to pin 0-5 on the Bean with resistors in between, and the cathode to ground. Insulate with heat shrink tubing.

    goatfritzing

    goat-2

    Step 3: Perform Surgery on Goat

    Find a plush animal of your liking. Cut a hole in its abdomen and feel like a horrible human being for doing this to an innocent toy. Then feel even worse when you remove its eyes.

    goat-3goat-4

    Step 4: Put in the Electronics

    Put the LEDs, battery holder and Bean in your toy and adjust the LEDs so that they fit in the eye sockets.

    goat-5goat-6goat-7

    Sew the goat together where you put in the electronics. Also sew a bit around the eyes if the holes are too big for the LEDs. Nobody likes saggy eye sockets. That's just scary in a wrong way.

    Step 5: Install SoftPWM Library

    To be able to fade the LEDs, we will need to use a SoftPWM library. This lets you use any digital pin on the Bean as analog output. By calling the function SoftPWMSetPercent(PIN_NUMBER, BRIGHTNESS) we can go from 0-100 percent brightness. If you need help installing libraries to Arduino, check out this guide.

    Step 6: Upload Code to Bean

    Upload this code to your Bean.

    iphone6-sandbox

    Download the iOS application LightBlue, open it and connect to the Bean, click options and choose Sandbox View. Use the sliders and checkboxes to control the LEDs!

    The first slider will set how red the LED is, the second green, the third one blue and the last one sets Goat in disco mode. Nothing makes a party like that!

    Comments

    author
    Bling+the+Book made it!(author)2015-09-07

    Thanks for this tutorial. I have a couple of questions. Am I supposed to be soldering the legs of the RGB LEDs as depicted in the image in Step 2 (with Redpin1=0, Greenpin1=1, and Redpin1=2, Redpin2=3, Greenpin2=4, Bluepin2=5) or as delineated in the code?

    In the code, the pins are identified as follows:

    // The pins that the LEDs are soldered to

    #define redPin1 0

    #define redPin2 5

    #define greenPin2 1

    #define greenPin1 4

    #define bluePin2 2

    #define bluePin1 3

    Using your code and the diagram in Step 2, I haven't been able to get the common cathode RGB LEDs to light up. The code is, however, working well to control onboard RGB LED. What am I missing?

    (P.S. I have checked the connections of the RGB LEDS. I am able to blink them both in all three colors using a Blink sketch. I am using six 330 Ohm resistors and brand new AA batteries).

    author
    SparkySolar made it!(author)2014-10-24

    Thank you for your nice instructable.

    Rima

    author
    KookyKreations made it!(author)2014-10-24

    Noooooooooooooooooo! That evil goat is very very evil! Great work on the goat, even if he is evil. You gave me a big laugh today :)

    author
    seamster made it!(author)2014-10-24

    This is some mighty fine work! The video of the evil LED goat in action is the best.

    Poor, poor penguin. : (

    author
    simsalapim made it!(author)2014-10-24

    Thank you! And don't worry about Penguin, he's a pro stuntman and is doing fine!

    About This Instructable

    3,105views

    42favorites

    License:

    Bio: Creative Technologist.
    More by simsalapim:Toothbrush machineAutomatic desktop fanSmartphone controlled mood light
    Add instructable to: