Hi,
I am trying to develop a capacitance probe. I am taking advantage of the external RC oscillator capability of an AVR ATTINY26 to design this probe. The probe is built into a network of capacitors couple with a resistor to form the RC oscillator of the TINY26. The nominal frequency F of the TINY26 is around 8MHZ and varies slightly based on the capacitance at the probe. The TINY26 is programmed to send a pulse train through one of its pins at a frequency F/n. Another AVR microcontroller/transceiver (ATMEGA256RFR2) is used to count the F/n pulse train and send the data to a coordinator. To ensure long term stability, the ATMEGA controls a digital switch that connects the capacitor network cyclically to (1) an 18pf 1% capacitor then the corresponding frequency fc is measured, then to (2) ground to measure the base capacitance fb and finally (3) to the probe leads to measure fs. The frequencies fs, fb and fc are radio-transmitted to a coordinator and a variable y = (fb-fs)/(fb-fc) calculated.
I tested the probe in soil to use as a soil moisture sensor. The data was however excessively noisy (see graph). In the graph, y values should drop from ~1.3 before water was added to the soil and should gradually increase back up as the soil dries out. The true signal can be seen during intermittent quieter moments in the circuit. I have to mention that the circuit has been printed on a 4 layer board and I followed as much as possible guidelines to reduce EMI noises (with filters, ferrite beads and decoupling capacitors). I have tried to document things I have done that could effect noise emission and/or pickup during the monitoring. These are marked by the orange markers and labelled on the graph. Adding a decoupling capacitor to the battery did not help. I also replaced the straight wires connecting the probe leads to the board with twisted wires and wrapped the whole board in aluminum foil (connected to ground) to no avail.
I have been working on this issue for some time now but with little success. Does anyone have any idea what the issue might be? Why does the signal quiet down sometimes and then get very noisy others? Could this be an issue with the TINY26 not being stable enough to maintain a steady frequency? If so, what is a low cost compact alternative?
Your suggestions are greatly appreciated.
Thanks
I am trying to develop a capacitance probe. I am taking advantage of the external RC oscillator capability of an AVR ATTINY26 to design this probe. The probe is built into a network of capacitors couple with a resistor to form the RC oscillator of the TINY26. The nominal frequency F of the TINY26 is around 8MHZ and varies slightly based on the capacitance at the probe. The TINY26 is programmed to send a pulse train through one of its pins at a frequency F/n. Another AVR microcontroller/transceiver (ATMEGA256RFR2) is used to count the F/n pulse train and send the data to a coordinator. To ensure long term stability, the ATMEGA controls a digital switch that connects the capacitor network cyclically to (1) an 18pf 1% capacitor then the corresponding frequency fc is measured, then to (2) ground to measure the base capacitance fb and finally (3) to the probe leads to measure fs. The frequencies fs, fb and fc are radio-transmitted to a coordinator and a variable y = (fb-fs)/(fb-fc) calculated.
I tested the probe in soil to use as a soil moisture sensor. The data was however excessively noisy (see graph). In the graph, y values should drop from ~1.3 before water was added to the soil and should gradually increase back up as the soil dries out. The true signal can be seen during intermittent quieter moments in the circuit. I have to mention that the circuit has been printed on a 4 layer board and I followed as much as possible guidelines to reduce EMI noises (with filters, ferrite beads and decoupling capacitors). I have tried to document things I have done that could effect noise emission and/or pickup during the monitoring. These are marked by the orange markers and labelled on the graph. Adding a decoupling capacitor to the battery did not help. I also replaced the straight wires connecting the probe leads to the board with twisted wires and wrapped the whole board in aluminum foil (connected to ground) to no avail.
I have been working on this issue for some time now but with little success. Does anyone have any idea what the issue might be? Why does the signal quiet down sometimes and then get very noisy others? Could this be an issue with the TINY26 not being stable enough to maintain a steady frequency? If so, what is a low cost compact alternative?
Your suggestions are greatly appreciated.
Thanks