View Single Post
Old 01-20-2011, 01:39 PM   #4251 (permalink)
DJBecker
EcoModding Apprentice
 
Join Date: Nov 2010
Location: Annapolis
Posts: 159
Thanks: 0
Thanked 32 Times in 27 Posts
Quote:
Originally Posted by MPaulHolmes View Post
One thing I like about the dspic is that you can do 4 A/D conversions simultaneously. Throttle, current, temperature, voltage in my case. The specs are that it is basically a regular old control board, but now surface mount, dspic30f4011, with the driver section removed, and voltage monitoring included.
Do you see this as a big advantage?

I was initially disappointed in the slow speed of the AVR A/D converter, but it turned out to be only a minor problem when I went to write the actual code.

The current sensor is the only thing that needs to be constantly monitored. And doing that on alternate cycles seems to be good enough, leaving plenty of A/D time for everything else.

Almost all of the other sensors only need an occasional sample. The software limits the throttle ramp, so 10 samples per second would be fine. We are using plastic package temperature sensors (LM335 and MCP9701) where 1 Hz sampling is more than good enough. Sequentially scanning all 16 A/D channels on the "odd" cycle is easily fast enough for all of these.

The next step up would be sampling the motor current at the center of both drive and freewheel phases. But would that really tell us anything new? It would get rid of some sample noise and bias, but is unlikely to add more device protection or a better driver experience.

I initially had the battery current on my fast sample requirement list, but there isn't much that you can do with that in the fast control loop. You can only verify that the battery current is approximately proportional to the PWM percentage, and that is best done in the slow monitoring/communication loop.

Now if we had a really fast A/D converter, with programmable offset and a DMA transfer, we could make o-scope waveform data available to the dash display. But that's a big step up. And an AVR-class processor not only doesn't have the hardware, speed or computational horsepower, it doesn't have the memory.

  Reply With Quote