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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog TMC2300-IOT-REF - Remote controlled Stepper Motor - Getting to blink
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: Workshopshed
  • Date Created: 4 Feb 2021 7:19 AM Date Created
  • Views 1019 views
  • Likes 6 likes
  • Comments 1 comment
Related
Recommended
  • tmc2300-iot-ref
  • stepper

TMC2300-IOT-REF - Remote controlled Stepper Motor - Getting to blink

Workshopshed
Workshopshed
4 Feb 2021

The TMC2300-IOT-REF is a reference design for the TMC2300 stepper motor driver controlled by an ESP32, it also has a CH340 serial to USB chip for programming and debugging the ESP32 via a host PC and a TP4054ST25P for battery charging. The TMC2300 is controlled from the microcontroller via UART on a single pin for TX and RX so a resistor divider (on the left of the diagram) is used to split this signal for the ESP32.

image

The full schematic for the board is provided on the TMC website. https://www.trinamic.com/support/eval-kits/details/tmc2300-iot-ref/

 

For my roadtest, I'm going to look at how easy it is to control the motor chip from the ESP32. To give a practical example, I'll be using a USB microscope and the motor will drive the focusing wheel, microswitches connected to the ESP32 will provide limit stops.

 

Getting to Blink

The first thing needed to get code to compile for the ESP32 SDK is the right board definition. The boards manager for this board can be found on the Espressif github, the documentation tells us to pick the “ESP32 Pico Kit".

The second thing is to know which pin there is an LED on. The design files provide that information, the green status pin is on IO18. The example code on the Trinamic github also references 18 as the value to use.

image

So that requires some basic modification to the blink sketch.

 

Example sketch 1

#define LED_STATUS 18

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_STATUS as an output.
  pinMode(LED_STATUS, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_STATUS, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_STATUS, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

 

The compiling of the ESP32 code seems to take some time but I uploaded it without issue and had a flashing LED running from both USB power and from the battery. Note that I've used CH340 USB before on this machine so I don't remember if a separate driver needs to be installed. Hopefully one of the other roadtesters will be able to confirm that?

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The next thing to try is to have the motor running but my first challenge is that the connectors are not quite right.

image

  • Sign in to reply
  • DAB
    DAB over 4 years ago

    Getting it to blink is a good first step.

     

    It does look like there is a connector mismatch.

     

    DAB

    • Cancel
    • Vote Up 0 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