element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sustain The World - Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Sustain The World - Design Challenge
  • More
  • Cancel
Sustain The World - Design Challenge
Blog Measure Climate Change with Hydroponic System Blog #3 | XMC4700 + DC Motor Shield with Hydroponic System
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kurama007
  • Date Created: 16 Aug 2020 4:01 PM Date Created
  • Views 984 views
  • Likes 3 likes
  • Comments 5 comments
  • infineon
  • xmc4700
  • dc-motor
  • sustain the world
Related
Recommended

Measure Climate Change with Hydroponic System Blog #3 | XMC4700 + DC Motor Shield with Hydroponic System

kurama007
kurama007
16 Aug 2020

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 image

2. DC Motor Shield Control image

3. Control Air Pump and Stone with the DC Motor Shield from Visual Studio Code Platform IO image

4. Integrate the current system to a hydroponic system image

image

 

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 image

image

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).

 

image

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.

image

 

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.

image

 

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.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 5 years ago +1
    Have you looked at your rail voltages to see if there is any EMI introduced by the motor? DAB
  • rati89
    rati89 over 5 years ago +1
    Great work! Looks really sophisticated and I like the description and documentation! Btw, the sponge describes the maker mind quite well
  • kurama007
    kurama007 over 5 years ago in reply to DAB +1
    Hi DAB, yes. There are EMI noise at the rail voltage. By a quick test, it is about 30mV.
  • DAB
    DAB over 5 years ago in reply to kurama007

    You might want to consider separating the motor power from the logic power to see if you can reduce the EMI.

    You could also put some ferrite toroid blocks on the motor wires to cut the EMI.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kurama007
    kurama007 over 5 years ago in reply to rati89

    Thank you, Mr. Brew. Yes, just want to fix everything at the best I can. This might be a temporary solution. image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kurama007
    kurama007 over 5 years ago in reply to DAB

    Hi DAB, yes. There are EMI noise at the rail voltage. By a quick test, it is about 30mV.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rati89
    rati89 over 5 years ago

    Great work! Looks really sophisticated and I like the description and documentation!

     

    Btw, the sponge describes the maker mind quite well image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 5 years ago

    Have you looked at your rail voltages to see if there is any EMI introduced by the motor?

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube