Neopixel Ultrasonic Reactive Picture Frame for Arduino

by Zzzophie in Circuits > Arduino

62 Views, 0 Favorites, 0 Comments

Neopixel Ultrasonic Reactive Picture Frame for Arduino

Screenshot 2024-06-28 155030.png
ITTT Neopixel testing

For this project, I have created a picture frame with a Peppa the Pig plushy that will light up and flash when you walk past it. This is for a school project about learning and using Arduino, as well as a birthday present for my young niece, who is a big fan of Peppa the Pig.

We'll be using a NeoPixel LED strip hidden behind cotton to create a soft, glowing effect, triggered by a US-020 Ultrasonic Distance Sensor connected to an Arduino Nano.

Supplies

  • Any plush toy of your liking
  • Deep picture frame (large enough to fit the plush toy)
  • NeoPixel LED strip
  • Cotton or polyester stuffing
  • US-020 Ultrasonic Distance Sensor
  • Arduino Nano with 128b
  • Power supply (appropriate for your Arduino Nano and LED strip, in my case I used the onboard power supply with USB)
  • Hot glue gun and glue sticks
  • Double-sided tape or adhesive strips
  • Thick string to secure the plush toy
  • Wires and connectors
  • Soldering iron and solder (optional)

Preparing the Picture Frame

pictureframe.png
peppa size.jpeg
  1. Select a picture frame that is large enough to accommodate the plush toy. Remove the glass or plastic front and the backing.
  2. If the frame has a mat or any other inserts, remove those as well.

Attaching the NeoPixel Strip

neopixel (1).jpeg
neopixel (2).jpeg
  1. Measure and cut the NeoPixel strip to fit around the inside perimeter of the frame.
  2. Secure the NeoPixel strip to the frame using double-sided tape or adhesive strips. Make sure the LED side is facing towards the front of the frame.
  3. Connect the NeoPixel strip to your Arduino Nano according to the manufacturer's instructions. Typically, this involves connecting the data input, ground, and power lines.

Hiding the NeoPixel Strip

Cotton.jpeg
  1. Use cotton or polyester stuffing to cover the NeoPixel strip, creating a soft, diffuse light effect.
  2. Hot glue or tape the cotton in place, ensuring it stays securely in front of the LEDs.

Installing the Ultrasonic Distance Sensor

Ultrasonic.jpeg
Schematic sketch.png
  1. Attach the US-020 Ultrasonic Distance Sensor to the bottom of the frame, pointing outward so it can detect movement in front of the frame.
  2. Connect the sensor to your Arduino Nano. This usually involves connecting the trigger, echo, ground, and power pins.

i also added the schematic to this step to show you how to attach the Neopixel led strip

Coding the Arduino Nano

  1. Write or upload the following code to your Arduino Nano to control the NeoPixel strip and ultrasonic distance sensor. The code will make the LEDs perform a red strobe effect when someone is close to the frame and turn blue when there is no one nearby.
  2. Upload the code to your Arduino Nano and test the setup to ensure the LEDs light up when you approach the frame and perform the correct effects based on the distance detected.

The code is attached to the files in this step

Downloads

Final Assembly

ITTT Neopixel testing
ITTT Light test
flashing test with Plush
  1. Place the plush toy in the center of the frame, securing it with hot glue or adhesive strips if necessary.
  2. Reattach the back of the frame, ensuring all wires and components are securely in place and hidden from view.
  3. Power up your Arduino Nano and enjoy your new plushy light-up picture frame!

in the testing i did realize that i wanted it to flash from blue to red instead of it just flashing orange, so my second iteration is the final version that does that, i did this to fit the color scheme and also to make it have more functionality.

so in this step you can see how it went from the orange lights to the blue and red!


Conclusion

This plushy picture frame is a delightful and interactive decoration that combines technology and whimsy. The combination of soft LED lighting and a beloved character creates a whimsical display that is sure to be a hit with younger kids.

I created this Arduino project as a present for my beloved little niece, not only because she loves Peppa the Pig, but because I hope to spark an interest in technology in her.

With just a few materials and some basic electronics, you can create a magical piece of art that responds to proximity.