Micropower voltage-controlled sine oscillator?

Discussion in 'The Projects Forum' started by Lesaid, Apr 13, 2010.

  1. Lesaid

    Thread Starter New Member

    Apr 16, 2008
    hi - as part of an already established outdoor and solar powered project, I am needing to generate a sine wave that ....
    • will be switchable between 500 hz and 20khz by cmos logic level
    • will operate on regulated +/- 2.5V supply with centre ground
    • will be extremely frugal on power - ideally < 1mA, certainly < 5mA
    • will be stable in amplitude - both frequencies must have the same, constant RMS voltage
    • will be fairly stable (to within a few %) in frequency over wide temperature range (5-40C)
    • does not need to be ulta-pure
    Most of the approaches I have found so far either don't lend themselves to CMOS frequency control (e.g. have multiple timing/filter components that would need to be switched in parallel) or won't operate well at such low voltages and currents.

    I could use two separate oscillators, with an anolog switch to select which frequency is required, or switch power between two oscillators. However, partly out of intellectual interest, and partly to try to keep component count and power requirements down, I would like to find a single-oscillator solution if I can.

    I am currently exploring (using SPICE) a hartley oscillator with switched capacitor, a triangle generator shaped by double integration, and a square generator shaped by an RC filter, switching an RC filter component in parallel with an oscillator timing component.

    I am not an analytical expert in this sort of electronics - I am learning as I go and piecing together whatever ideas I can find to achieve this - and all of the ideas I'm currently following up seem to have challenges (which I am still working on).

    Any better ideas out there?
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    Why do you need sine waves? Square waves would be relatively easy, and current draw could be well below 1mA.
  3. JDT

    Well-Known Member

    Feb 12, 2009
    As you don't need it ultra pure and only switchable between 2 fixed frequencies, I would use a small micro-controller and generate the sine wave digitally. two inputs will be on/off, high/low frequency. Micro-watt consumption.

    Solution will be: quartz or ceramic resonator, PIC micro-controller chip, serial DAC, RC filter on the output.

    If you can get away with lower frequency accuracy, use the PIC internal oscillator.

    For a serial DAC you could use something like the MAX5354:-
    But there are plenty of others.

    Use a look-up table for your sine values.
  4. Lesaid

    Thread Starter New Member

    Apr 16, 2008
    Thanks for your comments.

    I am ready to start experimenting with square waves but I anticipate they will have other challenges. I will be using the waveforms to try to analyse outdoor soil moisture and ion content, by measuring the current through a capacitive sensor in the soil, whose capacitance will be affected by both the dialetric constant of the soil (dependent on water content) and on the resistance of soil.

    This is because the capacitance of the sensor is composed of both the capacitance directly between the (insulated) conductors, but more significantly, by the capacitance between the conductors and the soil itself, separated by the resistance of the soil. See attached file for a diagram and notional circuit of the sensor.

    I am hoping to measure the 'resistance' of the sensor at both low and high frequency. At 500 hz, the reactance of C1 in the attached diagram (forgive me if I am using the technical terms too loosely) should be very high compared to the soil resistance (VR1) at any reasonable moisture level, and so should give a reasonably true measure of the capacitance, and hence derive water content.

    Repeating the measure at the higher frequency will result in a much lower reactance, so that the soil conductivity between the two capacitances between the conductors and soil (c2/3) should become more dominant.
    I have modelled this on a spreadsheet using the standard formulae for capacitive reactance and so on, and then tried out that part of the circuit in SPICE. I achieved a very good match between the two, so I'm fairly confident on the principle.

    A little op-amp analog computation should enable me to calculate the capacitive reactance at 20Khz based on the measurements taken at 500hz, and by simple op-amp arithmetic, derive the soil resistance as well. The soil resistance should be the total 'resistance' of the whole sensor at 20KHz, less the capacitive reactance calculated from the already measured capacitance, and the value of the current sensing resistor in the electronics. The circuitry blocks for these calculations I have also tested in SPICE and all seems to work, and can be scaled within the operational range of the computational blocks.

    The sensor 'capacitance' varies from around 10pF (dessicated) to 130pF (submerged in water) - but the measurements are very distorted by the changes in tem[eratire and ion content of the water. See attached diagram.

    The reason for being wary of square waves is principally because the devices I am hoping to use are micropower op-amps - e.g. ICL7612, which are very limited in bandwidth when configured for low power. I am afraid that this may cause a significant inaccuracy when combining measurements taken at 500 Hz with those at 20 Khz, due to the higher frequences being attenuated. Using sine waves should eliminate this, as well as making the calculations simpler. I know that I am trying to detect and calculate with some small value changes, so I am trying to reduce to a minimum all the sources of distortion that I can!

    I am already however, trying to assess how severe that impact is - but that isn't so quick to do, as I don't have spice models for these micropower devices, and would have to figure out some sort of low-pass filter that would emulate their behaviour. Or invest the time to build it and see for real. But if using sine waves proves impracticable, that's what I'll be trying next.

    On the comment about using a PIC processor, I did think of this, and of doing a lot of the above calculation digitally as well. However, I didn't persue it for several reasons - one is that I didn't find one that would operate along with it's attendant circuitry at +-2.5V and such a low supply current. Another is that I have no experience in using PIC processors at all. Although I am a fluent programmer, it was not of PIC processors. I was hoping to avoid getting into that for this project. I am also interested in expanding my knowledge about use of op-amps, which this project is diong in spades! I'll take another look for micropower PIC processors though.

    Thanks for your help and comments. Sorry to have gone on at such length - but I felt I needed to to answer your question.
  5. retched

    AAC Fanatic!

    Dec 5, 2009
    I fault no one for being through.

    You may also prefer ac over dc for electrolysis reasons with your sensors.. If you chose to use a uC, you could reverse the dc polarity often to avoid the problem. The comparators and ADCs in todays uCs would be really helpful in your pursuit. It would also give you the ability to fidgit with the settings without having to reconfigure any resistors to change opamp settings.

    ALSO it would allow for you to record the data while you were not around.

    Most uCs can be programmed via C language, albeit different for uCs than PCs, If you know one, you have little to learn.
  6. Lesaid

    Thread Starter New Member

    Apr 16, 2008
    thanks (retched) for your comments. I have had a look around on the net and had no idea that microcontrollers were available at such low supply voltages and powers. This does indeed put them in reach of my power budget. When I looked at this last, a year or two ago (this has been a long-running project), I was searching for terms like 'PIC' rather than microcontroller - and perhaps they are a fairly recent development?

    Having got so far with the op-amp approach though, I'd kind of like to see it through, and should be able to finish this more quickly that way, than starting a new learning curve at this stage. But I'm going to get a microcontroller - with a development kit if they're available, and start experimenting. I hope they're available in a package that I'm capable of soldering though - the ones I've seen so far look as though they need that flow-soldering technique on custom PCBs. I'm looking forward to experimenting - and am fluent in a number of programming languages including 'C' so the software side of it shouldn't be too hard.

    You are absolutely right about electrolysis being a problem in a resistive sensor. When I started out on this, three years ago, after nearly a 40 year layoff in electronics, and rusty experience as a radio ham accustomed to valve/tube electronics, my first attempt (and my first serious encounter with solid state opamps, high impedance CMOS and FET technology etc, I tried a simple DC resistive sensor - and of course it was a dismal failure - turned the sensor into an inefficient battery, even though I was only passing a fraction of a microamp!

    Then I tried an AC resistive sensor - that avoided the electrolysis problem, but was far more sensitive to temparature than to moisture content. After a brief foray with temperature compensation, I realised that it was also highly sensitive to the ion (nutrient) concentration and was pretty useless at measuring moisture without frequent recalibration.

    I believe measuring capacitance changes due to dialectric variations caused by water saturation, should be pretty independent of both temperature and ion content - hence the current approach. My first attempt at this was also a failure - as the conductivity of the sensor was still highly dependent on temperature and ion content. That's when I realised the sensor wasn't just a simple capacitor, and led to this fourth iteration of the device.

    To measure just moisture, I only need one oscillator, and very little of this complexity. The purpose of all this additional challenge, is to try to derive a measure of nutrient (ion) concentration from the same sensor, without needing a separate AC resistive sensor as well. I believe it should be possible - and would be both useful, and a fascinating challenge at the same time.

    The op-amp configurations for doing the calculations (including log/anti-log multiplication and division) seem straightforward, and worked almost at the first attempt in a SPICE model - and tie up very closely with my calculations in a spreadsheet model of the same thing. So I really think I'm on the verge of cracking this the old-fashioned way.

    I have already designed and part built a micropower instrumentation system, using an cheap, short range radio link carrying a bit stream, at timed intervals, to a remote PC.

    I think this business of generating sine waves is my last design problem using this technique. The only other thing I definitely intend to do is come up with some switched mode technique as a more efficient alternative to the resistive (smart) regulator that I use for trickle charging a 6V lead-acid battery from 12V of solar panel. That would increase my energy budget, but that's for tomorrow, once the unit itself works.

    Do I take it from the lack of comments about sine wave generation that it is maybe impractical to do with a dual frequency oscillator at these supply voltage and power levels?
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    there are nanoWatt microcontrollers available now.. Some only need 3.3v for processing, and go so 'sleep' untill processing is needed. a few button cells can last them months.
  8. atferrari

    AAC Fanatic!

    Jan 6, 2004
    Later you could add solar power to feed the whole thing.