View Single Post
Old 07-15-2009, 11:39 PM   #2017 (permalink)
MPaulHolmes's Avatar
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,119 Times in 734 Posts
I'm getting 4000 samples of the current per second through the serial port at 19.2 kbps. I'm just sending a raw number that is from 0 to 213 (about), where 0 means 0 amps, and 213 means 500 amps (about). I'm sending no CR or LF. The truly awesome "realterm" program that I'm using adds spaces between the data, and then I can put it in Excel or something and see some graphs. Oh ya! A step response with maybe 10000 data points is going to be nice! I thought 19.2 was going to be too slow! haha!

I also changed the program to make the current reading more exact. Before it was off by about 7 amps. I was using vRef = 2.5v, but the datasheet showed that there was a bit of variation possible, so I did a sample of the current at 0 amps (16 reads) and averaged them, which now shows 0 amps right now on the serial terminal (before it said 7 amps), which it IS! I don't have that dang thing hooked up to a car! There's no current going through it!

I want to make a database of motors, and the optimal P and I for each motor, given a persons preference for how the throttle should feel. As Adam was saying, various "profiles"! ya!

Here are a couple pictures of the setup in the room (I also added 32 other pictures of Ben's assembly. Some of it wasn't photographed because I ran out of stupid batteries!!!!!!!!! makes me mad):

Ben's Open Revolt Cougar Controller, battery for powering it, stk500, oscilloscope, serial port plug thing.

What's this? Motor current being blasted to the screen at 4000 samples per second? I think it is! ya!
kits and boards
  Reply With Quote