1
\$\begingroup\$

I am working on this project where I am going to make a soil moisture sensor. The principal that I'm going to use is the change of capacitance of the soil with moisture. What I'm going to do is make a capacitor that would be buried under the soil, and connect it to an oscillator. Then I'm going to get the output frequency from the oscillator and use it to calibrate and measure the moisture level of soil. I know there had been several discussions about this project on this site and elsewhere on the internet but non of them answers my questions.

When thinking about which oscillator would best suit my project, the thing which popped into my head was to use a 555 timer based oscillator. Then after some research on the internet I read that an oscillator based on 74HC00 (NAND IC) would give better results. I'm including schematics of both the oscillators here. First one is the 74HC00 oscillator and the second is a classic 555 timer based one.

74HC00 (NAND IC) based timer

555 Oscillator

My first question is, Why 74HC00 based oscillator is suitable than a 555 timer based one? or are there any other suggestions (which I love to hear)?

The next question is rather subjective.

After getting the output frequency I am planning to connect the circuit into a speaker and make the frequency audible. That is, a pitch varying sound would be generated when the frequency changes. To do this, first I thought of feeding a sinusoidal wave as the input voltage, then send it through a quadrature oscillator and get a sinusoidal wave as the output. A capacitor in the quadrature oscillator is replaced with my sensor capacitor. This method is in contrast to the other two methods (using 74HC00 and 555) as discussed above as both of them are generating square waves as the output. This very much relates to the audio which I will get as the output.

Quadrature oscillator

So my second question is, would it be practical and worthy to use a sinusoidal oscillator instead of a square wave one if I want to get a frequency in the audible range? Are there any perks of using a sinusoidal wave to get a sound instead of using a square wave?

\$\endgroup\$
  • 1
    \$\begingroup\$ For your second question regarding sound. Others may confirm, but if I remember correctly sine wave sounds like a beep of the frequency that you play. Very bland sound in general (you can go on youtube and hear them or use one of the cheap so called ear testing video to listen to a frequency sweep). Square wave on the other hand sounds gritty and distorted. Fun fact, guitar distortions are actually sine waves that the top round part are clipped because of the amplifier saturation. \$\endgroup\$ – Simon Marcoux May 12 '18 at 19:01
  • 1
    \$\begingroup\$ Since the output that you want is sound, it is only a matter of preference in that case. Square wave are kinda easier to generate as you already know: it is simply the output of a 555 circuit. Sine wave is a 555 square wave followed by a bandpass filter set to the fundamental frequency of that square wave. (learningaboutelectronics.com/images/… for example). Difficult to make, not really. Worth the trouble? up to you to figure out. Helps learning tho! \$\endgroup\$ – Simon Marcoux May 12 '18 at 19:25
  • 1
    \$\begingroup\$ Welcome to EE.SE! Keep in mind that questions about optimization require a definition about what problem dimensions are to be optimized for your application, such as size, speed, energy consumption, user experience, etc. Since these can't be optimized all at once, you need to have a good idea of which ones are most important to you, and be able to articulate that clearly to us. \$\endgroup\$ – Dave Tweed May 12 '18 at 19:26
  • 1
    \$\begingroup\$ It's worth mentioning that due to their distortion, square waves are easier to hear at lower volumes. Lower frequency pure sine waves can be very hard to hear, even at the same amplitude as higher frequency ones. \$\endgroup\$ – Hearth May 12 '18 at 20:06
  • 1
    \$\begingroup\$ That depends entirely on your speaker. \$\endgroup\$ – Hearth May 12 '18 at 20:22
1
\$\begingroup\$

This is a more comprehensive answer to your questions.

1) In general, a 555 timer will create more frequency drift than the schematic that you found out. While I didn't do the full research to quantify the difference between the two, a quick reading of this article was useful to figure out the main difference. The author of this article stated that 555 timer astable are useful to low importance or utility clocking. With that being said, depending on your end application (I'm assuming some kind of hobby or DIY experiment here), both will work properly and you will not have to bother that much with it. I, however, could be corrected by other members since I never really bothered with clock generation above 100khz (aside from crystal oscillator for PIC microcontroller).

2) Since you will already have a squarewave generated somewhere on your circuit, you will not need to generate one externally. You could choose to buffer it with an op-amp before playing with it to isolate the humidity sensing part and the DJ/hearing part. For your information, if your base frequency is between 1khz and 10 khz, you will have no problem hearing a result. Like I previously stated in the comments, you can transform any square wave into a sine wave by using a bandpass filter (can be combined with the buffer to do it in one go) on the base frequency. To output sound properly, you will need to add an amplifier before your speaker, but that is another question altogether.

Edit: An op-amp buffer circuit is used to separate two different sections of a circuit and prevent problems with impedance. By definition, the input is simply translated to the output with a unity gain. Most of the op-amp basic amplification topology will also act as a buffer (not always true, but most of the time!). The schematic bellow illustrate a op-amp buffer and a band-pass filter using an op-amp.

schematic

simulate this circuit – Schematic created using CircuitLab

Keep in mind that these are simplified explanations to guide you. Before plugging anything, you should sketch out the basic function block of your circuit (oscillator, audio amplifier, capacities soil moisture, frequency readout etc...) and then choose how to implement (wire, create..) each function block. Like it was pointed out in another answer, there are many way to do an oscillator and there are many other way to filter, amplify etc...

\$\endgroup\$
  • \$\begingroup\$ Thank you. This answers my question very well. But before I mark it as the correct answer, can elaborate more on the 'buffering it with an op-amp' part? \$\endgroup\$ – slhulk May 13 '18 at 3:55
  • \$\begingroup\$ Very educative. Answers my questions on point. \$\endgroup\$ – slhulk May 13 '18 at 5:11
2
\$\begingroup\$

There are lots of Oscillator circuits that could work .Circuits that have a grounded cap will be more noise immune .RC oscillator circuits are generally not as stable as LC circuits .These days there are lots of SMD inductors to chose from on the internet so going LC is not a cost penalty .LC circuits generally make sinewaves so they are better from an EMC viewpoint .Chose an LC oscillator circuit that uses a single inductor to keep purchasing easy .I have used a modified dynatron osc for capacitive liquid sensing .The output level of this circuit is about 600mV peak sinewave .I used a comparetor to square it up for counting by a micro .

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.