Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

sampling ,adc

Status
Not open for further replies.
hi guys
i have to sample a signal . Is there a direct way of doing that .
should i have to perform adc in specified time delays . is there some means by which i can directly give the sampling time and get the values
 
hi,
Which micro-proc do you have and which language do you use to write programs.?
E
 
You can set up a timer (hardware) and have it role over every 10mS to signal, go read the ADC.
You can trip an interrupt or just pole the timer.
I did not look at your part but some parts have a wire from a timer to the ADC that will cause the read to begin on time and signal the software. Look carefully at the ADC block diagram and see if the of the timer signals can start a conversion.
 
You can set up a timer (hardware) and have it role over every 10mS to signal, go read the ADC.
The sampling time and sampling rate are important to get right.. but once you get the thing going, those timings are easy to adjust.
It is impossible to say what the sampling rate should be without knowing what kind of signal you are sampling.. and what for.

If you really need to just get the data then I would buy a USB DAQ that gets the job done. No need to build your own just because you need to make some measurements.
Example: https://www.mccdaq.com/usb-data-acquisition/USB-1208LS.aspx
 
Last edited:
You can set up a timer (hardware) and have it role over every 10mS to signal, go read the ADC.
You can trip an interrupt or just pole the timer.

On the pic it's even easier than that.. CCP2 can be set up as a special trigger combined with timer3 to automatically sample the ADC.. Section 15.1 of the datasheet
 
Are you planning on recording 1024 samples (or more) then doing the software (fft).
OR
Are you planning on doing the filtering in real time?
 
Do the math and see how many samples you need. Do you have that much memory? 2k is all the RAM you have.
 
Not to hijack this , but it might matter to the OP.
I modded a Nokia charger to deliver about 13.4V into a PIC hydroponic controller (3.5" x 1.8" of surface mount parts, dbl sided PCB) I built. There is a Lead acid 7AH gel cell being trickle charged as battery backup and a 12V low amperage pump.
Ok, without the pump attached the PIC is having 'lockup' probs sometimes when sampling the adcs (Supply volts, CDS LDR, Thermistor etc.) once the charger is connected. It is ungrounded. I note with a grounded (much noiser) PC 12V supply all seems well. In fact simply clipping the PC supply's gnd terminal (not the +ve) to the system powered by the nokia the 'lockups' go away. Also attaching a grounded O'scope also causes the prob to disappear!

Clearly an apparent 'noise' prob. I thought. After much efforts with ferrite cores, ferrite beads, assorted caps ranging from .01uf to 100uF across the supply I can't figure it. The O'scoped 'noise' is under 20 mV (abt 200Khz) on the 13 V line and almost nothing after the 7805 Vreg. Yes I have a 0.1 uf cap on the PIC Vdd/Vss pins and a 1 uf on the 7805 output & input. The nokia charger has a 47uF 16V on its output line.
I setup a watchdog and a counter....I am getting about 10 resets per hour as measured over a 12hour cycle with the charger or charger AND battery as the supply. No resets with the battery alone.

Any suggestions?
 
Not to hijack this , but it might matter to the OP.
I modded a Nokia charger to deliver about 13.4V into a PIC hydroponic controller (3.5" x 1.8" of surface mount parts, dbl sided PCB) I built. There is a Lead acid 7AH gel cell being trickle charged as battery backup and a 12V low amperage pump.
Ok, without the pump attached the PIC is having 'lockup' probs sometimes when sampling the adcs (Supply volts, CDS LDR, Thermistor etc.) once the charger is connected. It is ungrounded. I note with a grounded (much noiser) PC 12V supply all seems well. In fact simply clipping the PC supply's gnd terminal (not the +ve) to the system powered by the nokia the 'lockups' go away. Also attaching a grounded O'scope also causes the prob to disappear!

Clearly an apparent 'noise' prob. I thought. After much efforts with ferrite cores, ferrite beads, assorted caps ranging from .01uf to 100uF across the supply I can't figure it. The O'scoped 'noise' is under 20 mV (abt 200Khz) on the 13 V line and almost nothing after the 7805 Vreg. Yes I have a 0.1 uf cap on the PIC Vdd/Vss pins and a 1 uf on the 7805 output & input. The nokia charger has a 47uF 16V on its output line.
I setup a watchdog and a counter....I am getting about 10 resets per hour as measured over a 12hour cycle with the charger or charger AND battery as the supply. No resets with the battery alone.

Any suggestions?
Please start a new thread with this.
 
Status
Not open for further replies.

Latest threads

Back
Top