Deutsch   English   Français   Italiano  
<vr53al$g9rp$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: wmartin <wwm@wwmartin.net>
Newsgroups: sci.electronics.design
Subject: Re: rp2040 a2d?
Date: Sat, 15 Mar 2025 16:43:17 -0700
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <vr53al$g9rp$1@dont-email.me>
References: <vqqcm3$26scc$1@dont-email.me> <vqsacp$2m7uh$1@dont-email.me>
 <toa4tjh5m372t1ghstcu3pfvgt7ek52tn8@4ax.com> <vqtium$2uido$1@dont-email.me>
 <6ca4f021-dfbb-187a-df3e-d895b217924b@electrooptical.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 16 Mar 2025 00:43:17 +0100 (CET)
Injection-Info: dont-email.me; posting-host="bf399fc3ee933b1e52c2a0e59c2fea5d";
	logging-data="534393"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/tRiIQNlOv4LP8NW62yxugV5ByKK5y5Y0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:osINHIhtbrDnug7rHXdqmcLdZCs=
Content-Language: en-US
In-Reply-To: <6ca4f021-dfbb-187a-df3e-d895b217924b@electrooptical.net>
Bytes: 3737

On 3/13/25 08:17, Phil Hobbs wrote:
> On 2025-03-12 23:20, wmartin wrote:
>> On 3/12/25 17:52, john larkin wrote:
>>> On Wed, 12 Mar 2025 08:48:41 -0700, wmartin <wwm@wwmartin.net> wrote:
>>>
>>>> On 3/11/25 15:15, wmartin wrote:
>>>>> Anyone have experience using the a2d in an RP2040? I've heard some
>>>>> negative opinions, would like to check against actual user 
>>>>> experience...
>>>>> in particular with the Pi Pico hardware. I'm using one as a plug-in
>>>>> subsystem on a simple controller now, but not using the a2d just yet.
>>>>> Question is: Use it or put an external a2d on the spi bus?
>>>>> Thanks,
>>>>> Bill M.
>>>>
>>>> A big thank you to all who responded! External seems the safest bet...
>>>> -bill
>>>
>>> One trick to improve a bad ADC is to add noise (or a triangle wave) to
>>> the signal and lowpass filter or average a lot of readings. That will
>>> pave over missing codes, but not help gross nonlinearity much.
>>
>> I see how that goes, but I think I'm better served by going "outside" 
>> the micro in this case. The game is to monitor & record the position 
>> of a moving mechanical part, moving quickly & not in any kind of 
>> predictable periodicity, so averaging probably is out of the picture. 
>> I may ditch the a2d idea entirely & go with an encoder strip...if I 
>> can figure out where to put it!
>>>
>>> You can make a triangle from a timer and a port pin into an RC.
>>>
>>> An ADC inside a uP is tricky. There's too much noise, and the silicon
>>> process is optimized for digital, not analog.
> 
> Averaging doesn't have to be stroboscopic--you can just run the ADC N 
> times faster and sum N adjacent samples.
> 
> A 500kSa/s ADC can average a lot of samples on the time scale of most 
> common sorts of mechanical motion control.  How fast is your control loop?
> 
> Cheers
> 
> Phil Hobbs
> 
> 
> 
> 
> 
> There isn't really a control loop, I'm just measuring the motion profile 
of an air cylinder connected to mechanical linkage on a sequential 
gearbox shifter. Current off the shelf systems just have a "guesstimate" 
delay factor plugged in to the computer that says when to shift, how 
long to kill the ignition during the shift. It has no idea if the 
mechanism actually did what was intended... which can make obnoxious 
noises & expensive scrap metal if you get too greedy minimizing the 
delay time. The hardest part of this exercise is coming up with a sensor 
mounting that doesn't get in the way or fall off from vibration, etc.