External ADC

Are there any features that you would like to add to the VESC?
Posts: 171
Joined: 19 Jan 2016, 10:54
Location: Australia

External ADC

Postby lizardmech » 11 May 2016, 17:07

Would it be possible to add support for external ADC ICs? It's difficult to isolate everything for high power applications because you have so many analogue signals from the power stage into the MCU and routing everything well becomes an issue. If I could place an ADC near the current sensors I could minimize routing distance and sending everything over a digital signal makes isolation very easy. The external ADCs alse have higher resolutions and input voltage options. I'm not sure how it would work on the software side, would there be latency issues? Or is it just a matter of adding it to chibios HAL.

Posts: 905
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: External ADC

Postby rew » 16 May 2016, 08:16

IMHO this would be difficult. One of the important questions is: How clean are your current signals?

In the benjamin-VESC, the current sensors only work when the low-side fet is on. So the current measurement has to happen at the right moment inside the PWM cycle. This is done with a fourth PWM module in the timer that triggers the ADCs instead of an external pin.

Also, it is convenient that the ADC will run automatically after having been setup: All the conversion results end up in main memory for easy access.

On the other hand, if your current signals are clean despite the switching, then it doesn't matter much where you sample them, so if you have a regular task (interrupt) to read the data from the current sense ADC, then it might work....

Posts: 41
Joined: 21 Apr 2016, 13:06
Location: Austria/Vienna

Re: External ADC

Postby ViennaTom » 16 May 2016, 17:38

hi lizard, hi rew !

as already pointed out the ADC implementation within the STM32 family is very capable and the two PWM timers are used to trigger signal output and ADC sampling with the time of measurement being variable. External highspeed multichannel ADC's will require many control lines and fast SPI (or some other serial standard) communication together with a complete rewrite of the current and BEMF measurement. And the triggering and collection of data will engage the processor much more than the DMA-based ADC-reading which practically runs on it's own. But what might be a good idea is to use differential amplifiers outside the DRV830x (i think Benjamin also plans this in the new design) to improve ADC-results.
The 12-bit resolution of the ADC is more than enough imo.

just my 2 cents
Regards, Tom

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest