THE LEE TG057 SPM GP Drive Board Instruction Manual

June 27, 2024
THE LEE

THE LEE TG057 SPM GP Drive Board Instruction Manual

TG057: SPM / GP DRIVE BOARD

CONNECTED TO ARDUINO UART DEMO

INTRODUCTION

About this Technical Guide

The Smart Pump Module (SPM) and General Purpose drive board (GP) can be controlled through UART.
The UART communications protocol is commonly used and simple to set up.

This guide shows how to use an Arduino Mega* to control an SPM and GP over UART and consists of the following stages:

  • Connecting the Arduino Mega to the SPM/GP
  • Sending and receiving commands
  • Example sketch for controlling power and pressure

* Note: This example uses the Arduino Mega as it supports multiple UART connections. One UART connection (Serial) is used to communicate with the computer to send information and a second UART connection (Serial1) is used to communicate with the SPM/GP.

The Arduino Uno supports only one UART connection and therefore cannot simultaneously communicate with the computer and the SPM/GP. It is still possible to use an Arduino Uno, however it will not be able to communicate with the computer.

DISCLAIMER

This resource is provided “as is” and without any warranty of any kind, and its use is at your own risk. The Lee Company does not warrant the performance or results that you may obtain by using this resource. The Lee Company makes no warranties regarding this resource, express or implied, including as to non-infringement, merchantability, or fitness for any particular purpose. To the maximum extent permitted by law The Lee Company disclaims liability for any loss or damage resulting from use of this resource, whether arising under contract, tort (including negligence), strict liability, or otherwise, and whether direct, consequential, indirect, or otherwise, even if The Lee Company has been advised of the possibility of such damages, or for any claim from any third party.

HEALTH AND SAFETY


WARNING

The Disc Pump Driver PCB Voltage must not exceed 48Vr.m.s. (where for a typical square-wave drive Vr.m.s. ≈ Vpk.) at frequencies between 20 and 22 kHz. It is the user’s responsibility to ensure that the Disc Pump Driver PCB is used and/or integrated within any product in a safe manner. Read the appropriate user manual prior to first operation and take note of all safety notices.


WARNING

Take care during use of the Disc Pump Drive PCB not to create short circuits between exposed conductive parts of the board. Short circuits may lead to malfunctioning and heating.

CONNECTING THE ARDUINO MEG

SPM

SPM Figure 1

Connect the following:

  • SPM pin 1 (VCC) – Arduino 5V pin
  • SPM pin 2 (UART RX) – Arduino TX1 pin
  • SPM pin 3 (UART TX) – Arduino RX1 pin
  • SPM pin 4 (GND) – Arduino GND pin
  • SPM pin 5 (Analog in) – Not connected
GP Drive Board on Development Kit or Evaluation Kit motherboard

GP Drive Board on Development Kit or Evaluation Kit motherboard Figure
1

Connect the following:

  • Development/Evaluation kit UART RX – Arduino TX1 pin
  • Development/Evaluation kit UART TX – Arduino RX1 pin
  • SPM pin 4 (GND) – Arduino GND pin
  • Connect an external power supply to the kit (e.g., through the DC in barrel plug).
  • Do not connect the USB connector to the Development Kit or Evaluation Kit as it uses the same UART connection as the screw header and will interfere with the communication between the Arduino and the driver board.

FULL LIST OF COMMANDS

For an up-to-date list of commands, UART message structure and UART clock speed, please consult “ TG003: PCB Serial Communications Guide ”. The guide also includes which commands need to be int and which ones should be float.

EXAMPLE SKETCH FOR CONTROLLING POWER AND PRESSURE

The most up-to-date version of the following code example is available on the Lee Ventus GitHub repository (https://github.com/The-Lee-Company).

The functions for sending and receiving UART commands and the functions for setting up manual power control and PID pressure control can be found in:

The macros for register IDs can be found in:

This simple program is not configured to work with streaming mode. It will be able to send write commands, however it will not be able read values from the board as the streaming mode output will interfere with the simple logic of the read command.

Sending and receiving UART commands
Sending integer commands

Command Image 3

Sending float command

Command Image 4

Receiving integer command

Command Image 5

Command Image 6

Receiving float command

Command Image 7

Command Image 8

Manual power control example

Command Image 9

The Arduino IDE Serial Monitor output of the program should look like:

PID pressure control example

There is a slight difference between the GP and SPM driver boards. The GP diver on the Evaluation kit uses the Analog 2 channel for detecting pressure, while the SPM uses a digital pressure sensor.
Therefore, the program checks the type of drive board to determine where to read pressure from.

Command Image 10

Command Image 11

Command Image 12

Command Image 13

}

The Arduino IDE Serial Monitor output of the program should look like:

ADDITIONAL SUPPORT

The Lee Company Website (https://www.theleeco.com/disc-pumps/) provides advice on:

  • Getting Started
  • Applications
  • Development Process
  • Downloads (including datasheets, manuals, application notes, case studies and 3D models)
  • Frequently Asked Questions

The Lee Company is happy to discuss next steps beyond prototyping, including system design. If you would like to discuss this with us, or for any other additional support, please contact your Lee Sales Engineer.

REVISION HISTORY

Revision History

THE LEE COMPANY • Tel: 860-399-6281www.theleeco.com

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

THE LEE User Manuals

Related Manuals