As part of a larger project, I want to optimize the design of a home-grown electric power source. The power source produces an irregular output that I want to harvest:

To compare design variants, I’m designing a standardized test rig, part of which needs to log high precision voltage and current for the duration of a test. The test rig needs be able to resolve 40Khz waveforms — so I need to be able capture at at least an 80Khz frequency — for several minutes and potentially several hours when I hook up the load to the source.

The design I have settled on is to use a PSOC as the analog front-end and a Raspberry Pi as the data logging capture device.


PSOC from Cypress is one of the best kept secrets of interfacing analog and digital. It is a much more powerful and capable than say an Arduino.

What is very cool is that the PSOC chips can be hardware configured from software without using wiring. For example whereas for an Arduino, wires and addition buffer chips are often necessary for typical uses, with the PSOC the whole thing is configured in a drag and drop user interface — no wiring necessary.

And no sacrifice is made to performance. In fact a typical PSOC greatly outperforms an Arduino and makes it “look like a toy” (quotes are from some older SparkFun ads). Some comprison points:

  • 1.024V +/- 0.1 precision voltage reference.
  • Precision analog comparators, op amps, I/VDACs and CapSense touch technology.
  • 2×12-bit SAR ADC.
  • 8-20bit DeltaSigma ADC (Analog to Digital Convertor):

These features compare very favourably to even the latest 32-bit Due Arduino (which itself is radically better than a standard Arduino). The Due does have a few more ADCs but they are less precise (no 20bit ADC!) and less flexible than the PSOC. The Due does score with a 84Mhz verses the PSOC 80-Mhz chip speed.

Why a Pi?

The Pi is used to offload the logging. This allows a nice division of labour with the PSOC and allows for programming the access to the data once the 

I plan to connect the PSOC to the PI using SPI. Here is the connection using PSOC kit

BTW The ideal tool for this project is the new Kickstarter RPiSoc. This is a PSOC 5LP chip board with direct Raspberry Pi as well as Arduino hardware connectivity. The project also comes with software libraries to ease the connectivity. Check it out at RPiSoc.

More on the requirements  and design in the next post in this series.