Blog Posts ...
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
Blog #4: Measure Climate Change with Hydroponic System Blog #4 | Sunlight Sensor and Water Purity
Blog #5: Measure Climate Change with Hydroponic System Blog #5 | Air Flow and CO2 Measurement
Blog #7: Measure Climate Change with Hydroponic System Blog #7 | Hydroponic Nutrient and Water Measurements
Highlight
All components have arrived and I am very excited to try out the Infineon components because this is my first time to try them
The plans for this week are summarized like this.
1. Get familiar with Infineon DAVE IDE
3. UART communication between a XMC4200 microcontroller and computer
4. Develop a small application involving UART and LED
Here is a video of my hydroponic system called YOSO (You Only Set-up Once) !
Indoor Hydroponic System Videos are here at this website: https://green-scientist.com/indoor-gardening/
Here are pictures that show the actual setup and software development progress.
Software Environment: From UART (TeraTerm), a user can type 0, 1, or 2 to turn off LED, turn on LED, or toggle LED (on--> off or off --> on).
Details
1. Get familiar with Infineon DAVE IDE
This is my first time to use Infineon microcontrollers. So, I didn't know where to start. Fortunately, the XMC4200 product website has nice documentation. So, I was able to follow the instructions. The software development kit was a bit confusing at the beginning as it says the Arduino compatible. However, XMC4200 is still a new product and Arduino IDE and Platform IO are not supported yet as of August 3, 2020. The only pins are compatible with Arduino Uno. So, I tried using Infineon DAVE IDE based on Eclipse. The experience so far is very good. There are two USB ports on XMC4200, and I only use the one on "Debug" side, so I can use the DAVE debugger flawlessly.
The notes are summarized here (still work in progress ) https://green-scientist.com/2020/07/26/infineon-mcu-xmc4200-guide/
2. Turn on/off/toggle LED
Usually, the first software application is either a Hello World or blink a LED with an embedded system. I tried a LED application for the first time. The LED configuration requires a DAVE UART application. The XMC 4200 Platform2Go comes with an on-board LED as part of Digital IO, which is assigned as P0.1 as a pin name.
Here are Digital IO commands that I used.
- DIGITAL_IO_SetOutputLow(&LED0);
- DIGITAL_IO_SetOutputHigh(&LED0);
- DIGITAL_IO_ToggleOutput(&LED0);
This is a DAVE app block diagram.
3. UART communication between a XMC4200 microcontroller and computer
To control the microcontroller and sensors later, I would like to have a debug UART console. Inside DAVE, we can enable UART and I have a USB-to-UART cable which can be connected to P2.14 an P2.15 pins. So, I connected the USB-to-UART cable with three wires like the picture below. This cable came with a FTDI FT232RL chip.
4. Develop a small application involving UART and LED
The small application starts with initializing the UART communication between a PC and XMC4200 microcontroller. Then, depending on the user input (ex: 0, 1, or 2) , XMC4200 takes action on the LED.
Code Snippet
5. Hydroponic System
Here is the simple hydroponic system that I built. The building instruction is summarized in my website here. https://green-scientist.com/2020/05/16/diy-hydroponics-under-10-mins-with-basil/
Next Steps
I would like to get familiar with the Infineon motor controller and high current PROFET shield to control the air pump by the XMC4200 and UART console. More fun to come
Top Comments