RC Truck Engine Sound Generator

Something I've been working on for the last week or two, engine sound effects for RC trucks.


Not much to look at...

The software is based on the example at http://playground.arduino.cc/Code/PCMAudio it's been changed to the point of only the timer setup functions are all that recognisable, only it's been rejigged for looping.

The software has a few modes to play with, the first simply has a pot connected to A1, the sweep between 0-1023 changes the rate of playback, simple. To simulate engine mass theres a managedThrottle option. You can change to a pulsewidth mode and connect it to a standard RC receiver. Or for the real fun you can talk to it over SPI, you send it the current throttle position and it will respond with the current engine rpm.

Explaining it here is a bit tricky, best bet would be to have a look at the video: RC Engine Sound Generator - Part 1 - YouTube
Much easier when you can see and hear it in action!

I've stuck the program up on github as I know a lot of people don't like downloading zips from unknown domains. Using github saves trying to update attachments on the forum.

Theres still lots to do though, while the program runs, it's just a wee bit messy. There's also some minor bugs that show themselves when things aren't connected correctly, and of course you can happily select more than 1 mode which really causes things to go nuts...

Of course, looping a short sample can only get you so far, ultimately I want to generate the engine sound on the fly and measure system current so we can see how much stress the motor is under. Should be able to make the engine sound bogged down in mud and all sorts of fun stuff, thats a way off yet though.

Beige
I realize this is an old post but the sketch you made is still very valid, I have taken the mojoenginesim and thinned it down to my needs (pot only), I have posted a more detailed explanation of my aims on Github, I would welcome some help on the next step i am trying to make, rather than go into detail here please see Github. Files attached there.
Thanks
Doug