Monday, 15 February 2016

Roby the Robot Dog gets a Speaker, Woof!



Roby is a robot dog built using an mBot robot, Meccano and 3D printed parts. Roby is my 7 year old son's ongoing project.

We actually got Roby's bark working before anything else. It was just a bluetooth speaker with a sound-activated bark! Roby is inspired by Ruby the real dog and we recorded her bark so it's authentic.

You can see the earlier posts in this series to see how we got to this point:
When we show Roby to other children, the first question after 'Can she move?' is 'Can she bark?'

The mBot robot has a simple tone generator which can be used for sound. But for full sound support we've gone with a mini bluetooth speaker inside Roby's head.

The roughly 1 inch cube mini speaker conveniently fits inside Roby's Meccano head so that it seems like the sound is coming out of Roby's mouth! We just hold the speaker in place with a blob of sticky tack for now.

This speaker can be paired with the laptop running mBlock Scratch and then mBlock can be used to control the sound. I had to install Broadcom bluetooth drivers to get the laptop to pair with the speaker. (We have had a few issues with the bluetooth after upgrading to Windows 10 but reinstalling the drivers seems to have got things working again.)

The sound quality is plenty good enough for Roby.

This approach does mean that we have to charge the Bluetooth speaker separately and pair it before using Roby. It also means that Roby needs to be connected to a laptop for full functionality. But it's definitely worth the effort for the extra capability. My son really wanted Roby to have proper sound.

We have found that there can be a short popping noise when the connection to the speaker is first established so it's better to play longer sounds, but other than that it works well once connected.

If you don't have a bluetooth mini speaker then you can still have sound coming out of a PC.

Roby's Bark

Scratch has lots of built in sounds and also the capability to import sounds and record and edit your own. The mBlock software for mBot retains this capability.
My son used this to record the real Ruby's bark so that Roby could use it. He editted the sound using the brilliant built-in Scratch sound editor to leave just the bark.

My son has programmed the 'b' key to make Roby bark. This is just the same code as he would use to play a sound in regular Scratch. The bark sound can easily be incorporated into Roby's moods too.



Dance Mode

The speaker can also be used to make Roby play other sounds and music.

Roby's speaker is put to good use during 'disco mode' where Roby plays music, dances and puts on an LED light display! Yes, disco mode was in the original design spec for Roby.

Roby's dance mode!

Here's Roby's dance mode in action:


Roundup



We're having lots of fun with this project. When my son first came up with the idea of creating an actual robot dog I was concerned that we wouldn't be able to come close to realising his ideas in a way that he was able to understand and program. This is the same child who expected his cardboard model to be a real robot when he was four, so we created his first robot. He wasn't going to be fobbed off!

Luckily mBot has ticked all the boxes. He would like to build a bigger robot dog one day, but for now Roby is allowing him to try out most of his ideas and really make something significant. 

There's still more planned for Roby. You can subscribe to the Tech Age Kids mailing list to see future updates on Roby and lots of other kids tech news and reviews.

Read next: Our mBot Robot kit review



More from Tech Age Kids:

Comments:

Post a Comment