Anglerfish Motion Detector Lamp
![13F02EC6-79EC-4EFA-8C43-A43FB1608DE3.jpeg](/proxy/?url=https://content.instructables.com/FSF/NFT5/LHXFI2JY/FSFNFT5LHXFI2JY.jpg&filename=13F02EC6-79EC-4EFA-8C43-A43FB1608DE3.jpeg)
![Anglerfish](/proxy/?url=https://content.instructables.com/FOF/LW9F/LHXFJRMB/FOFLW9FLHXFJRMB.jpg&filename=Anglerfish)
Welcome to my Instructables project, where I will guide you through the process of creating a fascinating deep-sea anglerfish replica with a unique twist. This project involves incorporating two PIR (Passive Infrared) motion sensors as the fish's eyes, allowing it to detect movement in its surroundings. Based on the detected movement, the fish's lamp will change color, creating an enchanting visual effect.
The deep-sea anglerfish is a fascinating creature known for its bioluminescent lure that attracts prey in the darkness of the ocean depths. Drawing inspiration from this captivating natural adaptation, I have designed a replica that replicates the anglerfish's distinctive feature using modern technology.
By utilizing PIR motion sensors, we can simulate the anglerfish's ability to sense movement in its environment. When one sensor detects motion, the fish's lamp will emit a mesmerizing turquoise glow. If the other sensor detects movement, the lamp will illuminate in a vibrant pink hue. And when both sensors register movement simultaneously, the lamp will radiate a captivating shade of purple.
Throughout this Instructables guide, I will walk you through the step-by-step process of assembling the anglerfish replica, wiring the motion sensors, and programming the color-changing LED lamp. Whether you are an electronics enthusiast or simply curious about creating unique decorative pieces, this project is sure to provide an exciting and educational experience.
So, let's dive into the depths of this project together and create our very own deep-sea anglerfish with motion-detecting eyes. Get ready to bring a touch of the underwater world into your own space and marvel at the magical glow of this mesmerizing creature!
Supplies
Electronic components:
- Arduino uno
- 2 x PIR Motion Sensor
- WS2812 RGB LED (Adafruit NeoPixel)
- cable (4 x black, 4 x red, 3 x blue)
- circuit board
- battery Clip (with 5.5mm jack)
- 9V D battery
Housing material:
- Balloon
- wood glue
- paper
- wire (I used plant wire, 2mm and jewelry wire, 0,3mm)
- Beads
- acrylic paint (black, blue, red, glossy topcoat)
- hotglue refill sticks
- painters tape (paper based)
- black fabric
Tools:
- paintbrush
- hot glue gun
- Wire stripper
- Tongs
- Soldering Iron
- Soldering tin
- scissors
Testing
![4BF4C27B-CAB3-4929-87A3-4FEE042E33DB.jpeg](/proxy/?url=https://content.instructables.com/FLE/HARH/LHXFJQEV/FLEHARHLHXFJQEV.jpg&filename=4BF4C27B-CAB3-4929-87A3-4FEE042E33DB.jpeg)
![1491B6B7-2091-4099-9F76-6B0008D984D0.jpeg](/proxy/?url=https://content.instructables.com/FLX/09AG/LHXFJQEW/FLX09AGLHXFJQEW.jpg&filename=1491B6B7-2091-4099-9F76-6B0008D984D0.jpeg)
![EB0933FF-BDE5-47DC-AB4C-6AD31B74A630.jpeg](/proxy/?url=https://content.instructables.com/FIQ/QL9E/LHXFJQEX/FIQQL9ELHXFJQEX.jpg&filename=EB0933FF-BDE5-47DC-AB4C-6AD31B74A630.jpeg)
![Testing](/proxy/?url=https://content.instructables.com/FFN/GY8I/LHXFJRN4/FFNGY8ILHXFJRN4.jpg&filename=Testing)
During the testing phase of this project, I employed a breadboard and buttons to simulate the functionality of the motion sensors before integrating them into the final design. This approach allowed me to ensure that the basic circuitry and logic were functioning correctly before introducing the actual PIR (Passive Infrared) sensors.
Using the breadboard, I connected the buttons to the microcontroller, mimicking the input signals that would be received from the motion sensors. This setup enabled me to test and refine the code logic responsible for changing the color of the fish's lamp based on the detected movement. By pressing the buttons, I could simulate the presence of movement on either side of the fish.
Once I was satisfied with the functionality of the code and the responsiveness of the lamp to button presses, I proceeded to switch out the buttons with the actual PIR sensors. This transition allowed me to replace the manual input simulation with real-time motion detection.
During this transition, I also had to make adjustments to the sensor settings using the two sensitive "screws." Fine-tuning the sensitivity of the PIR sensors was a challenging task. These adjustments were necessary to ensure accurate motion detection and prevent false triggers. Careful calibration was required to strike the right balance and optimize the performance of the anglerfish replica.
By thoroughly testing the circuitry and code logic with the breadboard and buttons initially and then switching to the PIR sensors, I ensured the seamless integration of the motion-detecting functionality into the anglerfish replica. This iterative approach, along with the delicate sensor adjustments, allowed me to fine-tune the project and deliver an engaging and captivating experience to anyone interacting with the final product.
Building the Fish
![2EB18E92-0820-4587-8C82-E04F894C04BD.jpeg](/proxy/?url=https://content.instructables.com/FIX/X5X2/LHXFJQIX/FIXX5X2LHXFJQIX.jpg&filename=2EB18E92-0820-4587-8C82-E04F894C04BD.jpeg)
![4A994A72-01AE-40FB-AB4A-8D8CEFC79D0E.jpeg](/proxy/?url=https://content.instructables.com/FA7/HSQE/LHXFJQIY/FA7HSQELHXFJQIY.jpg&filename=4A994A72-01AE-40FB-AB4A-8D8CEFC79D0E.jpeg)
![6E0C54A0-9CC5-4EAC-ADC2-96762AB97E42.jpeg](/proxy/?url=https://content.instructables.com/FNI/OWO9/LHXFJQIZ/FNIOWO9LHXFJQIZ.jpg&filename=6E0C54A0-9CC5-4EAC-ADC2-96762AB97E42.jpeg)
![6CC866AA-59D9-449F-A54F-698547F876E7.jpeg](/proxy/?url=https://content.instructables.com/F12/C4DR/LHXFJQJ0/F12C4DRLHXFJQJ0.jpg&filename=6CC866AA-59D9-449F-A54F-698547F876E7.jpeg)
![4D58ABB5-16B6-4E98-8EA5-9EC5BAF22C57.jpeg](/proxy/?url=https://content.instructables.com/FCM/QTKI/LHXFJQJ1/FCMQTKILHXFJQJ1.jpg&filename=4D58ABB5-16B6-4E98-8EA5-9EC5BAF22C57.jpeg)
![C3D315C9-E801-4FAC-AC45-77C1F770391D.jpeg](/proxy/?url=https://content.instructables.com/FQK/IDKY/LHXFJQJ7/FQKIDKYLHXFJQJ7.jpg&filename=C3D315C9-E801-4FAC-AC45-77C1F770391D.jpeg)
![0D224535-BAC3-484E-A497-40023F52614C.jpeg](/proxy/?url=https://content.instructables.com/F3O/TD6K/LHXFJQJ2/F3OTD6KLHXFJQJ2.jpg&filename=0D224535-BAC3-484E-A497-40023F52614C.jpeg)
![D647B83E-974C-4433-84C1-9C96B132B072.jpeg](/proxy/?url=https://content.instructables.com/FA3/TW2I/LHXFJQJ5/FA3TW2ILHXFJQJ5.jpg&filename=D647B83E-974C-4433-84C1-9C96B132B072.jpeg)
![24F70EE5-E1A2-4CED-9F57-DB1EA467896C.jpeg](/proxy/?url=https://content.instructables.com/F0D/UX1Q/LHXFJQJ6/F0DUX1QLHXFJQJ6.jpg&filename=24F70EE5-E1A2-4CED-9F57-DB1EA467896C.jpeg)
![C6F95000-D6D0-4758-B6D4-1C47DAA6141C.jpeg](/proxy/?url=https://content.instructables.com/FOY/NV2F/LHXFJQJ8/FOYNV2FLHXFJQJ8.jpg&filename=C6F95000-D6D0-4758-B6D4-1C47DAA6141C.jpeg)
![DDC0D82C-02E2-4137-BF37-D551DDCC6CF1.jpeg](/proxy/?url=https://content.instructables.com/F8C/SBPZ/LHXFJQJC/F8CSBPZLHXFJQJC.jpg&filename=DDC0D82C-02E2-4137-BF37-D551DDCC6CF1.jpeg)
- Inflate the balloon to a suitable size.
- Coat the entire balloon with a thick layer of wood glue and paper, ensuring it dries thoroughly.
- Cut a hole at the bottom of the fish for stability and space for the Arduino later. Strengthen this opening with wire.
- Attach a cone shape at the back of the fish to enhance its fish-like form.
- Cut an opening for the mouth and attach lips using tape and paper.
- Shape wire into fins and secure them in place with tape. Fill any gaps with tape.
- Cut holes for the eyes, ensuring they are the same size as the PIR sensors. Attach a paper ring around them with tape.
- Cut a hole at the top for the fishing rod. Wrap wire around a marker to form a tube. Bend it slightly and seal with tape. Create a small ball at the front using thin wire and decorate with beads.
- Coat the entire fish with wood glue and let it dry.
- Use acrylic paint to color the fish according to your preference (e.g., leaving the fish black and adding blue accents to the fins, and red accents to the lips). Apply a gloss finish to the lips and fins.
- Shape teeth using wire and glue them inside the mouth.
- Create eyelashes by forming hot glue on a plastic surface, peeling them off, and then attaching them around the eyes.
- Attach black fabric inside the mouth using hot glue.
- Use hot glue to add texture to the fins.
- Additionally, I included a wooden underplate to securely attach the Arduino, battery, and cables, keeping everything neatly in place. This underplate provides stability and ensures that the components remain fixed and organized within the fish structure. By securely fastening these elements, the overall integrity and longevity of the project are enhanced, allowing for a more reliable and durable setup.
Please note that when working with hot glue or any tools, take appropriate safety precautions and ensure proper ventilation.
The Wiring
![879C16A6-1946-46FF-9212-AE94EF4B8607.png](/proxy/?url=https://content.instructables.com/FX0/OMMK/LHXFJQQ2/FX0OMMKLHXFJQQ2.png&filename=879C16A6-1946-46FF-9212-AE94EF4B8607.png)
![36A30172-3166-4F58-A34F-447DF44FAA8E.jpeg](/proxy/?url=https://content.instructables.com/FNC/LDKB/LHXFJRP8/FNCLDKBLHXFJRP8.jpg&filename=36A30172-3166-4F58-A34F-447DF44FAA8E.jpeg)
![DFDA01D5-A04B-4124-B56C-F0FE26F27585.jpeg](/proxy/?url=https://content.instructables.com/FAI/KC8Z/LHXFJRP9/FAIKC8ZLHXFJRP9.jpg&filename=DFDA01D5-A04B-4124-B56C-F0FE26F27585.jpeg)
![2706A75F-8319-4B50-8173-F790856103E4.jpeg](/proxy/?url=https://content.instructables.com/FHL/PU08/LHXFJRPA/FHLPU08LHXFJRPA.jpg&filename=2706A75F-8319-4B50-8173-F790856103E4.jpeg)
![0F148C7B-4338-461D-A52A-ECC9A8F8DD2C.jpeg](/proxy/?url=https://content.instructables.com/FRU/6B2B/LHXFJRPB/FRU6B2BLHXFJRPB.jpg&filename=0F148C7B-4338-461D-A52A-ECC9A8F8DD2C.jpeg)
![A45E504A-2E61-44E1-BA11-00EB7E3B5FDE.jpeg](/proxy/?url=https://content.instructables.com/FLJ/HP76/LHXFJRPC/FLJHP76LHXFJRPC.jpg&filename=A45E504A-2E61-44E1-BA11-00EB7E3B5FDE.jpeg)
To wire the components, connect the red wires to each other and the black wires to each other on the soldering board, ensuring a proper connection. Locate the pins on the components and solder the wires accordingly. Use black wires for the ground connection, red wires for the 5V power supply, and blue wires for the output connection.
It is important to ensure that the wires are long enough to reach all the necessary points within the fish. This will allow for proper placement of the components inside the fish and ensure they are securely connected.
An additional note when soldering the LED is that it may not fit through the tunnel of the fishing rod after soldering. In this case, it is advisable to thread the cable through the tunnel first and then solder the LED lamp onto it. This allows for easier assembly and ensures that the LED can be securely placed inside the fishing rod.
Using a breadboard for testing before soldering everything together can be helpful to verify the circuit's functionality and make any necessary adjustments before finalizing the wiring. This testing phase allows you to ensure that all the components are functioning as expected and that the connections are accurate before permanently securing them in the fish.
Additionally, for power supply, simply plug in the battery to provide the necessary voltage. The battery connection can be easily integrated into the circuit, ensuring a convenient and portable power source for the fish.
The Code
#include <Adafruit_NeoPixel.h>
//pin led
#define PIN 2
#define NUM_LEDS 1
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
//declare sensor pin
int sensor1 = 4;
int sensor2 = 6;
//Value for sensors
int val1 = 0;
int val2 = 0;
void setup() {
pinMode(sensor1, INPUT); // initialize sensor as an input
pinMode(sensor2,INPUT);
Serial.begin(9600);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
val1 = digitalRead(sensor1);
val2 = digitalRead(sensor2);
// read the state of the sensor value:
// check if the sensor is activated. If it is, the val is HIGH:
if (val1 == HIGH && val2 == HIGH) {
// turn LED off:
strip.setPixelColor(0, 100, 0, 255);
strip.show();
}
else if (val1 == HIGH) {
// turn LED on:
strip.setPixelColor(0, 255, 0, 100);
strip.show();
} else if (val2 == HIGH) {
// turn LED off:
strip.setPixelColor(0, 0, 255, 150);
strip.show();
}
else{
strip.setPixelColor(0, 0, 0, 0);
strip.show();
}
}
Upload to Your Arduino
- Connect your Arduino board to your laptop or computer using a USB cable.
- Launch the Arduino programming software (Arduino IDE).
- In the Arduino IDE, go to "Sketch" and select "Include Library," then click on "Manage Libraries."
- In the Library Manager, search for "FastLED" and click on the "FastLED" library by NeoPixel. Click the "Install" button to download and install the library.
- Once the library is installed, go to "File" and select "Examples," then navigate to the FastLED library and Upload the code.
- You can customize the code to match specific requirements of your deep-sea anglerfish project, including the pin assignments and the color sequence based on the motion sensor inputs.
- After modifying the code, go to "Tools" and select the appropriate board type and port under the "Board" and "Port" menu options.
- Click on the "Upload" button (right arrow icon) to compile the code and upload it to the Arduino board.
- The Arduino IDE will show the uploading progress, and once the process is complete, the code will be running on your Arduino board, ready to control the deep-sea anglerfish's color-changing lamp based on the motion sensor inputs.
Make sure to verify the pin assignments and any other necessary configurations in the code to match your specific hardware setup
Conclusion
In conclusion, the creation of the deep-sea anglerfish with motion-detecting eyes was a fulfilling project. The construction of the fish itself required a significant amount of time and attention to detail, but it offered ample opportunities for creativity and customization. This project is particularly suitable for decoration, especially in children's spaces, as it captures their imagination and adds a touch of magic to the environment.
It's important to note that the fish's motion detection and light effects work best in low-light or nighttime conditions. The sensitivity of the PIR sensors ensures accurate movement detection, creating an impressive and immersive light display. Consider placing the fish in a dimly lit area to maximize its visual impact.
For those seeking an extra thrill, there's the option to make the fish more frightening to amuse or scare others. By altering the design and incorporating more eerie elements, the anglerfish can become a spooky addition to Halloween decorations or haunted house setups.
Overall, this project combines various skills, such as crafting, electronics, programming, and creativity. It provides a rewarding experience and the opportunity to showcase your innovation and artistic flair. Whether you choose to delight children or create a thrilling ambiance, the deep-sea anglerfish with motion-detecting eyes is sure to capture attention and spark conversations.