Preparing the power electronics

page thumbnail
Difficulty: Easy
Time required: Tens of minutes
Skills required:
  • Electronics breadboarding
  • Flashing firmware to an Arduino

Parts

  • 1 24 V DC power source - Anything between 12 V and 24 V may work but the results achieved here use 24 V. Motor speeds may need calibration to match existing results
  • 1 Arduino UNO R3 - or equivalent microcontroller that can output two independent 5V PWM signals and connect to PC over USB serial
  • 1 L298N motor driver

Tools

  • 1 PC - Must be able to flash firmware to microcontroller and connect over USB serial to microcontroller and potentiostat
  • 1 potentiostat - preferably the MYSTAT

System overview

A PC communicates with both a charging/discharging device (typically a potentiostat) as well as an Arduino UNO R3. These documents assume the use of a MYSTAT potentiostat and it's modified control software.

The Arduino is connected to an L298N motor driver, which is powered by a 24 V DC power source. This is a simple dual H-bridge motor driver that allows the Arduino to control the speeds of the peristaltic pumps using pulse width modulation (PWM). There is no speed feedback; we only tell the motors which direction to turn and whether they run at 100% maximum speed, 0% speed (off), or anything in between. To know the speed (in rpm) or flowrate (in mL/min) of the peristaltic pumps, a separate measurement is required (like dispensing water into a graduated cylinder).

We use the open-source MYSTAT (with our own modifications to the control software), but any equivalent potentiostat or battery cycler will do. Our pump control system is based on the MYSTAT software, though, and can be used without the MYSTAT present.

With this hardware configuration, the MYSTAT software then allows for entire control of this electrochemical system: the applied currents and voltages as well as the speeds of the electrolyte pumps.

Step 1: Flash firmware to microcontroller

Using the Arduino IDE with the elapsedMillis library installed, upload the following code to the Arduino. The location of the code in the repository is here

Step 2: Remove on-board jumpers from motor driver

Remove the three on-board jumpers (highlighted in pink) from the motor driver board:

Step 3: Connect cables between Arduino, motor driver, and power supply

Connect according to the below diagram, taking care to connect the negative terminal of the 24 V power supply lead to both the GND terminal of the motor driver (middle connection of the three-terminal screw connection header) and a GND pin of the Arduino, so that the Arduino's signals to the motor driver are in relation to the same fixed GND.

The wiring should look like this when you're done (feel free to make it tidier!)

This makes the motor control electronics

Connect microcontroller to PC

TODO


Previous page | Next page