Back in July 2012, I saw a post on Dangerous Prototypes that highlighted EMIC-2, a new board available from Parallax that was designed by Joe Grand of Grand Idea Studios. EMIC-2 is a speech to text module, that allows you to add speech output to microcontroller projects – well actually, anything that has a serial UART – and it’s as simple as sending it the text that you want it to say, and it speaks !
I was really interested by this – not for any particular project I had in mind, but just in a general sense. It however was going to be yet another project to go on the long long list….. But being the way I am, I checked online and saw that the EMIC-2 module was out of stock – wow, first run batch sold out very quick, so I guess I can ignore that for a while
Anyway I was listening to a podcast in the car one day (Gadget Gangsters – now seemingly gone the way of the dodo) and they mentioned Joe Grand and the light went on again. When I got home I checked the web, and found that the EMIC-2 was in stock – so I went and ordered one. Of course, the next day I get an email saying that they had no stock and my order would be a few weeks before it’d be able to be delivered – so the project really went to the bottom of the list.
Eventually I get a parcel note at the post office, and on collection it turns out it’s my EMIC-2 – so of course, all other projects go on hold and the EMIC-2 takes pride of place on the “most current project board”, i.e. the centre of the desk.
Starting to talk to EMIC-2 was pretty much a snap. As a UART device, I find the simplest way to avoid any mishaps or unknowns is to use a USB to serial module and a terminal program – connect the UART device to the USB–>Serial and start typing. So out comes my cheap-as CP-2102 USB adapter (under $3 each on eBay, buy a few!) and connect it up. Yes, as usual, I suffered UART Dyslexia so a quick switch of the wires and I was able to press Enter on the PC and see a response in the terminal program
Now, onto *really* talking to this device. It has a pretty simple protocol, as the datasheet describes. All commands take a single character as the command, followed by more characters for the command parameters. So for example, to set the volume you simply send a “V” and the number you want to set the volume to, so a real command would be “V10” to set the volume to 10. So in the terminal window I just type V10 and press enter, and the module should return “:” sans quotations to confirm the command. Then, to make it say something I had better get the audio out connected up !
Here’s where I hit my first snag. The module has two speaker connectors; one is two pins on the set of header pins which are for the + and – connections of a speaker, and one that is a barrel connector for a headphone jack. I plugged in a set of earbud headphones into the existing barrel connector, and told the module to play it’s demonstration message (Command: D0) but nothing happens ! I see the LED turn red while it’s speaking, the terminal come back with the : prompt once it’s done, but no sound. I tried a few different pairs of earbud headphones, as well as a hand-made connection to a stereo plug from jaycar and a little 8ohm speaker, but nothing worked. So I asked around on the Parallax forums and eventually figured out that if I connected to the SP+ and SP- pins on the header the sound worked fine, so the barrel connector was crook. I let Parallax know and they’re great, they dispatched a new module, although again there was going to be a bit of a wait because they were out of stock (man, they’re obviously popular!).
What I really wanted for this module was a Gadgeteer module, so my TinyCLR.com friends could plug it into a Gadgeteer mainboard. So out comes Eagle….. a few days later, out pops a design I was happy enough with, and I send it off to be made at OSHPark, the evolution of Laen’s Dorkbot PDX PCB manufacturing runs. The board as originally designed (it has been refined since) was 25mm x 25mm, and for a set of three boards the price was under US$5, plus the usual postage costs to AU.
While the boards are being made and posted back, and the replacement module is coming from backorder and being posted back, I set about making a pseudo driver for the device. Being great with ideas, less so with code, I cobbled something together that worked for most of what I wanted – it doesn’t have any of the character set mapping that the dectalk parser is more in need of, but generally it’s not too bad to just get the module to do the core thing it does – take text input and turn it into speech.
Eventually my OSHPark Gadgeteer adapter boards arrive back – looks pretty in purple !
One good thing about a proper board like this is you can choose what direction you want the EMIC-2 board to sit atop the Gadgeteer adapter – if you swap the side the female 0.1” connector goes on, you can have it either overlapping the whole adapter board, or you can have it extending past the board boundaries where it’s easier to get to the Gadgeteer connector. I chose the latter to solder mine up. Based on my last experience with hand soldering Gadgeteer headers, the footprint I was using was expanded so the pads were much longer, which was so much easier to solder onto – yay !
So then, the last thing to do is to plug the EMIC-2 module in and wire up my speakers to the screw-down terminals, connect up a mainboard and write a demo of it’s features for you all to enjoy.
Well ok, so I did most of that way back when, and actually I was testing it on a Panda – then I did some other things…. But someone recently dug up the old chatter on the forum about this module so I *finished* doing what I was going to do, and now have published it.
<cue drumroll> ta da.
I’ve put a little bit more effort into the “driver”, but not into code comments I’ve also put some effort into the demo app, moving it up to the SDK 4.2 from Panda days. You’ll find the driver code published on the tinyCLR codeshare here. You’ll find the usage example there too.
Above is the video where you can hear the module at work. Sorry it’s a bit long (and boring) but it shows off a few features like the many voices the board supports.
Code comments and suggestions best left on the tinyCLR forum; see you over there soon !
PS: The replacement EMIC 2 module arrived from Parallax not that long after the OSHPark boards arrived. Plugged it into my test rig (aka USB to serial adapter) and connected up my headphones, and it worked first time. So the headphone socket on the original board was what was dodgy. I hit it with the soldering iron once I had a working one, and lo-and-behold, I made it work. Double bonus! I gave it to a friend, and I hear it’s now used as the evil voice in a robot Too Cool !!
Yes, that’s right, the wait is over….. my PCBs from Dorkbot PDX have arrived in the post ! Here they are in all their purple loveliness.
Sorry about the photography, this is my electronics blog not my photography blog, so point-n-shoot camera came out and handheld “macro” mode with no flash was the chosen mode.
Man that MPR121 is a *small* package. It’s a QFN20, and a pad pitch of 0.5mm. It makes the pads on the .05” connector look huuuuuge !
When it comes to soldering the QFN20 onto the PCB, the fact that “QFN” stands for Quad Flat No-leads really becomes apparent. You can’t get your normal soldering iron onto anywhere that you could possibly hope to get some solder, the chip, and the pads to meet in that joyous harmony called “properly soldered”. So since I don’t own commercial wave-soldering machine, and I don’t have a toaster oven I could repurpose to be a reflow oven, and I didn’t have a spare frypan around that I could convert/sacrifice to be a soldering skillet, I whipped out the (new*, so far unchristened) Atten 858D+ hot air rework station, whacked a bit of solder paste on the pads, plonked the chip down, fired up the heat, and hey presto, a few minutes later the chip appears soldered to the PCB ! I guess we’ll only see once we get a chance to connect it up to my Fez Hydra and start looking at the driver (although luckily there’s at least one sample out there ). That maybe something for the weekend – bring on the weekend !
* Here’s a great plug for the eBay supplier of my new Atten 858D+. Looking around on eBay, I found lots of eBayers that ship from Hong Kong or China, and the buy-it-now price for this unit was around $59. Then I came across one located in Sydney, and wow, the buy price was only $63. Wow, a $4 “premium” for having someone in AU to buy from. Wow. (Yes, I was impressed). But that’s not where it ends. Clicked buy one afternoon, sometime about 3, and paid with paypal. Before the end of the day, I had an email from Aus Post that a parcel had ben dispatched to me, and it arrived at the PO Box by 8am the next morning. W. O. W. What a great eBay seller. If you’re in AU and want something fast and Carmates has it, my experience says you’d be lucky to find a better dealer.
I needed to make a touch keypad for a project I am doing at home. Looking around, SparkFun have one, here, that I liked the look of – except for my use, I wanted it to be simpler – it had to have up, down, left, right, and OK buttons only.
Errol GMod, the artist formerly known as Errol, over on TinyCLR forums has used the MPR121 to build a touch keypad for the CANxtra, one of the devices that GHI had on run-out sale last year. It seemed pretty easy to understand this design (ha !) so what else was I to do, but design one of my own.
So armed with my knowledge (double ha !) I took some design input from these two sources and threw something together.
My only real requirements were that it needed to have a simple button structure, to fit alongside an LCD display (a standard text-based display with 20×4 characters using an HD44780 controller chip). I decided to use a Gadgeteer standard connector so that I could use it also on a Gadgeteer compatible mainboard if I wanted to.
No fancy 3d renders, no fancy pictures, nothing. Just a set of screen capture images from a preview of the gerber files that I created.
Now the proof will be in the pudding – the gerber files for the boards were submitted to the Dorkbot PDX PCB service, and some time in the future they should arrive back here. Now for the suspenseful part, waiting for the package to arrive, who knows when, and then the joy of trying to solder that miniscule processor onto that board, and test it out ! Here’s hoping it all works !
I’ll update the post when the boards arrive and when I break out the soldering iron !
If anyone thinks they would like the original Eagle files, leave a comment. I’ll get them cleaned up and posted here when I get a chance.
Yes, there’s new content here. Wow, I never thought it’d come true either !
Over the weekend I was playing in Eagle, an electronics circuit CAD package. I’m creating a touch keypad for .Net Gadgeteer, to actually connect to my Fez Panda (not a Gadgeteer device). This will be released as an open hardware project. No details or pictures yet, just this post to remind myself to actually spend time and ship it to the board house.
You can only take my word for it, as by now even the radar loop has probably moved past this shot.
Another entry today, wow…..
The Atom is running well. a big plus was the January 23rd firmware update, made a HUGE difference to speed. Nice one O2! My only problem, and it could be a major one, was that I had a Catastrophic Failure of the Stylus. Luckily the unit came with a spare, as there currently seems to be no supply of genuine O2 replacements in AUS, and no aftermarket ones yet appearing on EvilBay.
I’ve been getting WiFi sorted for home and work, plus going to start doing email wireless sync Real Soon Now <tm> against Exchange server. Bring on AKU2 I say !
This public service announcement has been bought to you via WiFi and Atom, together at last. (except pocket IE and Mobile Spaces stripped my CR/LF’s out so I’ve had to re-edit it. )