Close

4) Software

A project log for Scribing Robot

Writing on a whiteboard with stepper motors

f4hdkf4hdk 04/22/2018 at 13:531 Comment

All the source code is available for free at the start page or on Mbed site.

https://os.mbed.com/users/F4HDK/code/scribe_stepper_2/

The 2D movements are made at constant speed.

Description of algorithm, from the bottom low level tasks to upper level tasks.

clk_stepper :

Pulses for stepper motor controllers are generated with interrupts. The function inside interrupts makes 3 things : it pulses the pulse output of the appropriate stepper motor controller; it updates the angular position of each motor (at each step); and it sets a timer for the next pulse interrupt, according to period requested by higher level task

setpos_ang :

it computes the period of pulses and direction of each stepper motor, with angle consign, and delay. These movements are executed at constant angular position. For most of the movements, this function is only used for very short distances : 1mm.

goto_2D_short :

contains the reverse kinematics algorithm. For each 2D position (X, Y), it computes the angular position of each articulation.

Goto_2D_line and circle_2D :

decomposes the segment or arc requested into small segments of 1mm

print_single_char :

for just one character, it reads its font definition, prints the character at the current character position with goto_2D_line and circle_2D, and update the next character position.

print_string :

prints a character string, and manages line return (without word cut), and line clearing.

Discussions

Jibril wrote 02/27/2020 at 01:31 point

What computer language did you use? and also I think this robot is amazing!!

  Are you sure? yes | no