## opamp AC square wave to to DC

111 posts / 0 new

## Pages

Double-check that the signal out of your op-amp is the expected 10KHz square wave and not your local line frequency (50Hz/60Hz).

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

frog_jr wrote:
Deionized water is not the same as distilled water.

Indeed.

The Wikipedia article I linked in #83 discusses various types of "purified" water - including deionised & distilled ...

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

ka7ehk wrote:

Double-check that the signal out of your op-amp is the expected 10KHz square wave and not your local line frequency (50Hz/60Hz).

Jim

Yes it is outputting the 10kHz.

Is the way U9 and U10 are configured the correct way?

AVR outputs a pulse to  U9 and   U10 with R12 removed is connect to the Op-AMP

Should U 10 be connected to GND via a resistor?

Thanks

Regards

DJ

I do no believe that a resistor is needed.

If the voltage at U10 is too high, then make the electrodes smaller or farther apart. Those are your only choices. Note that "farther apart" is in the sense of the path. If you put an insulating barrier between them so that the current must travel a greater distance, then that is "farther apart".

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Voltage from the AVR is 3.3V.

I will work on what you reccomended. Maybe i can expirment with some wires to just see it is working in principle.

Thanks

Regards

DJ

The voltage at U10 is 3.3V? This is when the 10KHz output from the MCU is close to 5V (U9)? You have said, earlier, that the MCU runs from 5V.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Wed. Nov 1, 2017 - 06:51 PM

Sorry if i mentioned 5V but its 3.3V.
How low should voltage be?

Thanks

Regards

DJ

frog_jr wrote:

Deionized water is not the same as distilled water.

Deionization does not remove organic material.

Depending on the original water source, deionized water may have a tendency to become acidic upon exposure to CO2 in the air.

You may want to check the pH of the water you are using...

It really doesn't matter how you purify it; Once water is in contact with the air, CO2 is always absorbed until the pH reaches about 6 (slightly acidic).

ka7ehk wrote:

The voltage at U10 is 3.3V? This is when the 10KHz output from the MCU is close to 5V (U9)? You have said, earlier, that the MCU runs from 5V.

Jim

What would be the recommended voltage? As i only if a small proportion(2mm) of the electrode is exposed then i get variation in my adc results.

Thanks

Regards

DJ

You expect variation in the output. If you do not have it, then the amplifier is driven too hard and the amplifier is saturating. Once that happens, your reading is invalid.

Your description leads me to believe that your electrodes are simply too large (or too close together) (or both). Or, that your drive voltage is too high or your feedback resistor is too large. Or, all of the above.

By the way, you can get lower drive by using a voltage divider from your MCU port  pin.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Nov 3, 2017 - 07:42 PM