Help to find a microcontroller

Go To Last Post
54 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey everybody!

 

I work in a laboratory, they made new sensor that uses piezo material and works with oscillation (resonance frequency). This device has a direct medical application as a detection of lung disease (cancer - even in early stage-, asthma, COPD).

I need to acquire the frequency of 8 digital signal (signal sinusoidal who went into a comparator) of 50 to 400 kHz with a precision of 1Hz (or at least 10Hz). At the end I want to process them on a computer. I need 5 to 10 measurements per second.

 

Someone told me that it's possible to found a microcontroller with 8 timers who have a input connection from an external pin. Acquire and process all the information with one single microcontroller. I want to know if it's true, and if you have some reference of the most simple µC who can do that.

 

Thanks !

Last Edited: Wed. Jun 8, 2016 - 09:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you want 1 Hz resolution 10 times a sec. I don't think it will work if you only keep a digital signal.(try sample direct on the sinusoidal signal)

 

At that kind of  freq, I think that I would try to make a AFC of the carrier wave (the freq you need), and deal with it as a AM radio.(with no modulation) 

I don't know if there a chips direct for that, if not I would try to see if it can be done with a DDS and a mixer.

 

Perhaps a PLL can do it but it a big range (or do you mean 50kHz to 400kHz?)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need a sampling frequency far too big if i want to use the analog signal. I made some research and keeping just digital signal is a more accurate and less intensive..

The sensor itself just shift ~500hz max, but every batch of sensor have a different frequency.

I'm gonna made some research tomorow on your suggestion

I haven't found a high precision pll of this range.

Thanks !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I suggest you look at Analog Devices offerings.  They are well known for this kind of stuff.

 

 

Just a thought......

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

then I will make a mixer, where the tuner (the DDS) is used to calibrate the freq, so the 500Hz change will be in the ballpark of about ? 5KHz and then make a FM demodulator (arc tan but a table will do)and you will directly get output that follow the freq.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you use a pll but don't close the loop, the pll's "error signal"(that should control the VCO) will be exactly what you need. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

th0mash wrote:

Someone told me that it's possible to found a microcontroller with 8 timers who have a input connection from an external pin. Acquire and process all the information with one single microcontroller. I want to know if it's true, and if you have some reference of the most simple µC who can do that.

Sounds easy to say, but there is no simple uC that has 8 external timer inputs.

External clock handling tends to be overlooked on MCUs, and the focus tends to be more on PWM out.

A simple 8 bit uC could manage as many channels as it has external clock & capture, I'd expect in the region of 2 to 4 to be supported.

32 bit is no longer simple, and there is the Parallax Propeller that has up to 16 x 32b timers, in 40 or 44 pin package.

ie that has a good timers-to-pins ratio

A counter example using this is here

http://forums.parallax.com/discu...

 

Now to the problem itself...

 

th0mash wrote:

I work in a laboratory, they made new sensor that uses piezo material and works with oscillation (resonance frequency). This device has a direct medical application as a detection of lung disease (cancer - even in early stage-, asthma, COPD).

I need to acquire the frequency of 8 digital signal (signal sinusoidal who went into a comparator) of 50 to 400 kHz with a precision of 1Hz (or at least 10Hz). At the end I want to process them on a computer. I need 5 to 10 measurements per second.

The sensor itself just shift ~500hz max, but every batch of sensor have a different frequency.

 

Interesting problem.

 

If you want 8+ Channels in a single chip, in a Lab, I'd also suggest looking at a CPLD Eval Board, something along the lines of 

LCMXO2-7000HE-B-EVN    $26 at Mouser

 

If you want 1Hz and 10 reading a second, that is certainly possible, but you need Reciprocal Counting, which is where you measure both a fast SysCLK and whole periods of Fi.

Taking the CPLD board above, with an added 20~50MHz External Oscillator, (PCB footprint X2) and using 10 reading a second, we get

400kHz will count to ~40k(dC) in 100ms, 50MHz will count to 5M(dT) in 100ms 

50kHz will count to ~5k in 100ms, 50MHz will count to 5M in 100ms 

(40k/5M)*50M  = 400000, and the resolution of this is when that 40k moves 20ns in 100ms, so 

 (40k/(5M-1))*50M  = 400000.08000  

 (5k/(5M-1))*50M   = 50000.0100

ie 80 milliHz, or 0.2ppm, comfortably under your 1Hz target, and this can measure 10Hz ~ 50MHz with that same ~0.2ppm precision.

 

This board has a serial port path, and 8 channels of dC and dT capture is a min of 64 bytes in 100ms - say 100 bytes, for ~ 10k baud min. No issues there.

Maybe send at 1MBd  via the on board CPLD <-> FT2232H link, for a simple /50 Baud.

 

The CPLD lets you do more than 8 channels, should you need to expand.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

then I will make a mixer, where the tuner (the DDS) is used to calibrate the freq, so the 500Hz change will be in the ballpark of about ? 5KHz and then make a FM demodulator (arc tan but a table will do)and you will directly get output that follow the freq.

 

Isn't that a lot of extra work, for a signal that is already inside any uC/Logic window.

A mixer would make sense where you either chase ppb, or have Fi >> 100MHz 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would not put the signal into a micro before it's mixed etc.

 

I just fear that it can't be done with 1 Hz resolution every 100ms, by a "simple" micro.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I understand, there are eight square wave signals with 50% duty cycle (up portion equals down portion of the wave).  The frequencies of each signal can be 50KHz to 200KHz, meaning the high cycle of each signal is 10 microseconds [uS] to 1.25uS.   The set of eight signals need to be measured with 1Hz accuracy 8 to 10 times a second.  Since (I assume) that each signal is always on and running a different speeds, then it's not possible to measure all eight signals at the same time.  Because each signal has a different rising-edge starting time

 

To a hammer, every problem looks like a nail. To me, every AVR situation needs an Arduino.  The $3 Nano clone has a crystal-based speed of 16MHz with a timer period of 62.5 nanoSeconds.  That's 20 counts of the timer for the 400KHz speed and 800 for the 50KHz speed.

 

It seems that the 16-bit timer2 could be used in input capture mode.  The timer starts incrementing (from 0x0000) on each system clock when the input signal goes high and stops when it falls to logic 0_ground.  Measure each of the eight signals one after each other every 100 milliseconds (10 measurements/second/signal).  Use the rest of the CPU time to format the timer 2 reading for output to the PC.  This output can be in UART, SPI, or I2C format.

 

Use a 74HC251 8 input -to-1 output multiplexer to select the channel being fed into the timer2.

Last Edited: Tue. Jun 7, 2016 - 10:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not ;
connect all the digitalised inputs to one port,
use one timer to sample and store that port into RAM at a high rate for a few seconds, (will need a few Mb of external RAM),
unpack the inputs and and analyze the timings and relationships,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

NM. Misread OP.

Letting the smoke out since 1978

 

 

 

 

Last Edited: Tue. Jun 7, 2016 - 10:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
The CPLD lets you do more than 8 channels, should you need to expand.
An alternative to a small cPLD is the XMEGA Custom Logic Module (XCL) with two 8b counters with capture; thread here about a 2Mbps FSK modem implemented using XCL.

XCL is in XMEGA E with an additional three 16b counters (4 more capture channels for a total of 6); there is 32b capture by cascading the two 16b counters.

Though no XCL, XMEGA AU has eight 16b counters.

http://www.atmel.com/products/microcontrollers/avr/avr_xmega.aspx

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
If you want 8+ Channels in a single chip, in a Lab, I'd also suggest looking at a CPLD Eval Board, something along the lines of ...
Another cPLD alternative is

Silego Technology

GreenPAK 4: Programmable Mixed-signal Matrix

http://www.silego.com/products/greenpak4.html

...

  • Counters/Delays (CNT/DLY)

...

SLG46620 has 9 counters (3 14b, 6 8b)

SPI interface to read and write each counters end count.

Multi-platform IDE (PC Linux, PC Windows, Mac OS X)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

I just fear that it can't be done with 1 Hz resolution every 100ms, by a "simple" micro.  

Sure it can.  I can do a 32b Reciprocal Counter in a 31c Micro, but doing 8 channels the OP asked for is the tricky part.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

SLG46620 has 9 counters (3 14b, 6 8b)

hehe, yes, SiLego have some nice stuff, and they are improving, but still a little lightweight for what the OP needs, which is 8 x Reciprocal Counters.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mikech wrote:
Why not ; connect all the digitalised inputs to one port, use one timer to sample and store that port into RAM at a high rate for a few seconds, (will need a few Mb of external RAM), unpack the inputs and and analyze the timings and relationships,

 

Interesting idea, but since there is a PC host anyway, this sampled data could be streamed to the PC from a (eg) FT2232H in FIFO mode

400k will need around 1Ms/s, or ~8MHz bit rates, probably ok for HS USB (480 MHz) and a good PC ?

 

At the more modest 1Ms timebase, precision drops from 0.2ppm to 10ppm, and that just falls outside OP's 1Hz target / 10ms with LSBs of 4Hz at 40k and 0.5Hz at 50k.

Maybe 10ppm is good enough ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
... but since there is a PC host anyway, this sampled data could be streamed to the PC from a (eg) FT2232H in FIFO mode
Logic analyzer?

https://www.saleae.com/

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mikech wrote:
...

connect all the digitalised inputs to one port,
use one timer to sample and store that port into RAM at a high rate for a few seconds, (will need a few Mb of external RAM), ...

Or, port-to-RAM via a DMA controller.

Home > Products > Microcontrollers > AVR 8- and 32-bit MCUs > 32-bit AVR UC3 MCUs

AT32UC3C264C

http://www.atmel.com/Images/doc32117.pdf (AT32UC3C Series Complete, 19.6MB, ..., 03/2012)

(search for "local bus")

...

A local bus interface is provided for connecting the CPU to device-specific high-speed systems, such as floating-point units and I/O controller ports.

...

The local bus is able to transfer data between the CPU and the local bus slave in a single clock cycle.

...

UC3C has a memory DMA controller.

IIRC the same capabilities are in UC3A.

Might be a way to connect a synchronous subsystem (cPLD, FPGA, display, camera) to an asynchronous subsystem (MCU's EBI, MCU's ports, etc)

Some XMEGA also have a memory DMA controller but XMEGA cannot DMA to/from a port (it's DMA is event system, crypto engine, ADC, DAC, timers/counters, SPI, USART, data memory)

To do something similar on XMEGA :

  • a cPLD or FPGA to do sync-to-async XMEGA EBI, or,
  • a port pin sources an event that's sunk by the DMA controller as a trigger to read and transfer a port's IN register

Edits : typo, strike-thru

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jun 9, 2016 - 05:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:

... Since (I assume) that each signal is always on and running a different speeds, then it's not possible to measure all eight signals at the same time.  Because each signal has a different rising-edge starting time

It is possible, you just need the right hardware :)

 

Simonetta wrote:

Use a 74HC251 8 input -to-1 output multiplexer to select the channel being fed into the timer2.

 

A MUX drops resolution, and loses sample sync**, but given a Reciprocal Counter has excess resolution, this may be an acceptable way to get 8 channels into a small MCU.

Taking a 12.5ms MUX rate, for 8 scans in 100ms, we get for a 32MHz SysCLK

 

 ((400k*12.5m)/(32M*12.5m-1))*32M = 400001.000   ie just meets the 1Hz LSB, with a MUX.

 

 

**Because this is a medical sensor app, the OP may likely require that all samples are taken at the same time, which would exclude a MUX.

Last Edited: Wed. Jun 8, 2016 - 01:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now when OP placed this in the UC3 forum so: 

 

I tried the atmel chip selector and the chips like AT32UC3A3128 have 12 input capture channels, so I guess that it can do the job in simple C.

 

(I have never used AVR32 chips so no real help from me.) 

 

add:

 

 

and a "Reciprocal Counter" is just an other way to make a mixer.

Last Edited: Wed. Jun 8, 2016 - 07:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

Now when OP placed this in the UC3 forum so: 

 

I tried the atmel chip selector and the chips like AT32UC3A3128 have 12 input capture channels, so I guess that it can do the job in simple C.

Capture alone is not quite enough, unless the OP can tolerate external prescalers.

something like 2^12 dividers (HC4060? x 8 )  get down to a Capture rate that software can keep up with, and that can give the 1Hz LSB with concurrent measuring

 

Some PICs have /4 /16 prescalers on the capture, so they help a little, but it is still tight to manage 8~12 channels of capture from 400kHz 

 

Still, the 144 pin UC3A shows just how large conventional MCU's have to go, and still not quite manage the 8 channels the OP requires.

 

sparrow2 wrote:

and a "Reciprocal Counter" is just an other way to make a mixer.

Well, it has 2 sources, (fIn, fSys) but after there, any similarities end...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

32 bit is no longer simple, and there is the Parallax Propeller that has up to 16 x 32b timers, in 40 or 44 pin package.

 

Who-me wrote:

If you want 8+ Channels in a single chip, in a Lab, I'd also suggest looking at a CPLD Eval Board, something along the lines of 

LCMXO2-7000HE-B-EVN

 

For my application what you think is the most practical solution ?

I never use CPLD/FPGA devices, do you think this project is doable in 1.5month by a beginner (I study Instrumentation/Physics normally. Therefore, I am motivated to learn)

 

Who-me wrote:

If you want 1Hz and 10 reading a second, that is certainly possible, but you need Reciprocal Counting, which is where you measure both a fast SysCLK and whole periods of Fi.

 

Good to know

 

Who-me wrote:

The CPLD lets you do more than 8 channels, should you need to expand.

 

Yes, but for now the subject is really to make some mesurements ASAP

 

Before that i received this information about a 8 input counter, I wanted to use 8 timer/counter (or ATIny slave) controlled by I2C/SPI and have a master µC who does the link with the computer.

First i was thinking that is a lot of extra work, but with a bit of hindsight it's maybe the simplest solution..

 

 

Simonetta wrote:

If I understand, there are eight square wave signals with 50% duty cycle (up portion equals down portion of the wave).  The frequencies of each signal can be 50KHz to 200KHz, meaning the high cycle of each signal is 10 microseconds [uS] to 1.25uS.   The set of eight signals need to be measured with 1Hz accuracy 8 to 10 times a second.  Since (I assume) that each signal is always on and running a different speeds, then it's not possible to measure all eight signals at the same time.  Because each signal has a different rising-edge starting time

Exactly

 

Simonetta wrote:

To a hammer, every problem looks like a nail. To me, every AVR situation needs an Arduino.  The $3 Nano clone has a crystal-based speed of 16MHz with a timer period of 62.5 nanoSeconds.  That's 20 counts of the timer for the 400KHz speed and 800 for the 50KHz speed.

 

It seems that the 16-bit timer2 could be used in input capture mode.  The timer starts incrementing (from 0x0000) on each system clock when the input signal goes high and stops when it falls to logic 0_ground.  Measure each of the eight signals one after each other every 100 milliseconds (10 measurements/second/signal).  Use the rest of the CPU time to format the timer 2 reading for output to the PC.  This output can be in UART, SPI, or I2C format.

 

Use a 74HC251 8 input -to-1 output multiplexer to select the channel being fed into the timer2.

 

That's a really good idea, i like that (a lot) !

But maybe with a chip who got a frequency as high as possible.

 

I'm gonna make a second response in a bit !

 

PS :

Who-me wrote:

**Because this is a medical sensor app, the OP may likely require that all samples are taken at the same time

For now the research is really centered in developping the devices, and not make exact mesurement on patient. Therefore, it's not an obligation to make all the mesure in the same time

 

A really big thank you !
It's really nice yes

 

PS : I realise that 5samples/second/sensor is enough

 

Last Edited: Wed. Jun 8, 2016 - 09:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

th0mash wrote:

For my application what you think is the most practical solution ?

I never use CPLD/FPGA devices, do you think this project is doable in 1.5month by a beginner (I study Instrumentation/Physics normally. Therefore, I am motivated to learn)

Maybe CPLD is a larger jump - I'd suggest try a MCU first.

Maybe do some 'evening reading' on CPLDs, and get the Eval board I linked to learn with, but do no use that as the main path.

 

 

th0mash wrote:

Yes, but for now the subject is really to make some mesurements ASAP

 

Before that i received this information about a 8 input counter, I wanted to use 8 timer/counter (or ATIny slave) controlled by I2C/SPI and have a master µC who does the link with the computer.

First i was thinking that is a lot of extra work, but with a bit of hindsight it's maybe the simplest solution..

The link I gave above will let you 'make some mesurements ASAP', as that is 0.5~40MHz code you can download. (80MHz PLL SysCLK)

That device has 8 Cores, so you can repeat the design 8x for 8 Channels, and need to just pace the UART report from each channel.

- at 100ms appx Gate time, you could report a result packet every 12.5ms to avoid collisions.

 

You need 1Hz in 400000, which is at least 19 bits, so it will be easier in a device with 32b counters.

You can do 32b counting/capture in 8 bit MCUs, but it needs care around the overflows.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

What is the maximum rate of change for the frequencies?  This will help determine the sample period. 

 

What are you doing with the frequencies when you get them?  Are you using them for calculations, displaying or feeding into a multidimensional visualisation tool?  this will help determine the accuracy you really need.

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

see #3

500Hz

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does that mean it shifts by 500Hz in a single transient or that the frequency varies by up to 500Hz at a rate that is not specified or by up to 500Hz per second? 

 

What is the temperature and time variation on the frequencies (the original requirement approaches 20 bit accuracy)? 

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

The link I gave above will let you 'make some mesurements ASAP', as that is 0.5~40MHz code you can download. (80MHz PLL SysCLK)

That device has 8 Cores, so you can repeat the design 8x for 8 Channels, and need to just pace the UART report from each channel.

- at 100ms appx Gate time, you could report a result packet every 12.5ms to avoid collisions.

 

You need 1Hz in 400000, which is at least 19 bits, so it will be easier in a device with 32b counters.

You can do 32b counting/capture in 8 bit MCUs, but it needs care around the overflows.

 

This sound doable ! I definitely look more into that !

 

 

And what do you think of the idea proposed before ?

8 Channels => MUX => 1 µC
It's sound very simple, one unique microcontroller with 5 samples/channels/seconds
=> 40 measures/seconds of 400kHz, with ~40MHz clock, it's sound feasable

 

(Since it's not a big deal to acquire at the same time)

 

 

DAFlippers wrote:

What are you doing with the frequencies when you get them?  Are you using them for calculations, displaying or feeding into a multidimensional visualisation tool?  this will help determine the accuracy you really need.

 

 

The aim of this sensor is to mesure the concentration of different VOC (volatil organic compound). Each cantilever have a different coating (polymer or other) that can trap theses molecules.

https://www.utwente.nl/tnw/ims/m... )

The sensor is really sensitive; When a cantilever trap some molecule, the resonnance frequency change from 40 to 500 Hz.

 

ie : fr=400 000Hz => Introduction of gas => fr=400 060Hz

 

After aquiring i think they plot relative shift frequency (in%) in function of the species in presence

Last Edited: Wed. Jun 8, 2016 - 11:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what you want to do is to check for the 40-500Hz shift and not to measure frequencies with a 20 bit resolution - correct? 

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:

So what you want to do is to check for the 40-500Hz shift and not to measure frequencies with a 20 bit resolution - correct? 

David

 

I want to know the 40-500Hz shift.

So the straitforward way to do that is juste mesure the whole frequency. 

 

PS : If i have understand corrctly you propose to just keep some low value bits. But i'm affraid that when we try to use very reactive compound (ie ethanol) the system freaks
PS2 : Since every batch got different frequency and there is no reference it's tricky to use a modulation device.

Last Edited: Wed. Jun 8, 2016 - 12:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I presume you have a steady state where you can 'zero' the timers, i.e. read the current frequency, then start the measurement and after a time read the current frequencies and show which have changed and by how much.  It this a valid assumption? 

 

David

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:
I presume you have a steady state where you can 'zero' the timers, i.e. read the current frequency, then start the measurement and after a time read the current frequencies and show which have changed and by how much.  It this a valid assumption?

 

Yes, we have to check that all the sensor are steady before starting measurements

Last Edited: Wed. Jun 8, 2016 - 01:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So if you calibrate and read the frequency for each sensor you only need to determine which sensors have frequencies have changed by 40-500Hz - effectively 2 logic states for each sensor - 0 for no molecule and 1 for molecule shifted resonance (40-500Hz).  Is that a correct summary?  

 

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:

So if you calibrate and read the frequency for each sensor you only need to determine which sensors have frequencies have changed by 40-500Hz - effectively 2 logic states for each sensor - 0 for no molecule and 1 for molecule shifted resonance (40-500Hz).  Is that a correct summary? 

 

In principle you are right ! But you don't have all the keys ;)

*The frequency shift depend on the concentration, and we want to know the concentration

*I said one polymer for one species to sum up... We use relative frequency shift to make some correlation. Depending of the frequency shift of multiple sensors, We can find out if the air contains certain species

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

no OP need to know the shift in 1Hz precision, 10 times a sec. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

no OP need to know the shift in 1Hz precision, 10 times a sec. 

 

I have made some reconsideration, 5 times a sec is enough !

.. But yeah

Last Edited: Wed. Jun 8, 2016 - 02:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok so you need to know the size of the shift as this is proportional to the concentration. 

 

How much does the sensor resonant frequency change with temperature and time with no molecules? 

 

Is the size of the shift relative to the resonant frequency or is it 'constant' for the same concentration of molecule?   

 

For a detectable concentration of molecule does it shift in a jump and it then proportional to concentration or linear from 0?  

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:

How much does the sensor resonant frequency change with temperature and time with no molecules? 

Temperature is controlled

 

DAFlippers wrote:

Is the size of the shift relative to the resonant frequency or is it 'constant' for the same concentration of molecule?   

For a detectable concentration of molecule does it shift in a jump and it then proportional to concentration or linear from 0?  

 

IDK, I am not the person who design the polymer. My work is to make some mesurements. Theses questions are more "data analysis"

 

I can just tell you that, for instance i have only see 0.5% shift max (on 100kHz)

Plus i have seen variation of about 20Hz, so i cannot have less than 10Hz precision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It sounds like you are doing some experimenting to establish what should be measured.  If so would it be better to use lab frequency counters as a first step so you can measure variance, drift etc. and establish what you need to measure before designing hardware and code?

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think i have a good idea of what i have to mesure. I don't have a lot of time for this project... plus like i said, every batch is différent, so if i can mesure with an high precision the frequency that avoid all the problem (even if it's OP)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are happy with that approach then go for it. 

 

David

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm still open for suggestions :)
But yeah, i need to begin pretty soon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

th0mash wrote:

And what do you think of the idea proposed before ?

8 Channels => MUX => 1 µC
It's sound very simple, one unique microcontroller with 5 samples/channels/seconds
=> 40 measures/seconds of 400kHz, with ~40MHz clock, it's sound feasable

 

(Since it's not a big deal to acquire at the same time)

Sure, that is do-able, and likely fine for a first-pass rough test, but I think you underestimate the importance with "not a big deal to acquire at the same time"

 

With any sensor design that is drilling into the noise, as you are doing here, you need to keep the LSB well below the expected changes, and take readings at the same time, so that downstream data analysis can compensate for any extracted drift lines.

 

The Parallax P8X32 is well suited to this problem, (80MHz, 32b timers) but if you want to use smaller MCUs with fewer timers, I would suggest using 8 x small MCUs and linking them serially, (eg either i2c, or, you could do a UART Ring, which is easy to expand & link to a PC )

That keeps code simple, and achieves the same-time readings.

 

For this work, I would also suggest a TCXO Oscillator module, over a cheap MCU+Xtal, as crystals can step in frequency, and you need 2.5ppm, or better here.

You could further calibrate that against a 1pps reference output from a GPS module.

 

 

Last Edited: Wed. Jun 8, 2016 - 09:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
For this work, I would also suggest a TCXO Oscillator module, over a cheap MCU+Xtal, as crystals can step in frequency, and you need 2.5ppm, or better here.

You could further calibrate that against a 1pps reference output from a GPS module.

The following will likely go slightly out of the tolerance during reflow but it has a trim that can be performed during board test either at the board's fab or in-house before shipping.

Could be calibrated during provisioning via GNSS or Ethernet PTP (or USB frame sync?)

Intersil Logo

Home > All Products > Timing & Digital ICs > Real Time Clocks > Real Time Clocks > ISL12022MA

ISL12022MA

http://www.intersil.com/en/products/timing-and-digital/rtcs/real-time-clocks/ISL12022MA.html

Low Power RTC Module with Battery Backed SRAM, Integrated ±5ppm Temp Compensation and Crystal

...

The calibrated oscillator provides less than ±5ppm drift over the full -40°C to +85°C temperature range.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

ISL12022MA

http://www.intersil.com/en/products/timing-and-digital/rtcs/real-time-clocks/ISL12022MA.html

Low Power RTC Module with Battery Backed SRAM, Integrated ±5ppm Temp Compensation and Crystal

...

The calibrated oscillator provides less than ±5ppm drift over the full -40°C to +85°C temperature range.

...

 

hmm - Similar to the PCF2127, but the PCF2127 uses a modulated capacitor design, which likely has better high frequency  corrections.

Designs that swallow counts for correction, can have quite high short term jitter, making them useless for Frequency counters, but their long-term average is fine, making them ok for their primary task of time-keeping.

 

For counter timebases, I think I prefer the lower cost TCXO  like ASVTX-11-121-19.200MHZ-T  (91c/1k for 2ppm, 1.8mA), or maybe

 ASTXR-12-38.400MHZ-514054-T  $1.42/1k 38.4MHz ±500ppb 2mA

Note the GPS volumes have pushed the prices of these ppm-region Oscillators, well down recently.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

th0mash wrote:

 

And what do you think of the idea proposed before ?

8 Channels => MUX => 1 µC
It's sound very simple, one unique microcontroller with 5 samples/channels/seconds
=> 40 measures/seconds of 400kHz, with ~40MHz clock, it's sound feasable

 

(Since it's not a big deal to acquire at the same time)

Sure, that is do-able, and likely fine for a first-pass rough test, but I think you underestimate the importance with "not a big deal to acquire at the same time"

 

With any sensor design that is drilling into the noise, as you are doing here, you need to keep the LSB well below the expected changes, and take readings at the same time, so that downstream data analysis can compensate for any extracted drift lines.

 

I wanted to know what you thought of this solution, since you seems to really know the subject.

The thing is that a patient puts up to 10 seconds to expire (they are asked to exhale slowly). The sensors remain active for 5 minutes, and the measures last for 20 to 40 minutes, so having ~ 0.15seconds (worst case) does not seem so terrible

 

Who-me wrote:

The Parallax P8X32 is well suited to this problem, (80MHz, 32b timers)

Who-me wrote:

The link I gave above will let you 'make some mesurements ASAP', as that is 0.5~40MHz code you can download. (80MHz PLL SysCLK)

That device has 8 Cores, so you can repeat the design 8x for 8 Channels, and need to just pace the UART report from each channel.

- at 100ms appx Gate time, you could report a result packet every 12.5ms to avoid collisions.

 

You need 1Hz in 400000, which is at least 19 bits, so it will be easier in a device with 32b counters.

You can do 32b counting/capture in 8 bit MCUs, but it needs care around the overflows.

 

I think i'm gonna go with this solution ! (This devices seem to be made for this application :) )
The only thing I was a little frightened at seeing this alternative is that I have never programmed and made exchanges between different cores.

 

 

I'm still watching the TCXO Module
 

 

PS : I dont have a lot of footprint on my PCB either, for this, this solution is really cool.

Again, thanks a lot everybody yes

Last Edited: Thu. Jun 9, 2016 - 07:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

th0mash wrote:

I wanted to know what you thought of this solution, since you seems to really know the subject.

The thing is that a patient puts up to 10 seconds to expire (they are asked to exhale slowly). The sensors remain active for 5 minutes, and the measures last for 20 to 40 minutes, so having ~ 0.15seconds (worst case) does not seem so terrible

I'm not quite following the two times.

Is the 5 mins some settling time, still in 'gas contact' and the 20~40 mins a continual measure time that looks for changes, something like evaporation rates.

 

I'm guessing some of these sensor-arm-oscillators have no collection areas at all, so they can be used for temperature & aging tracking (etc).

Over that length of time, temperature tracking is likely to matter more, and many items have in the region of 10+ppm/'C, which is 4 of your LSBs every 1'C.

 

In that case, it is still a good idea to measure at the same time (ie avoid MUX) as you then do not miss information.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

th0mash wrote:
I wanted to know what you thought of this solution, since you seems to really know the subject. The thing is that a patient puts up to 10 seconds to expire (they are asked to exhale slowly).

The sensors remain active for 5 minutes, and the measures last for 20 to 40 minutes, so having ~ 0.15seconds (worst case) does not seem so terrible

 

I'm not quite following the two times. Is the 5 mins some settling time, still in 'gas contact' and the 20~40 mins a continual measure time that looks for changes, something like evaporation rates.

I'm guessing some of these sensor-arm-oscillators have no collection areas at all, so they can be used for temperature & aging tracking (etc).

Over that length of time, temperature tracking is likely to matter more, and many items have in the region of 10+ppm/'C, which is 4 of your LSBs every 1'C.

In that case, it is still a good idea to measure at the same time (ie avoid MUX) as you then do not miss information.

 

Mmh not quite, the lengh is just beacause the pateint dont exhal one time, but several time. (but yes for evaporation and no collection area)

ie exhale => Sensor active for 5 min => wait 5m => exhale => etc ...

 

Using a TCXO is a good idea (even if all the devices is kept at the breathing/human T°)

Last Edited: Thu. Jun 9, 2016 - 08:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rather than a propellor, there's the xmos devices that can easily do the timing tasks and there is free C tools.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm interessted

 

Which one do you think of ?

Last Edited: Thu. Jun 9, 2016 - 09:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The cheapest dev board should be adequate. Each port pin has 32 bit capture /compare unit on it. Each core is a 100MHz timer and 400MHz cpu.
Post on their forums and run your questions past them.

Pages