Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Analoge samples

(you are viewing a thread; or go back to list of threads)

Analoge samples (by Gurt)
Hi all,
I want to take an analoge sample for a "x"periode of time and store this value, take another sample for a "y" periode of time and compare this with the previous value,
Can anyone help me with this?
Thanks in advance

Gurt
Tue May 15 2012, 10:26:15
(no subject) (by Jonathan Westhues)
What do you mean by an "analog sample for a period of time"? Do you mean the average value over that time? If yes, then you could just take many A/D samples over that time, and sum them up in software.
Tue May 15 2012, 12:46:41
(no subject) (by Gurt)
Hi, I want to take every ten seconds a analog sample for 3 minutes, store the lowest value (VALUA A), take every ten seconds another sample for 3 minutes, store the lowest value (VALUE B) and compare this with the previous value

Thanks again
Wed May 16 2012, 05:59:49
(no subject) (by Jonathan Westhues)
The attached program might do what you want. The internal relay Rosc_10s toggles every ten seconds, and we sample the A/D (and update our minimum, if the sampled value is less than the minimum) on each rising edge.

That relay also clocks a counter, with period of 36 counts; so the counter period is 360 s, or six minutes. At the three minute mark, and at the six minute mark, we record the values of that minimum, as val_A and val_B.
Wed May 16 2012, 12:36:43, download attachment adc-min.ld
Analog samples (by Gurt)
Hi Jonathan, thanks for the help, it works perfectly.
Now I move forward.
Gurt
Wed May 16 2012, 13:54:17
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):