post for August 31st, 2014

The Healthy EC Shield owes many of its design choices to the great work done by SparkysWidgets miniEC (product page).  While designing the Healthy pH Shield, I struggled with using a charge pump chip to provide V- to the op amp.  During testing the charge pump added a significant amount of noise into the result.  Also, the part was a significant contributor to the BoM.  As I looked for alternatives, Chris walked me through using Floating Ground to offset the sine wave enough such that the design could use a single supply.

The Goal

The goals of this post include:

  • explaining what I mean when I say Floating Ground.  I am finding – like every other field I have some deeper knowledge of – depending on the context of the engineer, a term could very well have different definitions.  In addition, I didn’t have a grasp (perhaps still don’t – but will keep practicing!) on Floating Ground.
  • LTSpice IV modeling of Floating Ground within the Healthy EC Circuit.

Thanks to Those That Went Before

  • Chris Gammell.    He walked me through how to do this.  I hope that I have learned well enough to repeat his guidance accurately. I highly recommend his Contextual Electronics course.
  • Ryan (SparkysWidgets) has Open Sourced his design and has been phenomenal at making sure we can learn from his work.  I hope you get a chance to check out his work.  And no, I do not get any “payback” for recommending SparkysWidgets.  

Floating Ground

Here is a rough schematic of the breadboard prototype I built to demonstrate and understand Floating Ground when working on the Healthy pH Shield.

As I discussed earlier (in this blog post), pH values range from +/-.414V.  The job of the Floating Ground is to raise how the op amp sees Ground – usually Common Ground at 0V – to a V- that is at least .414V above 0V.  By “floating” the ground up this far, all readings coming into the op amp can be measured above 0V.  In this way, a single supply can be used.

The way this was done in the Healthy pH Shield – and what I plan for the Healthy EC Shield if it works – was to start with a 5V power supply and two resistors (10K and 1K) that divided the power such that a Floating Ground of .45V is established (5V*(1/11) = .45).  Now that I had my Floating Ground, I wanted to try it out with a pH reading I might get.  In a previous post I had a table that translated the pH value to a voltage.  I attached a black wire to the GND side of a AA battery and a red wire to the positive end.  Luckily the battery did not blow up.  I attached the GND of the battery to .45V and then divided the voltage using 1MΩ Resistors such that .375V (1.5*(.5/2)=.375) would feed into the non-inverting input of the op amp.  The op amp’s output should be around .825.  

The first op amp I used was the TL072 (data sheet) V-in and Vout read .88V (880mV-450mV = 430mV) instead of .83V (830mV – 450mV = 380mV).  After talking with Chris about this, he noted this is caused by the common mode input voltage range:

notice how the rails go from +/- 11V for a +/-15V power supply.  This speaks to the op amp not being rail-to-rail.  So I am basing my context on rail-to-rail being important for 0-5V rails as noted in this TI document on Op Amp Voltage Ranges).

I changed the op amp to an LMC6041.   Characteristics include:

  • 4 pA Input Bias
  • Rail-to-Rail Output

This is not the same op amp as in the BoM but has the characteristics discussed.  This op amp came in a DIP package – making it easy to use on a breadboard.











pH reading = (.46MΩ/1.92MΩ)*1.6 = .38

At .392, the breadboard results is 12mV more than expected based on the values for the resistors and battery.  This result is better than the previous results I measured with the other op amp.  I assume the next step to check accuracy would be to take more samples and then calculate the standard deviation.  At this point, I assume 12mV is within a range to accommodate aspects of a breadboard setup and the DMM that make it impossible to get exactly accurate readings.

Floating Ground and Healthy EC Shield

The Floating Ground walkthrough makes sense to me for the design of the Healthy pH Shield.  I am not sure how well this technique will work for the Healthy EC Shield.  The next step in my understanding is to create an LTSpice IV model.  The challenge I have here is I am not sure the parameters for op amps model well.  Even when I use models specific for a chip.  


Here are the results of the model without a Floating Ground:


Wien Bridge Results




High V

Low V






non-inverting and inverting




.318 is roughly 3 times .318.  Given the gain is 3.2, I expected the VPP on output to be 1V.  Perhaps .07V is due to modeling parameters?

Here is the model I used that includes the Floating Ground:

LTSpice Wien Bridge With Floating Ground

Here are the values for the non-inverting/inverting inputs of the op amp (blue) and the op amp’s output: 

Results of Wien Bridge With Floating Ground


High V

Low V






non-inverting and inverting




What’s Next

I don’t have a grasp on using floating ground on the Healthy EC Shield – so I need to do that.  I also will be trying out SparkysWidgets minieC.  Ryan sent me my order awhile back and I am finally getting around to playing with it!  One challenge is there is no firmware (i.e.: Arduino Sketch) to control the minieC.  Hopefully, I’ll be able to cruft something up.


As always – thank you for reading this far.  Please find many things to smile about.