On my last post I introduced the IPON project, and today I’m sharing the implementation of Phase 0 of this project. (You may want to refer to the previous post if you haven’t yet read it, as this post will probably make much more sense if you know what the IPON project is about).
In Phase 0 I have the complete circuit and sketch that make up Phase 1, except the circuit is not yet implanted in the plush object. It’s just a rough prototype to make sure things work before I go about
murdering cutting up a dear plush companion.
Want to skip straight to materials and code? Jump to bill of materials | Jump to Arduino sketch
Input and Output
The sensors and actuators used with the plush object so far are:
- LDR (light dependent resistor/light sensor)
- Tilt switch/sensor
- Sound sensor (piezo element)
- FSR (force sensitive resistor/force sensor)
- 2 RGB LEDs
- Vibrating motor
Here’s a picture of the complete circuit setup:
The behavior of the plush object at this point is as follows (I may change this in the future to make things more interesting).
- If noise is detected, the plush object’s eyes will blink red. That is, if activity is detected on the piezo element, the LEDs will blink red.
- If it turns dark, the eyes will blink alternating two colors, I chose aqua and pink. That is, if thelight sensor records a value that implies it is dark (it needs to be calibrated, see the sketch for the test code), the LEDs will blink alternating between aqua and pink.
- If the plush object is turned upside down, the eyes will blink purple, and a sound scale is played (sort of a complaint from the plush object)… That is, if the tilt switch is engaged (mercury touching the contacts), the LEDs will blink purple and the speaker will play certain tones for a certain duration.
- If its nose is squeezed, the plush object will shake, and then play some random sounds (a more enthusiastic complaint)… That is, if theforce sensor is pressed, thevibrating motor is activated, and then the speaker will play random tones for a certain duration.
The components are wired as the Fritzing diagram below shows:
- LDR: one lead to VCC other to Arduino pin using pull-down resistor (10K Ohm)
- Tilt switch: one lead to VCC other to Arduino pin using pull-down resistor (10K Ohm)
- Sound sensor: positive to VCC, negative to GND, signal to Arduino pin using pull-up resistor (10K Ohm)
- FSR: one lead to VCC other to Arduino pin using pull-down resistor (10K Ohm)
- 2 RGB LEDs: common cathode lead to GND, R, G and B leads to Arduino pins, but check the datasheet to see if your LED is common cathode or common anode, if the latter, common anode lead to VCC (R resistor: 150 Ohm, G and B resistors: 100 Ohm)
- Speaker: negative lead to GND, positive lead to Arduino pin
- Vibrating motor: connected according to Lilypad vibeboard datasheet, see picture to the right (diode: 1N4001; resistor: 33 Ohm).
I soldered all the components to longer wires to make it easy for implantation later. When doing so I cover the connections withheat shring tubing for insulation. Here are close up pictures of such connections.
Note that I also soldered the resistors straight to the LED wires. (Make sure you have the correct lead for the correct resistor value, i.e. 150 Ohm to Red lead, and 100 Ohm to Green and Blue leads).
- USB cable
- FTDI adapter
- Jumper wires
- Heat shrink tubing
- 2 RGB LEDs
- Vibrating motor
- Tilt switch
- Force sensor
- Sound sensor
- 1 1N4001 diode
- 4 100 Ohm resistors
- 2 150 Ohm resistors
- 1 33 Ohm resistor
- 4 10K Ohm resistors
Here’s a video of Phase 0 of the IPON project in action: