PICStep Microstepping Controller
Late last night in my little computer room PICStep breathed life into a small step-motor. At first triggered by a debounce push button, PICStep happily stepped the motor step by step in all modes. After a little more frigg'n around I hooked PICStep up to a parallel port, increased the drive current up to 1.5A and the drive voltage to 34V, then connected up a higher powered motor, and then started up TurboCNC on my test PC. And voila! Full microstepping action!!!
This controller works better than I could have hoped for, it's quite, it runs cool, it can handle pulse rates up to atleast 16KHz (I could go higher but my motor cannot spin that fast without stopping!).
The enable (the BRAKE on the LMD18245) line works well too, as soon as it's brought high or disconnected from ground the motors stop instantly with braking. Perfect for the emergency stop button on any machine. Rather than the motors coasting to a stop, they now just halt in their tracks!
The firmware works well, but I want to put a little polish into it's operation like, automatic current reduction on a timeout, 1/16 stepping mode, a watchdog timer in case the PIC crashes (I had this happen due to a spike when I was switching the motor power on and off), and a start-up self test.
Otherwise I'm stoked at this thing. I'm really considering getting some professional boards made up via CustomPCB.
So if you're interested in some boards, please let me know ASAP and I'll place an order depending on demand.
Finally! I'd found some time this weekend to dedicate to actually producing some PICStep boards and finally get to test it properly with hardware. After a few stuff ups with the press-n-peel transfer film (man I never thought this stuff was that fussy till now) I finally got the designs onto the boards and etched. Tonight I sat and painstakingly drilled all the holes, then mounted the numerous wire-links till finally all the components where on the board. Now I've just got to test it out before I apply full load to it. I'll do this during the week.
| Attachment | Size |
|---|---|
| PICStep_1.jpg | 141.65 KB |
| PICStep_2.jpg | 126.05 KB |
A total re-design of the PCB to make it more friendly to Press-n-Peel laser printer transfer film. I tried the V1.3 board with the film and I produced a few boards but some of the tracks are to small and the etching has made them fairly marginal in use. So I decided to start again and use thicker PCB traces. This should also allow the board now to be milled with a moderately accurate PCB mill.
| Attachment | Size |
|---|---|
| picstep_v2_combo.png | 211.16 KB |
| picstep_v2_combo_sml.png | 149.98 KB |
I've changed the PCB design a little, moved the input IDC connector, removed the +5V screw terminals in favour of the IDC, added a few more filter caps and just generally tidied up the board. Gerber/RS-274X and EPS files have been updated above to reflect the changes. Gonna start building these soon!
| Attachment | Size |
|---|---|
| picstep_v1.3_combo.png | 149.07 KB |
| picstep_v1.3_combo_small.png | 167.31 KB |
I've updated the schematic to reflect the updated 8 to 10pin IDC, plus I've added all the values to the diagram. R2 and R4 are changeable to set the require maximum current it driver can supply (should never go below 6.8K else you'll kill the drivers)
| Attachment | Size |
|---|---|
| picstep_v1.2_schematic.png | 102.38 KB |
| picstep_v1.2_schematic_small.png | 99.02 KB |
Cleaned up and adjusted the design slightly plus I added mounting holes! I've made sure there is enough distance between traces and changed the input connector from an 8 pin IDC to a 10 pin so that I can use the locking IDC connectors I already have. :)
| Attachment | Size |
|---|---|
| picstep_v1.2_eps.tar.gz | 28.74 KB |
| picstep_v1.2_gerber.tar.gz | 23.32 KB |
| picstep_v1.2_backside.png | 59.06 KB |
| picstep_v1.2_topside.png | 33.2 KB |
| picstep_v1.2_silk.png | 26.21 KB |
| picstep_v1.2_combo.png | 157.74 KB |
| picstep_v1.2_combo_small.png | 150.52 KB |
This is the V1.1 of the PICStep board. The first version was a bit smaller, but didn't have enough PCB heatsinking for pin 9 of the LMD18245 like their specification required. I'll be publishing the full GSchem and PCB files when it's not 2:26am.
| Attachment | Size |
|---|---|
| picstep_board_v1.1_lrg.png | 128.3 KB |
| picstep_board_v1.1_sml.png | 72.91 KB |
This is a first public release of the PICStep firmware. It hasn't been physically tested with any hardware yet, but it has been extensively tested on a testing breadboard with LED's, and in the MPLAB simulator. Any destruction or damaged caused by the use of this firmware is not my fault! :) (But it works good anyhow! 8)
The step calculations take around 57-63 instructions (including branches). So at 20MHz (200ns per intructions) by my ruff calculations the firmware should be able to step in just under 0.0134 milliseconds. Which in theory will allow in 1/8th mode a maximum of 2700RPM with a 1.8 degree motor.
This firmware supports 1/8, 1/4, 1/2 and Full (all partial step modes have full torque compensation). These modes are switchable via RA4 and RA5 while running, but mode switching can result in a few mis-aligned steps until the step tables align themselves back to the right timing.
The firmware upon power-up leaves the coils un-charged until the first initial step is received. This a small safety feature to stop motor and coils energizing while the controllers are powering up.
The pin layout is as per the schematic below. This is licensed under GPL, so any modifications etc etc must come back to me. Also this codes cannot be used in any commercial product unless your code is in accordance with the GPL license.
| Attachment | Size |
|---|---|
| picstep_v0.9.bz2 | 8.2 KB |
