![]() In the tensile testing machine, the master Arduino continuously communicates with the computer, reads and processes the data of a load cell and a DRO and communicates with the slave which only takes care of the stepper motor. The stepper motor control is done with the AccelStepper library. I have been using this solution for a while in my DIY tensile testing machine and it works perfectly. Considering the fact that an Arduino Nano cost $3-5, it is a good investment. Thus, the slave is not (over)loaded with other tasks and the motor runs smoothly. With this solution, the slave’s only job is to take care of the stepper motor and to send a feedback to the master after the job is finished. ![]() The master communicates with the computer and all the other hardware while the slave only receives the commands from the master and controls the stepper motor. ![]() Let’s build a system with two microcontrollers: a master and a slave MCU. This can be heard as “hiccups” or some sort of hammering noise. When this happens, the speed of the stepper motor becomes uneven due to the uneven delay between the steps. We can put tasks between two steps, but if the task becomes too time consuming (too long) then it interferes with the stepping and it increases the delay between two steps. The stepper motor has to be stepped with a certain frequency, therefore at each step the MCU becomes busy. The role of the slave Arduino is to reduce the load on the master MCU which is introduced by the stepping code. In this video I show you how control a stepper motor via a slave Arduino.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |