YIPPEE! I got the boards back from Osh Park late last PM (1/9/2015).  Time to validate the design by testing the board.  This post starts the process for the power and pH sub circuits.


At least the Ladybug came out nice!

Open Source Hardware

The kicad files for the schematics and layout are located at this GitHub location.

The Goal

The goal of this post is to test the:

  • power
  • pH

sub systems with a procedure that minimizes variables.  What I mean by minimizing variables:

  • the pH will be tested using the method described in this post – using a DC voltage and not a probe.
  • I will use wire my bench power supply to Vin and GND to ensure getting a known amount of power.
Once all the tests pass this level, I will test with probes and a pH bath.

Thanks to Those That Went Before

  • I always like to stop and thank Chris Gammell.  I am thrilled to here he is starting up a new session of Contextual Electronics with a subscription model.  I will definitely sign up.   It is very rare to be blessed with as strong a teacher and mentor as Chris.  Thank you.
  • Ryan at Sparky’s Widgets for open sourcing the minipH and mineC breakout boards.  I have happily bought and used these BOBs. This effort stands on the shoulder of Ryan’s work.  I spent hours pouring over the schematics he provided.  Also, when I got really stuck, Ryan was kind enough to answer my questions.  I am extremely thankful.  The most precious resource we have is time.  Thank you.
  • OshPark’s fabrication service has been a very positive experience.  Thanks for the exceptional support, service, and quality fabrications at a reasonable price and turn around time (although – heck – why can’t I have it within the hour 🙂 )?
  • Adafruit’s ADS1015 BOB, Arduino library, and learning material.  Adafruit saved me a significant amount of time!

The Power Section

The power section includes:

  • Clean Power (VClean net on layout)
  • VGND


 I included images of the schematic.  It would be better to look at the kicad files:



The VClean net is noted below.  The VGND net is located where the MCP6242 is laid out.


Clean Power

the components soldered to the board.  I’m happy to see my soldering skills are improving.  Well, ok – I prefer solder paste and a hot air gun. This works best for me.  My hands shake to the point it is far easier for me to use this method with smaller chips. 



In a previous post, I noted power in must be greater than or equal to 7.34V.  Vin on the Arduino should provide that.  Instead of putting on the headers right now (they’d get in the way), I’m going to use my bench power supply to provide 9V to the Vin pin.


Worked first try:


D3 is the green LED – which is on in the image…meaning power is being supplied. DMM shows 9V coming in from Vin and 5V going on VClean (see layout) pins.


The 1K R8 and R9 as well as the first op amp of the MCP6242 are used to create the VGND.  There is a bypass capacitor at each voltage in. 


VGND worked first try!


The pH circuit has two main pieces:

  • analog – read probe
  • digital – use ADC to convert analog reading into a digital value that can be read by an Arduino sketch.

Analog Design

The analog design is very simple.


I replaced the probe with a DC voltage created through a voltage divider.  The DC voltage on the breadboard measured .510V.


10K R and 5K POT

Following a reading:

  • .510V on breadboard 
  • .510V measured at BNC the connection.  
  • Pin 5: .510V  Pin 6 and Pin 7: .512V of the MCP6242
So the analog size of pH reading worked for this test.  On to the digital..

Add in Digital

Adding in digital means adding in the ADC – the ADS1015:



I then ran the sketch I discussed in a previous post with the modified ADS1015 library.  I took a series of differential readings where pH_AIN = AIN0 – the fourth pin – of the ADS1015.  I set the LSB to .5mV ( +/- 1.024V) into AIN3 (pin 7)



The average of 57 readings was  .515V  STDEV: .002.  This is close enough to the analog reading of .510.  The STDEV is not noisy.

These tests were (surprisingly) successful…on to the EC circuit.


Thanks for reading this far.  Please find many things to smile about.