← All talks

Joe Grand - Hacking a Tooth Tunes Toothbrush for a Positive Dental Outlook

BSides PDX24:061.5K viewsPublished 2018-03Watch on YouTube ↗
Speakers
Tags
CategoryTechnical
About this talk
Joe Grand (@joegrand) The Tooth Tunes children’s toothbrush from Arm & Hammer uses bone conduction technology to play a fixed two-minute song clip from select artists. Through the vibration of the toothbrush’s bristles, the user hears the music “inside” their head. However, the song selection leaves much to be desired. In a quest to break free from the likes of One Direction, Miley Cyrus, and Jonas Brothers, Joe replaced the original Tooth Tunes electronics with a custom audio player circuit, letting him play songs he actually enjoys. In this presentation, Joe will share his design process and results of the Tooth Tunes Toothbrush Hack. Joe Grand, also known as Kingpin, is a computer engineer, hardware hacker, runner, daddy, honorary doctor, TV host, member of L0pht Heavy Industries, and the proprietor of Grand Idea Studio.
Show transcript [en]

that you guys could hear that in the back okay so a toothbrush that plays music in that video you know imagine having somebody replace it with like death metal or porn or something like that sorry if you're underage yeah so you know it's it's it was a constant so people are like oh I want to I want to make it play whatever but nobody ever did it so my whole thing was like this is a cool concept but it needs a little bit of finessing these a little bit of help all right yeah so plays a two-minute song clip of the the world's most popular artists according to somebody probably not in this community though yeah so originally came out in

2007 and then was re-released in 2012 which is when I found out about it what the real kind of thing is is based on bone conduction which I guess is called a denta mandibular sound transmitting system where the the element that vibrates kind of runs the vibrations run through your bone you can actually hear it in like your inner ear which is awesome and this is dated back a long time I was talking to rob earlier who just gave the talk and he was saying something about a retainer that you could do something to play music I had seen once like some swim goggles that had something on the back that would tell you how many laps you've run so

there's been attempts at doing consumer electronic stuff for a while in this space and if you look at at this main patent which is the arm and hammer now owned by Armand Hammer patent it has some references and prior art and ideas of like spoons that play music and this and that and anything you put in your mouth will play music there are lots of options and but the toothbrush is the one that stuck it seems like so here's what the packaging looked like yeah it's great if you're 12 it which is probably why you need help brushing your teeth anyway but this is you know interesting concept but definitely not targeted towards people like me and I wanted that

targeted towards people like me so I mean I think the toothbrush is good but the main problem is that all the songs just you know just totally sucked it was lame so the process is I'm gonna replace the circuitry with something that allows me to play whatever music I want here's the timeline so ya talking about spending lots of time on projects this was a five-year endeavor and I probably spent I don't know maybe two twelve or twenty or forty hours on it total or something way way more than you would expect for like hacking a toothbrush but yeah so I bought it right when it came out and I was like this is so cool the

music sucks and I'm gonna fix it I did build a prototype in 2013 which I'll show you the pictures of then I moved here thank you and thank you for accepting me and everything was in boxes for a few years and I just totally forgot about it like I sort of knew in my head I had wanted to do it but it just like was not something that could find and I wasn't really like I'm gonna hack the toothbrush now so I eventually found it last year and then finished it this year so yeah a long time that's the death dedication right dedication to the cause of making tooth brushing better for all of you okay so here's the

teardown first thing that I like to do is I get the product take it apart look at the circuitry and figure out how I can manipulate that so normal toothbrush looking at the top this is all like a one-piece molded plastic and there's some rubber built in but it needs to be water-resistant and it's probably pretty waterproof the batteries which are down here are not replaceable I don't know how long the thing is supposed to last but if it's a two-minute song clip but you know some it's three triple-a so it's probably gonna still last a few years maybe with self-discharge I don't know I didn't do the calculations but it will last long enough until the kids get sick

of a song and throw it out or buy a new one but there's like a overhang around here to keep everything pretty well sealed up so it wasn't something that I could just open up and take the stuff out it took a little bit of kind of breaking I broke quite a few of them which I bought them all on eBay and to try to figure out like how can I get the circuitry out in a way that when I put my new circuitry back in I wouldn't break everything and figure out how I'm gonna attach the element so that was one tricky thing his hat figuring out how to get access to this back part which was

like glued in and there was like a post and everything so once I got like a neat little method of like some you know nose pliers and just some finesse to pull that out that worked okay the other trick was getting to the element which is here and it's all molded in the actual head I don't have a picture of the head here but it's up here it's sort of a round thing that's not directly connected to the bristles it's just in that housing and the wires come down to here and then their heat shrink to some wires that go down to the circuitry which actually so they kind of continue along here and then over to here

so I couldn't figure out any easy way to get that out without doing some modification of the of the area around here which I'll show you later on this plastic piece you see here if you pull that out it's this plastic how this little carrier here which has the space for the batteries so now that I know how to open this I can replace the batteries which is good this is the circuitry here which there are some discretes there's nothing on the back side and so there's the button to start and stop the playback you can you can play the song and it will continue to play all the way through or you can stop it if you're

done early which is cheating because they're supposed to brush your teeth for two minutes right but who actually brushes their teeth for two minutes really okay I have a dentist appointment on Wednesday so maybe I should start yeah I always say I do and they know I'm lying I didn't realize that people actually do good for you guys that's amazing okay so don't come close to me I guess so this is the main circuit shows here so you have a button here and then this is a chip on board type of device so if you if you think about like a normal integrated circuit that you see in a circuit board it's like a black plastic housing with wires

with leads coming off or maybe there's leaves underneath you can't see them this is the silicon underneath here actually an integrated circuit or just just the chip wire bonded with little tiny wires to the circuit board and then coated with epoxy on top Blagh with epoxy this is like a really hard coating that if you want to manipulate devices like this you could either get the coating off with chemicals or scrape it or more likely just look for other places to tap on to it so it's a possibility that you know I like I could maybe monitor some stuff here and see but it's really just looking for the button press all the songs stuff is

stored in here and that's this stuff the chip on board is really common for high volume low cost stuff where things aren't gonna change at all but I wanted to be able to change the music and have control of the music so my whole thing was like alright just get rid of this build something that looks exactly like that that can take an SD card that will play songs I don't like recreating the wheel and I like you know being able to share my project so other people can build on them and in the same way I don't mind using other people's projects to build on my stuff so this just happened to be I did some google searching of like

audio player wav file microcontroller because I didn't want to have to design the whole SD card interface the fat filesystem all of that so this person named Chan there's not I don't know much about that person because there's not a lot of information but there's tons of great projects on the website and this was one of like this project that that he or she came up with that was a tiny wave player for an 8-bit 80 tiny AVR Atmel AVR microcontroller that also had support already for the fat filesystem so you it would read a memory card and play the song so it's great that was like a perfect starting point so I didn't have to do like all this crazy

reverse engineering or crazy engineering to get this stuff done so this was the starting point for the for the project let's see so yeah he has or she has a bunch of code in here two two-bit bang through over SPI so software spi control to read the SD card which is a standard kind of SPI interface and then there's some module fat FS that that people have been using I think it's for at males I'm not exactly sure at some C library so well well fat Oh fat FSS is that generic library what's that oh okay cool yeah so that's still the standard so he wrote or she wrote a petite fat FS which was just

sort of a carved out version too you know for what for what's gonna fit with this particular microcontroller so less than 512 bytes of RAM which is cool so if you take nothing else out of this if you ever want to play WAV files from a microcontroller of an SD card you just use this stuff yeah so standard WAV format in RIF 8 or 16-bit files and then it's mono so yeah all that all all that starting point was there so I built up a prototype and just had it working without the toothbrush right so eighty tiny microcontroller little circuit and SD card with a little carrier board from Adafruit over to a speaker and it worked fine as

expected right because the project that part of the project already worked I did have to make some firmware changes to get the code to compile because the last time it was worked on was 2000 between 2009 2012 so I had to get some stuff tweak some stuff to get it working to compile in 2017 but that was not too much of a problem we also build the prototype up and this is again part of the standard process for me anyway is when I'm starting to design a circuit I will do something on a breadboard like this where you can plug stuff in take things out change values get everything working here before you kind of hard you

know code it into circuitry on a circuit board so that worked so then I went and built my first version of the board which doesn't get a lot of respect in this presentation because it didn't totally work the way I wanted it to but I will mention so I got the board back through OSH park of course because they're awesome and local and here and here in the front row so yeah got the board's back built it up just like the prototype and which was just like the version that Shan had written or had made but it turns out when I hooked it up to the actual element it was way not loud enough and I had

actually tested that with the prototype at the beginning but I it just didn't occur to me that it wasn't loud enough I heard it and I'm like yes it works but then I didn't I didn't test it as much as I should have before I built the first version so I built it and realized it wasn't loud enough and I tried to convince myself that it would be okay I was like well I can kind of hear it as long as there's nothing else going on around and like but I just couldn't bring myself to actually call that complete and I was like damn now I have to go and find an amplifier and build

another circuit and hack on that and try to get it a little better what I ended up doing is using a little little level meter to measure the sound of the original and then try to match it a little bit to see you know okay let's let's add my amplifier and see if I can jack up the volume and make it work because with the speaker with my amplifier it was suit was really loud but then with the transducer it wasn't because whatever the you know however the construction of that thing is and the the resistance and I mean I don't even know so I figured I would just do like some test once I got

it close enough I ended up using a LM 48 64 which I'll show you on the next slide just a standard kind of audio amplifier to take the output of chance of chance design and then amplify that so here's the final look of the circuitry fits right in place so ya button micro SD card slot let's see the battery transducer and then the backside had the micro controller the amplifier and an on/off control which I'll talk about when I show you the schematic and then the voltage regulator so power comes in goes the voltage regulator gets regulated down from the four and a half volts to three volts to power everything micro controller has the code the on-off

control again I'll talk about later and then the amplifier takes the sound in amplifies it and then sends it out to the transducer and it just so happened that like the board I'd already design you know for the first version it looked exactly the same except without the amplifier there was nothing under here I might have had a big bypass capacitor or decoupling cap or something over here so it just happened that this was like just the right size so you know I didn't want to have to like go to smaller components or anything like that so here's the final schematic sort of you know assume Chan's design is this and then I have kind of the simple stuff added to it so

yeah SD card goes in here with the wav file gets communicated over SPI to here and then this will output PWM to the audio amplifier which will amplify it and then play the sound a cool thing is down here we have the voltage regulator here and then remember at the beginning I mentioned you can play the song you can also stop the song halfway through for people like me who don't brush our teeth for two minutes I needed a way to do that sort of have on/off control of the system and there are ways that I that I had thought about using transistors you could have two two transistors and do some stuff with discrete components but that would have

been way too big to fit on the board it turns out that Maxim has a chip this sixty no 54 which is an actual on-off controller so typically the the setup is you have your on-off controller with an input on a button and then the output and the inverted outputs you can choose you know depending on your system feed that directly into the enable pin of the low dropout linear regulator a lot of designs you know normally the enable pin is just pulled high so it's always on so this is like any actual use of the enable pin so now you can push the button this this will always stay on this has like a pretty wide voltage

range so you power it directly from the batteries and this will always stay on and I think it sucks like seven micro amps or something it's it's small enough for for most battery-powered systems and it will eventually kill the batteries over time but I thought it was a good compromise so it stays on waits for an interrupt and then we'll set the output will toggle the output so when I want to interrupt to the playback I can push the button again it's gonna change the state of that disable the voltage regulator and turn it off alright so that's cool what I also did is modified the firmware to change one of the pins so there's a

reset pin normally that with this chip this eighty tiny 85 three set pin is by default a reset pin I disabled that change the fuses to turn it into GPIO pin and then modified the code so once the song stops playing the way it turns itself off is it will set this pin high normally it's low set the pin high which clears sort of as a secondary input into this part and then toggles the output so it will shut itself off so now the user can manually turn off the unit and then the electronics can manually turn itself off also aside thought was sort of cool and then the amplifier bridge siloed output and it's pretty loud with a

normal speaker but not with this but louder than it was before the amplifier so yeah just a list of some of the code changes this stuffs all on where did I put that code I think there's a link to it on my website I think it's on my website I don't know but you can see the code modifications on there but yeah so fix some of the stuff that that would that wasn't working the way that Chan's code was is it would play every single file in the directory like one time and then it would keep keep repeating it you know yeah I would play each one one time and they repeat and keep playing sort of

constant stream so I just changed that to just play the first file it found on the filesystem and play it once and then turn it and then dealing with the with problems of that because when you disable the reset pin that lets that prevents you from doing any subsequent in circuit programming so you can only program it and I think it's the high voltage programming mode or something I had to use a device programmer to do that instead of like the you know standard wavelet whatever the Adafruit um oh the USB you know tiny isp stuff sort of in circuit serial programming so it's a little bit of a problem when I was modifying the code and then testing the

code because I couldn't just do the typical iteration of make code changes program it tested it was like make code changes put it in the device programmer program it stick it in the device you know socket and go from there there's just a longer process but luckily the changes weren't like that crazy but if you wanted you know compile your own you grab the code use these things with these few settings and you should be good to go so here are some of the pictures of the final board now that I knew that board worked you know again I want to make it look as stock as possible but I just couldn't figure out a good way to get into that transducer

so I took a little um little little drill drilled in use some dental tools to like fish out the wire so cut them with one dental tool and then use another one to fish out the wires and just left enough that I could strip it off add some you know blue wire 30 gauge wire yeah it was like it was like laparoscopic without a camera right so you just sort of sort of guessing and you'll maybe I could do a smaller hole with better tools or something but that was fine what I didn't end up doing is putting like you know silicone in here and I probably could if I was actually gonna use it but after all this work I

didn't want to use it because it's like I only had the one that actually works well and looks good and I was like I just want brush my teeth yeah so this is what it looks like so final things circuitry you know the transducer gets extended out to here and then SD card here slides it in put the batteries in and and that's it so with that let's give our demonstration so I released a video about this online I don't member when if you want to go or something and the original intent so I grew up in sort of that kind of punk hardcore scene in Boston and listen to a lot of straightedge hardcore so kind of positive message and

drug free and all this stuff and there's a band called Crucial youth that had a song which was a spoof of like a lot of the positive bands at the time and they had a song called positive dental outlook which I thought would be like totally fitting for this toothbrush because there's a lot of songs about positive mental attitude you know and being positive so I thought that would be funny so I made a video and showed that song and realized pretty quickly that like most people didn't know what that was and could barely understand it because it was loud and fast and everything so when I got accepted to be sighs which thank you to everybody who

accepted me because I wasn't expecting to give a talk on packing a toothbrush and to Chris and staff for convincing me to also submit it I figured I should do something more portland-based right because we're Portland and it would be it would be pretty silly to just play the same song so I have a special song for you that nobody has heard yet and well at least not in toothbrush form and I'm pretty proud of it I think it's pretty hilarious and hopefully somebody will recognize it let's see so I'm gonna do this alright so I'm gonna put this microphone over here and oh I should mention so I have two different speakers because if I just held the transducer to

here you're probably not gonna hear it so I have the paper cup which were a wax coated paper cup which works pretty well and then there's this kind of metal Mancala box which this sounds a little bit tinny but this is what i use for the other videos i think i'm gonna try it with the with the cup first and we'll see if you can hear it I have a backup video just in case anyway so but let's see what happens will you be able to hear that wiggle around too much all right so I might have to do this a few times I don't know let's see if let's see if you can hear it ready don't

count down three two one the whole thing [Music] [Applause] [Music]

[Music]

[Music]

[Applause]

[Applause]

that's now officially my favorite song and I've listened to it like a thousand times as I was getting the volume right and everything and that was actually the remix so if you watch the first episode of Portlandia that's where this tune came from and this was a remix version so somebody took it and made it sound even better so yeah that's one thing you have to do is you're gonna have to fine tune your audio for the transducer cuz it just has a much weirder response but yeah you know then you can have awesome songs like that so possible enhancements I think none I think it's fine the way it is but of course people have opinions

so when I originally posted the video they're like well you have Bluetooth and you can play it from your phone it's like because I don't want to have my phone in the bathroom when I'm brushing my teeth for less than two minutes anyway uh-huh so I don't know and then inductive charging maybe we don't have to change the batteries and then actually the one thing I would say is some easy access to to the to the SD card cuz getting to it you have to unscrew the screw on the back of the you know where the batteries are pull that out pull the housing out and then change it so that's sort of a pain especially

for for testing but works fine for my purposes of giving a talk and putting it in a box okay so final slide yeah if you want to build your own everything's on my website and you can go directly to ash Park if you want to order the bare boards I have them shared so you can just go there order them get your toothbrush and you know have better sounds so with that yeah thank you and remember to keep that positive dental outlook and this by the way was another inspiration this is called the youth brush that's like for the youth of today yeah so thank you oh do we have any questions no kind you're not allowed to

ask questions but I'll be outside if you have any

you