The basic concept PC/realtime / firmware...

Toad3 Project

Toad3 Project

!!! This page under construction 6.1.2009 / This is a works in progress project !!!

Introduction

In short, Toad3 is a three axis stepper motor control board with a PIC microcontroller the mandatory power supply thrown in and. Connect it to a transformer and a Macintosh (failing that you can use an ordinary PC as well) and you can control three stepper motors to your hearts content.

The idea is to do all the heavy calculation and user interface stuff on the PC and the hard real time stuff on the microcontroller. There is plenty of horse power not to mention graphics, networking, disk storage, keyboard and mouse on available in an old laptop at dirt cheap prices but no reliable hard-realtime capabilety operating system or suitable IO. On the otherhand any microcontroller can do hard-realtime control with a few hundred lines of C-code but lacks the user interface and connnetivity.

This concept combines the best of both world: for about 100 EUR I can turn my old laptops into 3 Axis CNC controllers!

This all started from my long time ambition to do some CNC stuff, and being what the kind of person I am, I just had to start from scratch. Yes there are a lot of good, practical and economical solutions out there, all you have to do is google a bit. So if you just want to do CNC and get it to work, Toad3 may not be for you. Check out Mach3 and Geckodrive.

Toad3 is not kit nor is this page a DIY construction instructions.

Having said that: what you find on this page is a description of the Toad3 project and an offer to make the Toad3 PCB board available to interested people. Toad3 is not for absolute beginners, on the other hand it does not require a lot skills or knowledge and with a little help from friends and luck it should be possible to get this working.

There are a couple of different views you can take on the Toad3 board. You can view it as a breakout board for three very nice stepper controllers or you can view it as board to experiment with PIC18F4550 with or without USB or you can aim for the three axis CNC controller which is my main goal. Anyway you look at it having a decent PCB beats wirewrapping or Veroboarding any time in terms reliabilty or time spent. What is your spare time worth per hour?

I'm offering the design here for whoever wants to endeavor to do something similar.

The schematics and PCB layout are available so look before you leep. All responsibilety is yours, all I can guarantee is that I've tried to provide full disclosure and that I've built one board succesfully.

What is being offered

Basically I'm offering this page along with full schematics and PCB layout in the form of PDF documents.

The boards are available (about 3 week delivery as there is no stock) and are manufactured by Olimex and cost 40 EUR + postage a piece, unless there is enough interest to get a full production run. A full production run requires about 30 boards and the price will then be about 12 EUR + postage.

In addition to the board and components you need to supply your own cooling block, transform, enclosure, primary switch/fuse.

So far, two boards have been manufactured and the basic functionality (CPU, Serial communication and Stepper controller) has been succesfully tested. A few minor errors have been discovered that will be corrected before next manufacturing run.

If there is interest I might also make a quantity purchase of the harder to get key components, such as the PIC18F4550 and the TB6560AHQ stepper controller.

So what does this fun cost?

To give you an idea what this will at the end of the day here are some ballpark prices:

PCB 40 / 12 EUR (see above)
PIC18F4550 5 EUR
TB6560AHQ 4 EUR
DB9 connector 2 EUR
Enclosure 20 EUR
Transformer 20 EUR
Other components 20 EUR (all together)

You will also need the PicKIT or some such programmer which will set you back some 35 EUR.

What about software?

I will publish on this page some basic firmware software along instructions to compile and program it. The firmware will be lisenced under LGPL or some such. I eventually hope to make a whole G-code compliant CNC firmware available but that is too early to say yet.

The toolchain, which I've proved works, is based on SDCC Small Device C Compiler which runs on Mac OS, Linux and Windows. There are a lot of other toolchains out there besides of what I'll be using. You can even program the PIC using BASIC!

To program the chip you need a programmer and programming software. I've used PICKit2 for burning the firmware which works mainly in Windows but also in Linux and someone has even hacked it to work with Mac OS X! , bute there are a lot of other options to do the firmware programmin in Windows, Linux and even under Mac OS X.

The board has a Microchip standard ICSP interface that is compatible with a number of programmers.

Documentation

To get the documention click the image above!

Toad3 Features

All components through hole mounted, all ICs 100 mil raster packages, no SMD devices.

PIC18F4550 Flash microcontroller

PIC18F4550 Datasheet

- 40 pin PDIP package, you actually solder these!
- 48 MHz clock speed
- 32 kBytes Flash program memory, in circuit programmable
- 2 kBytes RAM
- 256 bytes EEPROM
- 35 I/O pins
- 13 10bit A/D inputs
- Timers, SPI, I2C, PWM, UART ...
- USB interface
- C programmable with Free tools, on Mac OS X, Linux and Windows

So all you need to do some hard-realtime stuff in a great, easy to use DIL package, no surface mount soldering skills or tools required.

3 x TB6560AHQ 3 Amp microstepping controller

TB6560 Datasheet

- Drivers bipolar two phase steppers
- 25 pin HZIP package, not only can you solder this but a heat sink is easy to mount too
- Up to 40 V drive voltage
- Up to 3 Amp current / phase
- Two Microstepping modes in addition to full and half stepping
- Integrated BiCD MOS transistor power stage
- Minimal external components just current measurement resistor + timing and bypass capacitors required

For years I've been on the look out for high current, fully integrated stepper controller in a usable package that allows easy cooling and hobby friendly soldering, and here it is!

Optically isolated RS232 interface

- up to 19200 baud
- optically isolated

I felt it prudent to have the RS232 communication to be optically isolated as some serious current and relatively high voltages will be present on the Toad3 board which could fry my 3000 EUR Mac mother board. I don't want my Toad3 to turn into Toast3!

Some CNC oriented I/O

- Two robust and noice immune limit switch inputs for each motor with voltage output for optical sensors
- One free relay contact for controlling spindle or what not
- One robust and noice immune digital input for touch probe - One analog input for speed control potentiometer

Power Supply

- Input voltage 12-28 VAC max 4 Amps (depending on components used)
- About 100 W power handling capabilety
- Secondary side main fuse
- Individual fuses for each motor controller
- Room for on board capacitors up to 20.000 uF
- On board +5 V linear regulator for +5 V for the PIC
- On board +12 V linear regulator +12 V for the limit switches/sensors

Connectivity

- DB9 Male connector for RS232 (requires null modem cable)
- 3 x DB9 Female connectors for three motors and two limit switches per motor
- 10 pin header for other I/O,compatile with standard PC front panel DB9 cables for
- 5 pin header for RUN LED / RESET switch, compatible with standard PC front panel cables
- 5 pin ICSP and RJ8 phone jack connector for standard PICKit programmer - On board USB device connector
- screw terminals for power input

Motor Control

- Motor max current (0 - 3A) selectable on a per motor bases with resistors
- Thermal protection common to all motors
- Switching/PWM frequency selectable on a per motor basis with a capacitor
- Two motors (XY) share control lines, one motor (Z) has independent control lines
-- All control lines under software control
-- Two step modes, microstep or full step
-- Four different currents/torque (100,%,75%,50%,20%)
-- Hi-Z (disable) mode

Why the name, Toad3?

According to the marketing guru and genius Jack Trout, some 20 years ago, in todays world of all senses numbing overflow of communication, the key to succesfull marketing is positioning. Thus I'm positioning this 'product' relative to the well established and respected market leader Geckodrive with the slogan:

For better, for worse, Toad is no Gecko!

More on the practical side, any project needs a name and preferably a short, uncommon and easily googleable. Toad being a rather common noun and this being a three axis stepper motor controller I decided to call it Toad3.

To be continued....

br Kusti

6.1.2009