How I Made SCR4P-E the robot

 
Fancy shot of SCR4P-E

Fancy shot of SCR4P-E

 

It is Secret Santa v2020 and this year I got James Bruton soooo I made him a robot that has high functioning depression and anxiety because it just went through 2020... Here’s how:

ingredients

THE VOICE

I HAD TO give SCR4P-E a voice. So to play “Why was I programmed to feel pain?” I used Adafruit’s Wave shield that I had laying around from my Robo-Suit from a few years ago and an Arduino UNO. Adafruit has a tutorial with sample code in their website to play the wav files.

HOWEVER, the tutorial is outdated if you have a Mac. So here is what I did to convert the mp3 to the right WAV 16KHz, 16-bit, mono PCM settings.

It was actually very easy once I figured it out:

  • Open iTunes (now known as Music)

  • Go to Preferences and under the Files tab, click on the Import Settings button

  • Change Import using to: Wav enconder

  • Change Settings to: Custom

  • Change Sample Rate to: 22.050 kHZ

  • Change Sample Size to: 16-bit mono

  • And chnage Channels to: mono

  • Hit ok, ok, and ok.

Now you can convert your mp3! Select the song in iTunes (you have to click outside the song box and drag the cursor into the box to select it, just clicking on it does not select it..) Once selected go to File / Convert / Create WAV Version.

And it is done! You can find your wav file in: /Users/yourusername/Music/iTunes/iTunes Media

All you have to do is into an SD card and put it in the Wave Shield.

To create SCR4P-E’s voice I use text2speech.org :)

the BRAIN

The rest of the robot was fully controlled by the other Arduino UNO. The tank’s DC motors, the micro motor to move the eyes, the time module to calculate the sate, the display segment to display the counter, and the servo motor to move the phone’s receiver.

DC MOTORS

The driver I used for the motors was great. I was mostly satisfied by the fact that I could input the 12v battery to it and get 5v out to power other stuff. I used this tutorial: https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/

image from lastminuteengineers.com

image from lastminuteengineers.com

The #1 takes the 12v, and the #3 outputs the 5V. Cool.

Both Arduinos, the RTC clock memory module, and the mini motor all used the 5V from this driver.

The code

NOW TO THE FUN. You can find all the code in the link below:

https://github.com/estefanniegg/YouTube/tree/master/builds/scr4pe_the_robot

I tried adding as many comments as I could, I am very low on sleep so I will come back to this blog post and add more about the code later, in the meantime, hack away!!

HOLDING IT TOGETHER

In addition to a LOT OF GLUE, I had to 3D model stuff to stack the Arduinos on the tank, to hold the eyeballs of the robot, and to hold the phone’s receiver. I did it all with Tinkercad which is free and easy to use. Way quicker, dirtier, and easier than Fusion 360. I highly recommend it for fast prototyping ;)

Let me know in the comments if you want me to add these to Thingyverse for you to print.

All the parts I printed to hold stuff together

All the parts I printed to hold stuff together

FYI

The servo motor and the wave shield interrupted each other since they shared ground and the wave shield uses PWM pins ~9 and ~10 which created absolute havoc when using servos that pull all the current. The point is I didn’t mind they interrupted each other because it made SCR4P-E glitchier and that is the “look” I was going for.


e


 
SCR4P-E idea sketch

SCR4P-E idea sketch

DC Motors, Battery, and driver were mounted under the tank chassis

DC Motors, Battery, and driver were mounted under the tank chassis

Side view of SCR4P-E mini DC motor that moves the eyes mounted with a 3D printed holder and super glue

Side view of SCR4P-E mini DC motor that moves the eyes mounted with a 3D printed holder and super glue

Side view of SCR4P-E with ON/OFF switch mounted on the side with glue

Side view of SCR4P-E with ON/OFF switch mounted on the side with glue

SCR4P-E’s speakers wired through the phone

SCR4P-E’s speakers wired through the phone

Seven segment display to show the days left until the year is over

Seven segment display to show the days left until the year is over

SCR4P-E’s eyes mounted with a 3D printed part which I have no name for because I did it and it just fits

SCR4P-E’s eyes mounted with a 3D printed part which I have no name for because I did it and it just fits

Scr4pe5.jpg
Wave shield with SD card that holds the audio WAV file

Wave shield with SD card that holds the audio WAV file

SCR4P-E and me :)

SCR4P-E and me :)

SCR4P-E the robot

SCR4P-E the robot

 
BuildsEstefannie2 Comments