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.

Gaining Linear response from monostable circuit?

Status
Not open for further replies.

jimbobsimmonds

New Member
Hi all... :)

Im in a rush so let me just explain my task is to build a level sensor... i have designed a circuit (see below) which uses a capacitive sensor which interfaces with a PIC (using VDC and the ADC) and LCD to display the level... however, the voltage i am getting is not of the linear response i was hoping for and is quite a significant curve...

Any ideas on how i can achieve a more linear response?

Thanks!!!!!!

P.S the values for caps and res are not neccesarily final so you can take them with a pinch of salt ;-)

303-circuitdiagram1.png
 
Last edited:
The level of what? Water? Sound? Voltage? It's easier to help if we know the problem you're trying to solve.


Cheers,

Torben
 
Why are there two 555s? Why not just measure the frequency or period of the first one?
 
The first 555 gives an output where the PERIOD is proportional to the capacitance of the level probe.

The second 555 gives an output where the voltage is proportional to the FREQUENCY of the output from the first 555.

PERIOD is the reciprocal of FREQUENCY.
A graph of y = 1/x is inherently non-linear, which is exactly what you are seeing.

How to fix it?
Either use the PIC timer functions to measure the period of the output from the first 555.
Or, if you really want to use the analogue input of the PIC, make the first 555 a fixed frequency, and use the capacitive probe to vary the timing period of the second 555.

JimB
 
The first 555 gives an output where the PERIOD is proportional to the capacitance of the level probe.

The second 555 gives an output where the voltage is proportional to the FREQUENCY of the output from the first 555.

PERIOD is the reciprocal of FREQUENCY.
A graph of y = 1/x is inherently non-linear, which is exactly what you are seeing.

How to fix it?
Either use the PIC timer functions to measure the period of the output from the first 555.
Or, if you really want to use the analogue input of the PIC, make the first 555 a fixed frequency, and use the capacitive probe to vary the timing period of the second 555.

JimB

thanks.... will run it past some of the older heads at work tomorrow and see what they think...

trouble is all of my PIC code is relying on using the analog input on the PIC...
 
I've this thaught about how it can be solved the analogue way. Maybe an log opamp amplifier stage could do the job? Only problem, I don't have any experience with biasing an opamp log amplifier.
 
The capacitance between two parallel plates is inversely proportional to the distance between the plates, and directly proportional to the dielectric constant of the insulator in the gap. I'm guessing that your plates are fixed, and only the dielectric is changing. The PERIOD of a 555 astable is directly proportional to C, so why not just use a timer in the PIC to measure the period of the 555?
 
The capacitance between two parallel plates is inversely proportional to the distance between the plates, and directly proportional to the dielectric constant of the insulator in the gap. I'm guessing that your plates are fixed, and only the dielectric is changing. The PERIOD of a 555 astable is directly proportional to C, so why not just use a timer in the PIC to measure the period of the 555?

your assumptions are correct :)

i took it on the advice of others that using the PICs internal timer was not the best solution... don't really know why :-(
 
If you can characterize the sensor over its range ie. measuring in the analog domain, you should then be able to make a correction lookup table with software. Of course analog being inherently drifty over temp, you may need test over temp.
 
i took it on the advice of others that using the PICs internal timer was not the best solution... don't really know why :-(

I don't either. Any time you can do something by counting time ticks, it will always beat any analog method... Better to have only one analog transducer (the first 555) rather than two...
 
If you can characterize the sensor over its range ie. measuring in the analog domain, you should then be able to make a correction lookup table with software. Of course analog being inherently drifty over temp, you may need test over temp.

ah that's what i was trying to remember. how exactly do look-up tables work?

i fear hardware changes may not be possible anymore and we are going to have to cheat and use software...
 
Status
Not open for further replies.

Latest threads

Back
Top