Monday, June 8, 2009

another car update

I know I haven't given a big update yet, so here it goes. The car is painted and we have 1 wheel and axel mounted. We solved the problem with the motor controller we were having: it turns out that the one we were using was broken when we got it. Once we started using the other one we order, the code worked great. The lights responded and the voltage went from -12 to 0 to 12. I emailed the company who made them and I found out that the PWM range is not standard for them. The PWM is Pulse Width Modulation, which is how servos get talked to. Instead of sending a static voltage, it sends pulses. The length and width of those pulses decide how the servo acts. So for us, pulses of length 1ms mean that the servo is going in full reverse (0 degrees on an r/c controller). 1.5ms is neutral (90 degrees) and 2.0ms is full forward (180 degrees). The duty cycle doesn't matter that much, but should be around 20ms. On the controller that we got, its cool because if you don't supply an extrernal battery, it executes the code using the 5v it needs to run (so you can get -5v to 5v). Anyway, so we got all excited and the multimeter was reading correctly, so we plugged in the motor and barely got any movement at all. We tried different size motors and they all worked ok. We concluded that it was drawing too much current. The controllers we got could handle 3 amps continuous and 9 amps max, at which point it cuts the power to save itself. It does the same for temperature. I noticed that even after only a few seconds, it started getting really hot. Based on everything that we had seen, we concluded that we were drawing too much. We calculated a theoretical draw of 13 amps (i fried the current measuring part of my multimeter). Our solution was a giant resistor. We did some math and decided that we would do 3- 1 ohm 30 watt resistors in parallel straight off the battery. We ordered those parts yesterday and they ship today. I am also going to try to get another motor controller in the mail to replace the broken one. If all goes to plan, then we should have it working maybe by the end of the week. I have to finish up some code for the arduino and the web interface. Right now the demo page for the web interface is just php buttons. I wanted to support keyboard use to make it easier, and it looks like a bit of javascript should do the trick. I will have the mouse be in a special box that reads the keystrokes. When a key is pressed, its ID is sent as a variable to another php page that isn't loaded. That way we should be able to have php do stuff without reloading the page each time. I am still experimenting with that, but the demo works for now. Then the only thing we have to do is install everything and get the extra stuff working. The extra stuff are things like rockets, speakers, lights, etc. We plan on debuting the car at bandcamp this year. Imagine this: its night, and they are almost done with practise. Then out of now where, a little power wheels are comes driving accross the field playing music with lights. It drives the the side of the feild and launches a rocket. It is this image that keeps us working. We are still trying to think of other things to attach to the car. I thought about some sort of turbo feature. Maybe use a relay on one of the arduino output pins to trigger a dump of like an extra 6-12 volts. We also will have a pan/tilt for the webcam. The webcam will be able to see my multimeter screen, so we can keep an eye on the battery, because it can't get below 10.5v. On that note, it turns out that you can charge a battery with a charger rated at the same voltage, but lower amp-hour rating. It just takes longer. The other thing we want to do it have an airsoft gun with pan/tilt as well on the back.

No comments:

Post a Comment