Robot Vacuum That Feels Pain! ( Attiny85 + DFplayer Mini )

2,777

24

16

Introduction: Robot Vacuum That Feels Pain! ( Attiny85 + DFplayer Mini )

About: Just about anything you can do yourself.

I recently got a robot vacuum (AT Mouse SP8000) and I call her Dustine, get it. DUSTY-INE.

I see her bumping into stuff and I wish she had a personality like how a real person would react when they bump into stuff. Like say Ouch, and Dammit, and maybe a swear word here and there. So I taught why not make that happen, So I did.

Full project video:

Supplies

Extra:

Tools:

This post contains affiliate links, which help support my channel.
If you purchase through one of my links, I may earn a small commission; at no extra cost to you.

Step 1: Testing DF Player Mini

Now the main component of this project will be this DFplayer mini, which can play mp3s from a memory card. This device is stand-alone meaning it doesn't need an Arduino or anything to make it work. But I think I want to control it via a microcontroller for added effects. According to the DF player datasheet, we are going to need a speaker that is under 3 watts unless we want to use an amplifier.

https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

I am using the Arduino uno only for 5v power here and I connected it and the speaker like in this diagram above.

I then formatted a 4GB micro SD card I had to FAT32 and loaded it with some meme sound effects I sometimes use in my videos. Using a jumper wire, I connected on one end to ground, and I can touch anyone of the IO pins to play the next or previous track.

I find the audio quality is decent and very audible. It isn't something you would add to your entertainment system but it is perfect for this project.

Step 2: DF Player Mini With Arduino

The next step was to try and get this to work on the Arduino uno and control it over UART. To do this I am using the DF Robot DF Player Mini library for Arduino.

https://github.com/DFRobot/DFRobotDFPlayerMini

From here I loaded the GetStarted example to the UNO. If you don't know anything about Arduino you check out my Arduino playlist to get started.

The code uses software serial and plays the next song every 3 seconds. Note you should also adjust the volume here if you find the volume to too soft.

myDFPlayer.volume(30); //Set volume value. From 0 to 30

The circuit diagram is above for this test. Notice you are going to need a 1km resistor on the transmit line.

I am happy how well this is working so its time to see what is going on inside of Robot vacuum.

Step 3: Inside the Robot Vacuum

Now what I am about to do will void any warranty she has so if anyone does this do it at their own risk.

I first took out her bin and all the screws at the bottom.

I took out the battery which had a hidden screw underneath it.

The front bump also needed to be taken out being careful of any wires or connectors.

Then it was easy to lift the top off, disconnecting the motor, and touch button.

This reviled the madness that is inside of a robot vacuum. I mean it was a lot. and am pretty she is simpler than other robot vacuums on the market.

Step 4: Digispark Attiny85

After looking inside the vacuum, I found the Arduino uno and nano to be a bit big for inside of the vacuum not to mention an overkill.

I turned to the Digispark attiny85 I had which has 5 GPIOs and is small. This device is a bit tricky to use as you need to update your drivers and add digispark to your Arduino board library but once done you can do a lot with this little device.

Attiny85 Drivers + Arduino: https://github.com/LilyGO/DigiSpark-ATtiny85-drive...

The real reason for using a microcontroller in the project is to allow multiple trigger mechanisms and also to give us randomised playback. So it doesn't become repetitive and predictable. So I wrote a code that uses the Arduino random function to randomly pick a track when the robot bounces into something and triggers the switch.

Arduino random function: https://www.arduino.cc/reference/en/language/funct...

My Code: https://github.com/justbarran/Robot-vacuum-that-says-Ouch-

The vacuum has 3.3v pull up resistors on the signal line and this goes to ground when the bumper is pressed. So all we need to do is check for when the pin goes low.

I designed this test circuit to simulate what is going on inside of the vacuum and uploaded the code.

By pressing the button the code randomly picks a track to be played.

Step 5: Protoboard

I used a small piece of PCB protoboard to solder everything together following this diagram.

I spliced the wired on the vacuum and solders wires for power as well.

I powered up the vacuum for a quick test.

Step 6: Finishing

Originally I tried to use the vacuum's internal speaker for this project and ended up damaging the audio circuit so I recommend using a separate speaker. I found a great place at the back of the vacuum for the speaker which after a bit of grinding with the Dremel fit nice and snug next to the vacuum's exhaust.

Using my Dremel and a series of bits I carved a hole at the side of the vacuum. This wasn't pretty but it would allow me to access the SD card and change the audio tracks easily after I put her back together. I used a glue gun and standoffs to secure the circuit board in a level position.

After putting the vacuum back up I Made a list of things I wanted it to say and used a text to speech tool that also allows me to download as an mp3. I updated the sd card after with the new audio.

https://soundoftext.com/

  • son of a biscuit

  • dammit

  • help

  • meh

  • kiss my ***

  • oh dear

  • ouch

  • s*** man

  • shoot

  • someone call AAA

  • who put this here

  • you got to be kidding

  • me piece of s***

  • oh jeesers

  • OMG

  • Darn it

Step 7: Done

And I must say, I wasn't disappointed.

I think a future update would be a celebrity voice pack, let me know in the comments what you would like to hear.

Battery Powered Contest

Participated in the
Battery Powered Contest

Be the First to Share

    Recommendations

    • One Board Contest

      One Board Contest
    • Jewelry Challenge

      Jewelry Challenge
    • New Year, New Skill Student Design Challenge

      New Year, New Skill Student Design Challenge

    16 Comments

    0
    Suicidebattery
    Suicidebattery

    4 months ago

    I love it! Please could I ask what the 1K resister is for?

    0
    justbarran
    justbarran

    Reply 4 months ago

    It was recommended in the datasheet, it is used to limit the current going to the dfplayer, like a protection resistor /current limiter

    0
    Suicidebattery
    Suicidebattery

    Reply 4 months ago

    I'm trying to get your code working with an attiny85... and getting nowhere.
    With the 1k resistor I get no sound, without the resistor it doesn't stop playing tracks.

    0
    justbarran
    justbarran

    Reply 4 months ago

    If you are using my code, and testing you would need to put two pull up resistors on the two button pins, of take them off. Or in the code you can change digitalRead(buttonPin1) == LOW ||digitalRead(buttonPin2) == LOW )from low to high. In my vacuumed it had pull up resistors on the bumper switches so I did not need to put them in. The reason why it always playing could be the pin is in a floating state. Hope this helps. Let me know if you go through.

    0
    argentinamm86
    argentinamm86

    1 year ago

    it makes me remember the michael reeves' screaming roomba, its a really cool project

    0
    student81613
    student81613

    1 year ago

    it should say ohh my godd

    0
    justbarran
    justbarran

    Reply 1 year ago

    AHAHA i did put OMG

    0
    2403366
    2403366

    Question 1 year ago

    love it

    0
    justbarran
    justbarran

    Answer 1 year ago

    thanks

    0
    liquidhandwash
    liquidhandwash

    1 year ago

    Very funny, kind of reminds me of a tomtom GPS I had years ago I put Beavis and Butthead voice on it. Was great fun when i picked up passengers, It would say things like "get off this road it sucks" "Haha you said get off"

    0
    ChristianB257
    ChristianB257

    Reply 1 year ago

    Hahaha omg i want a Beavis and butthead voice pack now. 😂😂 I saw someone had a Morgan Freeman gps voice pack once it was Hilarious

    0
    justbarran
    justbarran

    Reply 1 year ago

    HAHA wow cant rem last time i saw a eps of Beavis and Butt-Head, hahah ill try and do a voice pack for that next year

    0
    ChristianB257
    ChristianB257

    1 year ago on Step 6

    Pretty cool, will have to try this with my roomba

    0
    justbarran
    justbarran

    Reply 1 year ago

    let me know if you do

    0
    seamster
    seamster

    1 year ago

    Ha, very clever! I'd like to have this at my house :D

    0
    justbarran
    justbarran

    Reply 1 year ago

    let me know if you do it. Its been a lot of laughs