ROBO_PET / VIRTUAL PET

by Smurfy_CH in Circuits > Robots

86 Views, 8 Favorites, 0 Comments

ROBO_PET / VIRTUAL PET

Titel.png
Demo0.jpg
Demo1.jpg
Demo3.jpg
Demo4.jpg
Px2.jpg
Demo5.jpg

For some time, I had been planning to create a virtual pet for my grandchildren. A few days later, I discovered the FluxGarage RoboEyes Librar. It inspired me to design a little Robot instead.

ROBO PET DEMO CLIP

RoboPet behavior:

The RoboPet can operate on a 5V USB power supply or a power bank. A 5000mAh power bank will last approximately three days. If the power bank runs out, you can restart it, but this will add a few hunger and sickness points to the system.

You need to feed it once a day and send it to bed.

If it gets sick, you should give it some medication.

It’s also beneficial to press the Play button occasionally to tell it a story or sing a song.

While pressing the PLAY button, you can sing a song to it or tell a story. to it. This increases the good mood and fitness level.

If you neglect to feed it for more than a day, it will become sick. Neglecting it for three days will lead to an early death.

Sending it to sleep improves its health level.

The eyes and nose LED will indicate its hunger and health status.

The RoboPet saves the days every 24 hours and stores its age in the Arduino's EEPROM. If it dies, you won’t be able to run it again. You need to unscrew the bottom and reset it on the reset pin. The display will show how long it survived.

The RoboPet can get sick, due to neglecting or random factors.

Pressing the PLAY button longer will enhance its health, and reducing the likelihood of random sickness.

However, if you over feed it (beyond 100%), it will also get sick, and its health level will decrease. Adding too much medication can lead to sickness as well, and an overdoses can "kill" it.

The yellow Info button on the top of the head will display the actual status of your RoboPet.

Age in days

Hunger level %

Sickness level %

Fitness %

Immune system %

Hours left to finish this day


Power Bank Note:

Most power banks turn off if they draw less than 100mA after about 30 seconds. To prevent this, I added an Attiny-13 chip that draws about 80mA for 1 second, every 25 seconds via an NPN transistor and a 1Watt 50 Ohm resistor.

If you plan to use a USB power point continuously, you can skip this part.

Supplies

3D printer & filament

Soldering iron + solder

Flush cutters/Wire cutters

Wires

Screwdriver

Sanding paper

Paint

M1.5 x 10 mm Self-tapping screws for plastic

M3 x 15mm Screws

Hot glue gun

Super Glue (Cyanacrylat)

Shrink tube

Arduino Nano

I2C OLED Display 0,96" / 128 x 64 Pixels

Piezzo Buzzer

1 Mini Momentary Push Button 7mm / NO

4 pcs 6x6x4,3 Tactile Push Button / NO

3 x 5mm RGB LED

6 x 220Ω Resistors

3 x 270Ω Resistors

1 Powerbank 10x70x135 (or smaller)

Universal Prototype PCB Board 20x30mm /2.54mm Hole Pitch

1 Attiny 13

1 x 3mm LED

1 x 50Ω Resistors 1Watt !!

1 x 100Ω Resistors

1 x 1kΩ Resistors

1 x Capacitor 6.3V 3300uF

1 x USB C socket

Print STL Files

Pic_00.jpg

Print all STL files and paint them as desired.

Filament PLA or PETG or ABS

Nozzle 0.4

0.16mm High Quality / 30%

Small parts and MCU Holder 100%

Support AUTO TREE

OLED Display

Pic_01.jpg

Solder wires to the OLED display and mount it to the OLED-holder.

Secure the back with a bit of glue.

LED

Pic_02.jpg

Solder the resistors to the 3 RGB-LEDs, and attach approx. 15cm long wires to the end of the resistors. Secure the solder points with shrink tube and hot-glue.

LED PINs Red 270Ω

LED PINs Blue 220Ω

LED PINs Green 220Ω

Buzzer & Info-button

Solder approx. 15cm long wires to the Buzzer and the "Info" Push button.

Mount Head

Pic_03.jpg

Mount all the parts (LED_Nose, LED Ear Left, LED Ear Right, Buzzer, OLED Display Holder, Info Push button) into the head and secure them with glue if necessary.

Arduino & ATtiny13

Download the program code for the Arduino and Attiny13:

- Arduino Code: .ino file for the Arduino IDE

- Attiny13 Code: .bas file for the Bascom compiler

Program the Arduino Nano using the Arduino IDE, and if using a power bank, program the Attiny13 as well. If you’re unfamiliar with programming microcontrollers, many tutorials are available online.

MCU Holder

Pic_04.jpg
Px4.jpg

Attach the shoulder, neck, and MCU holder to the head using 1.5mm x 10 screws and superglue.

Mount Electronic

D.jpg
E.jpg
20250409_214608.jpg
A.jpg
B.jpg

Use a hot glue gun to secure all electronic parts to the MCU holder, Arduino Nano, and if needed the "NoTimeout module" for the Power bank.

Soldering the pins this unusual way to the Arduino Nano, makes it easy to glue the Arduino onto the Arduino-Holder. See Picture.

Mount Body

Pic_06.jpg

Mount the 4 Tactile-button to the body and solder approx. 15cm long wires to the connections.

Soldering

wiering.JPG
Wiring_Akku_NoTimeOut.jpg
Pic_05.jpg
Pic_08.jpg

Solder all wires leading from the Head to the Arduino, according to the wiring diagram.

Hint

Pic_09.jpg

Before assembling everything into the body, it’s a good idea to do a test run. If all runs as it should, you can assemble the rest of the parts and have fun with your Robot.

Easy way to use Self-tapping screws in 3D prints.

Magnetise screwdriver and the screws, by holding screwdriver and screws for a few seconds to a strong magnet. Stick the screw to the end of the screwdriver and heat it up with a lighter for 7 to 10 seconds. Then press it into the 3D print.

Conclusion and Use

The RoboPet will be a birthday gift for my Grandchildren. Each day or week the RoboPet survives, they get a certain amount of money. Once a year, or when the RoboPet dies, it will be payday.

I hope you have as much fun with this project as I had to construct it.

Love to see improvements, alterations and pictures.


Used PC Tools:

Autodesk Fusion360

Bambu Studio

Arduino IDE

AVR Bascom Basic Compiler


Last but not least, I would like to thank Dennis Hoelscher for his great work with the Roboeyes Arduino library and providing it to the Arduino community. This made the project very easy and fun to program. The Roboeyes library is available under

https://www.fluxgarage.com/blog/introducing-the-roboeyes-arduino-library