[Open_electroporator] ADC measuring, input range, VREF+/VDDA, current sensing after voltage sensing

Nathan McCorkle nmz787 at gmail.com
Thu Dec 28 04:14:27 UTC 2017


On Wed, Dec 27, 2017 at 7:54 PM, John Griessen <john at cibolo.com> wrote:

> On 12/27/2017 09:45 PM, John Griessen wrote:
>
>> I think I will leave it as is:  3.1V for VREF+/VDDA.
>>
>
> As long as the ADC is set to 12 bits, or 4096 resolution steps, the
> smallest step with VREF+ = 3.1V =
> 3.1/4096 = .00076.     The normal measured volts at 30k Ohms load will be
> .08, so that is ~ 100X smaller, or 1% step size,
> so not bad for getting a waveshape for current.
>

Hmm, is that for margin of safety for extremely HV events/transients?


>
> I'll look for a ADC mode where channels are triggered in sequence starting
> after an event from a timer.
> Then a timer can create an event that is just for ADC firing in a sweet
> spot relative to a pulse start edge.
> Then the next ADC channel fires as fast as possible after that.

That's not know to be possible, but I'm guessing it will be.
>

Sure, it's possible, but I think we're already in a very good position
as-is. We have lots of RAM, we have a simple DMA setup to run at
max-conversion speed transferring samples to that RAM. I don't think
switching ADC channels (i.e. other pins the ADC breaks out to, right?) will
provide any speedup versus staying on the same one. Maybe I'm
misunderstanding that bit.

As far as I'm concerned, this is the best resolution we're going to get,
and we're already capable of modifying the sample depth (recording time
length) from Python, just by changing the buffer length.
Here I've hard-coded it to 2048 samples... I didn't test trying to
re-create this interactively/on-the-fly to change the length to be honest
though:
https://github.com/kanzure/culture_shock/blob/master/g30_mcu_code/tim3_enable_tim1_tim2_tim5__tim1_shuts_down.py#L58

The C code patch wasn't really that much code, 30-40 lines if you don't
include the sections where I was just commenting-out the existing function:
https://github.com/kanzure/culture_shock/blob/master/FOR_ADC_DMA__adc.c.patch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cibolo.us/pipermail/open_electroporator/attachments/20171227/c48d5a44/attachment.html>


More information about the open_electroporator mailing list