Skip to content

Hardware

Daniel Petti edited this page May 9, 2017 · 3 revisions

How to Contribute

The hardware for GroBot is all open source, and fairly complicated. We are currently in the process of developing custom PCBs for both Base Modules and GroModules. If you have electronic design experience, you are welcome to contribute.

Working on the Hardware

All we have at this point are circuit schematics. The only prerequisite for editing them is the Kicad program. If you're not familiar with Kicad, it is quite similar to other programs like Eagle, and should thus be fairly easy to learn.

Incidentally, all of our current work is located in the hardware branch. (There are schematics in the master branch as well, however, these simply reflect the current hardware in the existing prototype, and are for reference only.)

What needs to be done?

Currently, only the Base Module schematic is in anything resembling a state of completeness. Initially, then, the GroModule still needs a lot of heavy design work. Furthermore, only the Base Module schematic is done, we still need to lay out the actual board.

How can I share my work?

If you have made a change, please submit a pull request to this repository. You should ideally ask to merge into the "hardware" branch.

Hardware Design

Design Overview

The hardware for GroBot mainly consists of two custom PCBs. The Base Module version connects directly to the CHIP SBC, and provides power and analog interface circuitry for the water sensors and pumps. The GroModule version is not finished yet, but will eventually contain LED drivers for the module lighting, as well as a PWM output for the fan and interfaces for the various GroModule analog sensors.

Both versions of the board will contain the same microcontroller, in this case, the STM32F091CBU6. Inter-module communication will be done via the CAN bus, which this MCU natively supports. That way, there will be a total of 4 wires that have to run between modules: two main power wires, and two CAN wires. It's worth noting that in our initial prototype, we instead used a PSoC 4 MCU, therefore, much of our current code is written for that. We have concluded, however, that the PSoC 4, while convenient for initial prototyping, does not optimally meet our needs going forward.

The MCU and CHIP SBC communicate with each-other via a dedicated UART interface. The SBC also has the ability to reset the MCU, and flash it over this link. The Base Module board is designed for easy development and hackability. An SWD debug interface is broken out from the MCU, and the CHIP is deliberately designed to be removable.

Base Module Design Details

I am not going to provide an exhaustive description of every wire connection in the Base Module schematic. I don't have the time for that, and, quite frankly, most of the details should be fairly obvious to anyone at least somewhat familiar with embedded design. Instead, in this section, I will endeavor to point out and explain some of the aspects of the design which I think are less obvious. These also tend to be the ones that are most prone to error, so if someone who knows what they're doing more than I do wants to check these, I would be grateful.

pH Measurement Circuit

In order to monitor the PH of the water in the machine, we are using a standard electronic pH probe. These instruments work by generating a small voltage (on the order of 10s of millivolts) due to changes in the pH of the solution that they are immersed in. A pH probe is a differential sensor, meaning that, ideally, at a neutral pH it reads zero, and produces either a positive or negative output as the pH skews in either direction. Already, then, reading from a pH probe is much more difficult than from a simple resistive sensor, and the difficulty is compounded by the fact that most probes have a very high impedance. (On the order of 250 Mohms.) If you would like to know more about how a pH probe works and how to read it electronically, TI has an application note that I found helpful in this regard.

The pH probe reading circuit is present on the Base Module schematic, and labeled as such. The basic design employs two op-amp buffers, which both serve to isolate the high-impedance probe. (Because of the high impedance, there is a very low tolerance for bias current on the op-amp inputs. The ones that are currently in the schematic have a bias current of 1 pA.) Furthermore, one of the op-amps also provides a 1.25 V offset for the PH probe differential measurement, so that we can use a conventional single-ended ADC input to read from it. The 1.25 V reference is produced via a special low-noise reference generator. The op-amp at the output end has a variable gain associated with it. This is because there is very little reference material pertaining to the particular probe that we have, and a variable gain allows us to calibrate it through empirical testing. Furthermore, it makes things easy if we ever decide to switch to a different pH probe.

Essentially, the circuit is not much more complicated than that. The only other relevant portions are some simple first-order LPFs on the op-amp power and reference generator output. These are mainly to ensure as smooth a reading as possible from the pH sensor, despite the ripple from the switching regulators.

Design Resources

Here are explicit links to the relevant datasheets for most of the non-trivial parts in our hardware design:

Part Name Description Datasheet
STM32F091CBU6 Cortex M0 Microcontroller Datasheet, Programming Reference
TLE7251V CAN Tranceiver Datasheet
LM2576 12V Switching Regulator Datasheet
TPS62177DQCR 3.3V Switching Regulator Datasheet
TS30011-M050QFNR 5V Switching Regulator Datasheet
TSV912IQ2T RtR Dual Op-Amp Datasheet
MCP1501T-12E 1.25V Voltage Reference Datasheet