The initial board

The initial circuit was published bye "Mdog" and did exist into two versions "solo" and "4axis". 

Both of these boards rely on the Ti LMD1845 H bridge circuit.

The LMD18245 is a full-bridge power amplifier with 2• DMOS Power Stage Rated at 55V and 3A

The initial boards produced by Mdog were single side PCBs. I refurbished, into this project, the "µstep solo" with dual sided PCB. 

In 2009 I wrote the firmware of the boards in assembler for PIC16F57. This firmware proved to be very reliable and efficient. I publish the source code into this project today!


hardware

schematics

Here are the schematics of the µstep solo board:

As you can see two LMD18245 are used to control, each, one motor winding. The electronics is directly copied from the datasheet

A PIC 16F57 is used to control the LMD18245 and to interface with "external world" via classical step and dir signals.

External logic signals are TTL 5V but can work with 3.3V logic (this has proven to work with my laser cutter retrofit which is indeed using two of µstep solo boards to run controlled by an ESP32 at 3.3V).

pcb

PCB was designed from Mdog's board and updated to a more compact dual sides form factor:

PCBWay kindly proposed to sponsor this project and has produced professionnal looking boards.

You can get this PCB on my PCBWay's shared project : https://www.pcbway.com/project/shareproject/_step_solo_Stepper_motor_control_board_3A_30b05dd2.html

Soldering is very easy. My only recommendation is to put the microcontroller on a DIL socket to be able to remove it easily to flash the firmware. (see later).


Firmware

Original firmware was written by Mdog in C language. 

The current firmware has been ported by myself from C to assembler. The reason is to get a much better control of timing which prevents "clicking noise" into the motor when high speed is required.

Here are the release notes and main specifications:

; µstep V2.0 firmware - PIC based microstepping motor controller
; copyright (C) 2009 Jean-Pierre Gleyzes <freedom2000 at free.fr>

; based on
; PICStep v2.0 Firmware - PIC based microstepping motor controller
; Copyright (C) 2004 Alan Garfield <alan@fromorbit.com>

; evolutions from PicStep's design :
; fully ported on PIC16F57 (baseline PIC : no interruptions, different pinout...)
; adapted to Mdog's µstep board design 
; includes 1/2, 1/4, 1/8, 1/16 µstep mode
; includes different DAC tables for LMD18245T drivers
; includes idle mode current reduction :
    ; after 30s 75%
    ; after 90s 40%
; new in V2 possible control of current reduction mode with Mach3 "Current Hi/Low" signal
    ; when set to 1 --> forces DAC to previous full power values (no loss of step !)
    ; when 0 AND more than 10s inactivity on ALL axes : 75% power
    ; when 0 AND more than 30s inactivity on ALL axes : 40% power

; performances :
; step interrupt detection 
    ; 0 to 1 edge on pin RA1
    ; time min to detect step interrupt :              6 cycles     -->      t0 =  1.2 µs (with current reduction mode)
    ; time min to detect step interrupt :              4 cycles     -->      t0 =  0.8 µs (without current reduction mode)
    ; time max to detect and process interrupt :     43 cycles     --> t0 + t1 =  8.6 µs (with current reduction mode)
    ; time max to detect and process interrupt :     32 cycles     --> t0 + t1 =  6.4 µs (without current reduction mode)
    ; timemax to detect and process time out :        63 cycles    --> t0 + t2 = 12.6 µs
    ; timemax to recover from current reduction max 43 cycles   -->      t3 =  8.6 µs (under Mach3 control "Current Hi/Low" signal set to 1

; step width MUST be greater than 1.2 µs to be detected (with current reduction mode)
; step width MUST be greater than 0.8 µs to be detected (without current reduction mode)
; step frequency MUST NOT be greater than 1/8.6 MHz = 116279 Hz in order to NOT loose steps (with current reduction mode)
; step frequency MUST NOT be greater than 1/6.4...
Read more »