An STM32 HAL example of communicating with an absolute encoder over the RS-485 interface. A multi-turn 14-bit encoder from Same Sky (formerly/rebranded CUI Devices) is taken as an example. The relevant evaluation kit is AMT212D-V (2 Mbps data rate). A simple blocking mode is implemented.
Don't worry 🙂 Just hit Alt-K to generate /Drivers/CMCIS/ and /Drivers/STM32G4xx_HAL_Driver/ based on the .ioc file. After a couple of seconds your project will be ready for building.
- RS485 Board (3.3V) (Waveshare)
- DSLogic Plus or any other logic analyzer capable of sampling at 16+ MHz.
- KAmod USB RS485 ISO - Konwerter USB - RS485 z izolacją galwaniczną (KAMAMI)
- YAT - Yet Another Terminal :: Serial Communication :: Engineer/Test/Debug
- Tabby - a terminal for the modern age
- AMT programming cable AMT-PGRM-06C (Same Sky)
- AMT Viewpoint (Same Sky)
- RS-485 (Wikipedia)
- What is RS-485? (Texas Instruments)
- One Minute RS-485 Introduction (Texas Instruments)
- SparkFun According to Pete #54 - How RS-485 Works (SparkFun Electronics)
- CAN vs. RS-485: What's the Difference? (maxim integrated)
- RS485 - everything you need to know but didn't know who to ask! (tmf mikro)
- How to Interface RS485 Module with STM32 (ControllersTech)
- RS-485 [RS Elektronika] #62 (RS Elektronika)
Create your own home laboratory/workshop/garage! Get inspired by ControllersTech, DroneBot Workshop, Andreas Spiess, GreatScott!, ElectroBOOM, Phil's Lab, atomic14, That Project, Paul McWhorter, RS Elektronika, and many other professional hobbyists sharing their awesome projects and tutorials! Shout-out/kudos to all of them!
Warning
Control in power electronics and drives - do try this at home ❗
190+ challenges to start from: Control Engineering for Hobbyists at the Warsaw University of Technology.
Stay tuned!