Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Best way to use ADC and QEI

Status
Not open for further replies.

VirusX2

Member level 4
Joined
Nov 18, 2014
Messages
74
Helped
1
Reputation
2
Reaction score
0
Trophy points
6
Activity points
544
Hi all, i want to use ADC and QEI on a dspic30f4011. With the ADC am going to scan 6 channels, Six voltages and three currents. I'll scan them simultaneously by two (Phase 1 Voltage and Current) an so on.. I also want to use the QEI module. Can it run separately from ADC or i will have to stop Sampling to read the encoder?

Is better way to use a pic without QEI e.g dsPIC30f2020 and use an external QEI Decoder with I2C communication with the microcontroller?
 
Last edited:

Handling encoders are not requere any code in main cycle. That's a reason to use digital input devices such as buttons and encoders. Let 'em work in interrupt routine triggered by level changing - rising or falling depends of connection type.
 

Handling encoders are not requere any code in main cycle. That's a reason to use digital input devices such as buttons and encoders. Let 'em work in interrupt routine triggered by level changing - rising or falling depends of connection type.

If i use interrupt driven QEI, will it stop my adc sampling and reading process?

have you read this? ww1.microchip.com/downloads/en/DeviceDoc/70594C.pdf p5

select better chip

I need DIP package at 5V chip
 

The sampling rate is it divided by the channels i scan?
So with a 2MSPS maximum samping rate (dspic30f2020) for 6 channels i can get 2 Msps/ 6 = 333 ksps per channel?
 

this is very easy
since the qea module caputres the encoders and do the decoding on its own , you just need to read a register (position count) to get the value this is better than using a separate IC and communicating through SPI

you seem to be working with motor driver , take this HINT ahead using dspic33 mc or mu series , you will benefit from PWM trigger adc automatically to sample current and voltage with respect to duty cycle , and if you want THERE IS PIM MODLUE whish is 100pin dspic or pic on a through hole header and you can use development boards if you cannot solder SMD parts yet.

this is how it should be done , other wise use timer interrupt to trigger adc conversion

hope this helps
 

No, i don't working with motor driver, i am trying to develop a high speed DAQ to capture transient phenomena may occur on an electrical machine operation. I don't want to drive the motor, so i don't want to use pwm. I just want to capture voltage and current on 3 phases and also the speed of the motor with an incremental encoder. So best way is to use a chip with on-chip QEI module as i can understand.

The sampling rate of the ADC is it divided by the channels i scan? A chip with QEI is e.g dsPIC30F4011. The datasheet says maximum sampling rate is 1.1 Msps but the errata says maximum sampling rate is 750 Ksps. Let's say i want ti scan 6 analog channel. This rates applies to each channel separately or the maximum possible sampling rate on each channel is divided by the channel i want to scan. So for the 6 channels i can get 750 ksps per channel or 750 Ksps / 6 = 125 ksps per channel??
 

No, i don't working with motor driver, i am trying to develop a high speed DAQ to capture transient phenomena may occur on an electrical machine operation. I don't want to drive the motor, so i don't want to use pwm. I just want to capture voltage and current on 3 phases and also the speed of the motor with an incremental encoder. So best way is to use a chip with on-chip QEI module as i can understand.

The sampling rate of the ADC is it divided by the channels i scan? A chip with QEI is e.g dsPIC30F4011. The datasheet says maximum sampling rate is 1.1 Msps but the errata says maximum sampling rate is 750 Ksps. Let's say i want ti scan 6 analog channel. This rates applies to each channel separately or the maximum possible sampling rate on each channel is divided by the channel i want to scan. So for the 6 channels i can get 750 ksps per channel or 750 Ksps / 6 = 125 ksps per channel??

it will be divided if 1 ADC is used due to channel multiplexing , but if the PIC contains 2 or 3 ADC , you can divided 2 channels per adc and get 375ksps for example .
i recommand that you use the family refernce manual ADC section , it contains a lot of details , like similtaneous sampling and sequential conversion or vise versa .... etc
 

In that family you cannot change the reference settings (VCFG) anymore, so VREFH is always AVDD.
AVDD is specified to be in the range of 4,5V to 5,5V.

I want to use the dsPIC33EV256GM102, so the only voltage reference is the 5V from AVDD? There is no way to use a 4.096V external voltage reference?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top