Here is a list of the posts in this challenge
Gr0G - 03 - High-pressure system design
Gr0G - 07 - Playing with the Gertbot
Gr0G - 11 - Building the box (2)
Gr0G - 12 - Building the high-pressure system
Gr0G - 13 - Building the high-pressure system (2)
Source code available at https://github.com/ambrogio-galbusera/gr0g, https://github.com/ambrogio-galbusera/gr0g-ble-android and https://github.com/ambrogio-galbusera/gr0g-ble
In this post I will note down the overall electrical design of this project.
The main components are
- A Raspberry Pi 4 board (included in the challenger's kit)
- A PIM486 Enviro Hat (included in the challenger's kit)
- A PIM487 Automation Hat mini (included in the challenger's kit)
- A PIM300 Pico Hat hacker (included in the challenger's kit)
- A Gertbot for Raspberry Pi board
The above-mentioned components will
- read Gr0G box environmental status (light, temperature, humidity)
- Switch on and off the compressor
- Open and close the solenoid valve to release the air/water mixture
- Dim the LED strip(s)
- Control the speed of the fan to cool down the box
- Control the Peltier cell to reduce Gr0G internal humidity
Here is a diagram of the system with the components and their connections
Enviro Hat is connected to the Raspberry Pi board on the I2C (sensors - refer to https://pinout.xyz/pinout/enviro_plus . This is the pinout for the EnviroPlus, but the Enviro Hat is just the same board with less sensors). It provides a full set of sensors to monitor the Gr0G box. To have good readings, the board will be installed closed to the center of the cube
Sensors readouts will be displayed on the Enviro Automation Hat. We need to connected SPI bus to control the display and the GPIOs to read digital inputs in case I will install a keypad - refer to https://pinout.xyz/pinout/automation_hat_mini for PIM487 pinout details
Raspberry Pi UART will be available for the Gertbot board
The signals required by the Gertbot board will be picked from the Pico Hat Hacker headers
The Gertbot board actually requires just 3 signals (UART TX, UART_RX, ATT) plus +5V and ground, so soldering the wires should be an easy task.
Despite the easy wiring, the Gertbot board is a quite powerful board. Here is a picture and its internal schematic
It features
- A 64 MHz Atmel CPU
- Four H-bridges capable of 2.5 A each
- Two open drain outputs rated at 30 V and 3 A
- Two Digital-To-Analog converters
- Two Analog-To-Digital converters
- Ten General purpose I/Os
This hardware capabilities will leave the design a lot a room for future expansions
The Gertbot was designed to drive stepper motors and similar robotics application (and, for this reason, a GUI is provided to simplify the configuration of motor steps) but nevertheless it is suitable for any application that requires driving power loads. As already mentioned, for this project I will use open drain outputs to switch on and off loads and H bridges to perform a PWM control of the power transferred to the loads
PWM
Pulse Width modulation (PWM) is a technique used to control the speed of, for example, brushed motors. Instead of lowering the voltage, the motor controller provides power for a short period of time and then removes the power. Because of the inherence slow mechanical response of the motor it will run slower. In fact the mechanical behavior is better than with a lower voltage as the torque of a 10% PWM driven motor is higher than from a motor with only 10% of its voltage applied. The same applies for example to LEDs, where a PWM signal make the LEDs flash so quickly that the persistence of the retina in your eyes make i appear as a stable source of light, just dimmed.
A PWM signal has two parameters: frequency and duty cycle
Working with pulses and an inductor (an electric motor acts as an inductor) can cause very high voltage. Although the H-bridges are somewhat protected, they cannot withstand infinite voltages. If you set the duty cycle to 100% there are no pulses an you can reasonably safely connect a DC motor. The PWM frequency should be between 10Hz and 30 KHz. Low frequencies should not be used with big DC-brushed motors as it will cause extreme high inrush currents and that is likely to trip the over current protection. The Gertbot board allows you to change the duty cycle whilst the motor is running. It is will also to make the controllers very hot especially if you disable the high current trip
The duty cycle is time-A divided by time-B. It is typically expressed as a percentual value (for example 10%). The bigger is the duty cycle, the bigger is RMS voltage in a period and the bigger is the amount of power transfer to the load.
Open drain outputs
An open drain is like a switch. But you can only switch DC currents and you must connect a power supply to the drain pin (OD0 or OD1).
As you can see from the diagram above, there is no power available at the output. For an open drain output to work, the user must provide an external power source. The open drain output does nothing more than provide a path with a very low resistance to ground when it is switched on. There is no protection on the open drain outputs. So care must be taken not to exceed the current or voltage specification. Gertbot open drain outputs use MOSFETS transistors, which have the notorious habit of a large capacitive coupling from the drain to the gate. To prevent capacitive voltage spikes from blowing up the controller there is RC filtering between the gate and the controller.
Top Comments