Previously ....
Blog #1: Measure Climate Change with Hydroponic System Blog #1 | Concept Design and Plans
Blog #2: Measure Climate Change with Hydroponic System Blog #2 | XMC4200 Bring-up and Hydroponic System
Highlight
Last time, I tried developing the system with XMC4200 microcontroller development kit. However, the XMC4200 programming environment was not supported on Arduino software as far as I understood. The source codes available for the DC motor are Arduino based. So, I decided to switch to XMC4700 Relax kit. So far, the experience is good.
This time, the achieved tasks are ...
1. XMC4700 microcontroller bring-up
3. Control Air Pump and Stone with the DC Motor Shield from Visual Studio Code Platform IO
4. Integrate the current system to a hydroponic system
Details
1. XMC4700 Bring-up
This XMC4700 relax kit has been around for a few years. This has an Ethernet port so we can run a webserver for remote control and data analysis later in this project. Just like XMC4200 development kit, the board is compatible with the Arduino Uno pinmap and it has 3.3V and 5V digital IO voltage options. Platform IO supports this XMC4700 board, so it was very straight-forward to create a new Arduino project on Visual Studio Code from a scratch.
Platform IO configuration file in the picture below.
TLE94112 library was available on PlatformIO
XMC4700 engineering notes are summarized at https://green-scientist.com/2020/08/08/infineon-xmc4700-relax-lite/
2. DC Motor Shield Control by XMC4700
DC Motor Shield can be mounted on XMC4700 dev kit through the Arduino Uno compatible pints. The DC motor for air pump required 6V DC voltage. So, 6V is applied to the VBAT from a bench power supply (Siglent SPD3303 Power Supply).
3. DC Motor Shield Control from XMC4700
DC Motor Shield source codes are available on github by Infineon. They are easy to use and there were good examples. So, I just integrated the available codes to the Platform IO XMC4700 project.
At this point, we can control the motor by a couple of lines of codes inside the Arduino loop function.
Here is another link describing the details of the DC motor shield with TLE94112EL device. https://green-scientist.com/2020/08/09/infineon-dc-motor-shield-with-tle94112el/
4. Integrate the current system to the hydroponic system.
To start running this air pump, at least 80mA current was required by changing the value of the motor speed in API and measuring the current. The speed of the motor needed to be at least 100 (maximum = 255). The air pump vibrated and made some noise when it was running. So, one sponge was added under the motor. This air stone can be inserted into the hydroponics system to add some oxygen into the water. I used a commercial hydroponic system by VegeBox because this box has LED lights and I wanted to add photo-resistor as a next step.
Next Steps
Next, I would like to add
1. photoresistor to measure light intensity.
2. Water Level Sensor to make sure if there is enough water there.
Top Comments