Robotic Kukko With Thermal Vision
by otto.lindstam in Circuits > Arduino
3751 Views, 50 Favorites, 0 Comments
Robotic Kukko With Thermal Vision
Cuccos are chicken-like creatures that have figured in various games in the Legend of Zelda–series since 1992. Citing the Zelda-archive:
“..if Link (the main character) attacks a Cucco multiple times, the Cucco will become enraged and starts crowing very loudly to call its flock, and together they attack him by flying down from various directions (and pecking him to death). Once attacked by a flock of Cuccos, there is no way for Link to protect himself unless he manages to escape in time by fleeing from the vicinity.” (This is commonly referred to the “Cucco revenge squad)”
This useless machine is designed to impersonate this dynamic personality.
When exposed to a loud enough noise the Cucco goes into revenge mode and starts chasing the closest object giving of a heat-signal contrasting the ambient temperature.
The project was conducted as a part of the Computational Design and Digital Fabrication Seminar in the International Master of Science Programme: ITECH
by Matthias Hornung, Otto Lindstam, Kalaivanan Amudhan
Supplies
- The DC-motors, wheels and motor driver can be purchased as a kit. This includes double the necessary amount of components, however this proved useful as backup when one motor failed during testing.
- The second Arduino board might not be necessary and was only used to quickly solve a library conflict. See alternate Fritzing diagram for electronics assembly with a single board. This requires combining of the two code files.
Basics
The robots layout and behaviour, and principle for thermal navigation.
Order Hardware
a. Order the necessary sensors and actuators.
b. Refer to the supply list to ensure that you order the correct components.
c. Note that you can substitute the microphone, which triggers the "rage mode", later with another sensor if desired.
d. As a precaution, we recommend using two separate Arduino boards instead of one to avoid any potential issues with interfering libraries from the LCD and thermal camera (<Adafruit_GFX.h> and <Adafruit_SSD1306.h>).
Modify the OLED Displays' I2C Addresses
a. In order to mirror the LCD displays, they should have different I2C addresses. Therefore, please follow the instructions below:
b. Go to https://www.instructables.com/Arduino-and-the-SSD1306-OLED-I2C-128x64-Display/ and follow Step 1 and Step 2.
c. Copy the code from https://playground.arduino.cc/Main/I2cScanner/ and run it for both displays separately.
d. If the addresses for both displays are the same (e.g., 0x3C), continue with the rest of this Step 3 guide. If the addresses are different from each other (e.g., 0x3C and 0x3D), make note of the addresses and label the displays to differentiate them. You will make use of this later.
e. Change the I2C address of one of the LCD displays by moving the resistor on the backside.
f. When done, go back to Step 2.d and check if the address changed correctly.
Upload a Sound File to the Audio Board
a. Connect the board to a computer by the provided USB-cable and it shows up as a storage device.
b. Simply drag and drop a sound file smaller than 8 MByte onto it and eject.
c. Verify the sound systems functionality by connecting it to power and pressing the attached button.
d. Once working, deattach the button and instead wire the component as shown above and connect as in the diagram in the following step.
Assemble Sensors and Actuators
a. Lay out all the components on a clean and flat desk.
b. Make sure to have several different jumper cables on hand, especially male-male and female-male.
c. Use the electronic schematic representation to connect the sensors and actuators. Keep the two Arduino boards separated from each other for now.
d. Due to the far positioning of the LCD displays and IR camera inside the chicken hull from the breadboard, use long cables to connect them.
e. Tune the sensitivity of the microphone by turning the screw of it's potentiometer counter clockwise until LED-2 turns off. This can be further refined to taste once all the electronics have been assembled and are being tested.
f. Please note that the grayed out components are only needed if one wishes to implement an additional DC-motor for a flapping wing mechanism. This is out of scope of this instructable ;)
Download Libraries
Libraries:
https://github.com/adafruit/Adafruit_AMG88xx
https://github.com/adafruit/Adafruit-GFX-Library
https://github.com/adafruit/Adafruit_SSD1306
a. Visit the websites listed in Step 3 to download the necessary libraries for the code. Alternatively download them from the Arduino libraries manager
b. Follow the instructions provided on each website to install the libraries correctly.
Upload and Test Code
a. Copy the first code file (AngryEye.ino) and upload it to the Arduino IDE. This will be the main board with all sensors and actuators other than the thermal camera.
b. Compile the code and check if all the libraries are downloaded correctly.
c. When uploading the sound chip should trigger once, after that the lcd displays will boot up. This takes a few seconds.
d. Check if all the sensors and actuators work properly. We added a Serial.Println for the triggering and drive motion in order to follow see if everything is working properly.
e. When done, upload the second code file (thermalNavImplementation.ino) to the second Arduino board with the thermal camera after verifying that it compiles correctly
h. The code outputs the thermal camera readings into 4 type of motions: l(left), r(right), f(forward) and s for (search). The response can be validated by moving a hand across the space in front of the sensor while observing the serial monitor. The provided processing script can give visual feedback of what the sensor is picking up.
See Its Eyes Light Up
Test eye-blinking behavior and alternatively produce custom frames for animation by using hex converter for the specified OLED model.
Connect Both Boards Together
a. Once you have verified that both Arduino boards are functioning properly, it is time to connect them together. You can refer to the electronic schematic representation for guidance on how to make the connections.
b. Before proceeding, ensure that you have uncommented the function in the main code script that is responsible for communicating between the two boards.
c. Connect the Arduino boards together using jumper cables and make sure they are securely fastened. The wiring connections should correspond to the electronic schematic representation.
d. Double-check that all the sensors and actuators are functioning as expected. You can run some tests to verify that the motion detection, sound detection, and thermal imaging are all working correctly.
e. Once you are satisfied that everything is working properly together. Make sure that all components are securely fastened in place and that the wiring connections are not loose. This can be insured by using hot-glue and electrical tape on the wires.
Fabricate the Body
a. 3D print the chassis and wheel extenders.
b. Attach swivel wheel to back of chassis by screwing it into place.
c. Cut body, tail and head out of thick paper based on provided stencils.
d. Glue cut-outs together and attach tail to main body. Use provided obj-file as reference of the connectivity between faces.
e. Make holes for thermal sensor and eyes. Tracing the eye images displayed on the OLEDs can help.
Populate the Chassis
a. Hot-glue the dc motors to the bottom of the chassis and make sure one of their axes are centred in the side-facing holes.
b. Fit the ultrasonic sensor at the front tip and glue the breadboard right behind it.
c. Attach a vertical piece of foamboard right behind the breadboard and attach the two arduinos to one side each.
d. Mount the motor driver at the back of the chassis.
e. Place the audio module and batteries where there is space.
Attach the Main Body..
The hull can be attached to the chassis by sticking the bottom paper flaps to the 3D print. Access to the Arduino boards is now possible through the neck opening.
Make sure adequate power is attached both to the motor driver and the logic components. This may require fine tuning of battery voltages in relationship to speed settings in the main code for stable results.
..& Admire the Results
By following these instructions, you should be able to successfully assemble your robot and ensure that it is functioning properly. If you have any further questions or concerns, don't hesitate to reach out for assistance.