Show Posts
Pages: [1] 2 3 ... 9
1  Community / Exhibition / Gallery / RC Truck Engine Sound Generator on: July 08, 2014, 02:10:10 pm
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: http://youtu.be/Uw-a45LOt3c
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.
https://github.com/BeigeMatchbox/mojoEngineSim

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.
2  Using Arduino / Displays / Re: Displaytech 64128K with ST7565 driver on: June 02, 2014, 08:44:53 am
In ST7565.cpp have a look for
Code:
const uint8_t pagemap[] = { 3,2,1,0,7,6,5,4 } ;

adjust the order so it matches your LCD. In your case swap the first 4 and second 4 pages.
3  Community / Bar Sport / Re: Beginner’s Blog on: October 10, 2013, 08:16:04 am
Ah, I've only ever used wordpress on my own web host so not run into that.

Have a look at the pre tag, it's not as fancy but it'll make the code easier to read http://www.w3schools.com/tags/tag_pre.asp

My web design knowledge peaked with HTML4 when people still used tables for layout, these days it's all CSS with a bit of HTML to glue it together.
4  Community / Bar Sport / Re: Beginner’s Blog on: October 10, 2013, 07:07:00 am
Since you're using wordpress have a look at,

http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/
and
http://elabz.com/arduino-syntaxhighlighter/


I used these when I was messing about with wordpress here http://www.74hc.co.uk/lcd-and-button-sharing-io/
Really need to start adding articles on a regular basis, but theres always other things to do!
5  Using Arduino / Displays / Re: Can the Sainsmart 3.2" TFT be turned on & off? on: December 28, 2012, 09:59:38 am
Nicely done, sorry I wasn't a bit clearer, was suffering from the 25th...
6  Using Arduino / Displays / Re: Can the Sainsmart 3.2" TFT be turned on & off? on: December 25, 2012, 03:24:21 pm
If this is the setup with the mid-board with a multi turn pot for the backlight all you need to do is pop a PNP transistor in the place of the pot controlled from a PWM source, it's also not a bad idea to rig up a separate 3.3v supply too, as if you plug the board into a Arduino mega1280 it wont do the FTDI chip any good smiley
7  Using Arduino / Project Guidance / Re: How to make Reliable Serial communication on: November 09, 2012, 09:38:45 am
I want reliable communication

You don't achieve reliable communication by eliminating errors - you achieve it by detecting and recovering from errors.
oo, theres a thing.
Personally I like to have a well planned serial system that wont screw up after time, then apply error correction as belt and braces.


To put things into perspective, I've got a mega linked with a uno using the uarts over an RS485 link, before applying any sort of error correction I had the mega requesting data from the uno every 500ms with no error in the logged data over 3 days, the link was running at 57600bps down 20 meters of cat5e.

Now, in the case of the OP, if there is any sort of distance involved using the uarts at 5v levels isn't ideal, and could very well be where the errors are coming from, so a more robust link would be helpful, such as the above mentioned RS485. Nick Gammon has a rather good intro here - http://www.gammon.com.au/forum/?id=11428
8  Using Arduino / Project Guidance / Re: High precision servo control. on: October 31, 2012, 05:01:59 am
Look around for a second hand model aircraft transmitter, something from Futaba, JR, Hi-Tec etc. will have fairly good gimbal joysticks you can remove.
Also with the servo, the cheapy ones are ropey at best, a servo from Savox, or other quality brand will be far more accurate.
9  Products / Arduino Due / Re: Operating Voltage on: October 23, 2012, 03:02:59 am
On most 2.4GHz receivers the signal is 3.3v, just about all servos from the last 5 years work just fine on these radios, so I should imagine they'll work just as well on the due. Just remember the power supply for the servo wants to be somewhere around 5v and you're good to go.
10  Using Arduino / Storage / Re: Question about EEPROM on: October 13, 2012, 09:14:01 am
The Arduino (Diecimila) running the status LCD in my home server, and it's peripheral parts have been running close to 24/7 for the last 3 years. I find that in general the only things that causes problems over time are program flaws, and running the hardware out of spec.
11  Using Arduino / Storage / Re: itdb02 sd card : unable to do working on: October 01, 2012, 09:15:22 am
Next thing to look at might be the waveform at the card socket, not sure exactly when I took the screenshot, it was either on the fresh board with a 10k in series, or with a divider, which ever it was the Arduino was clocking out data nicely, but the signal at the card was garbage.

Running SPI at slow speeds (/128) might just get it talking.
12  Using Arduino / Storage / Re: itdb02 sd card : unable to do working on: September 30, 2012, 07:02:29 am
If it's anything like the sainsmart board that i've been getting to work properly, at the every least you'll need to swap SCK and I think MOSI.

I had another problem where CS looked rather like bart simpsons hair, so I put in a 74HC4050 and now it all works at full speed.
13  Using Arduino / Sensors / Re: Maximum cable lengths for Dht22 and TMP36 Sensors on: September 26, 2012, 05:10:45 am
You might be better off using another micro at the remote end, it will allow the sensor wire lengths to be very short. You can then process the data and send it using serial down the 12 meter cable, preferably using RS485.

More work yes, but it will be very reliable.

The other thing to consider of course, the DHT22 has a temperature sensor built in.
14  Using Arduino / General Electronics / Re: A / D difference on: August 29, 2012, 03:01:10 am
roughly, digital is on/off, high/low, 1/0, and analog can be anywhere between and including a top and a bottom point...
15  Using Arduino / Sensors / Re: Best way to tell if a lid is open. on: August 28, 2012, 02:48:39 pm
Most people use the ball bearing tilt switches these days, similar in effect to the mercury ones, but you can sell em worldwide.
Pages: [1] 2 3 ... 9