General Category => Can't stop building => Topic started by: Chems on May 17, 2011, 08:51:07 PM

Title: Help with Stepper motor and PIC board?
Post by: Chems on May 17, 2011, 08:51:07 PM
Hi Guys,

I'm looking to make a foray back into the electronics for a project. I have a new router in my router table and would like to incorporate a rise and fall mechanism in it that is controlled by a stepper motor. The mechanics are already in place a threaded rod and static bolt on the body of the router provide the movement up and down when the rod is turned. It doesn't require a huge amount of torques as the router only weights 9kg and the springs are to be removed.

What I'm after is a programmable chip board, pref C lang and support for a range of input buttons which will be at minimum 4. The 4 buttons will control the rise and fall. One button will raise the router fully, and the other lower it fully. The other 2 will raise and lower in 1mm increments.

Do you suppose any of you guys could give me some help in getting a circuit diagram going and what sort of hardware combinations I'd be looking at. I have the programming side down but other than my bongofish cintiq experience my electronics are rather limited.

Thanks in advance I hope you guys can help!

Title: Re: Help with Stepper motor and PIC board?
Post by: bernard on May 17, 2011, 11:00:54 PM
Chems!  Welcome back!!  Wow, you are one of the guys in the early days of bongofish, you are one of the heroes in here. :)

What type of price & soldering hassles are you willing to go to?  A custom PCB?  Arduino-style boards? 

Here are some random thoughts :

What you are asking can be done with a relatively small chip running at a fairly low speed (Mhz).  The Teensy board I use these days the cheapest+smallest option I know. 18$US+5$ shipping. The Arduino is a bit more expensive (nothing under 30$ I think) but combined with a breadboard, you can do a long way without touching a soldering iron.  Arduino boards uses 8-bit CPUs (AVR architecture) and can be programmed using either the Arduino IDE or other (more powerful) environments like Eclipse and others.  For an experienced programmer Eclipse is better but for a beginner it is too complex to setup. 

The Arduino has a nice support for all sorts of things like stepper motors and whatnot.  The Teensy could also be programmed using the Arduino IDE as well.

Title: Re: Help with Stepper motor and PIC board?
Post by: Chems on May 18, 2011, 01:43:40 AM
Hi bernard,

Yeah I was in at the beginning of something great I think with the DIY cintiq!

I'm ok soldering, and happy to pay to have a PCB board made up. Regarding the programming side, I'm actually a computer science student nowdays so thats the bit I'm ok with.

It would be great if you could help me work out what sort of kit I need and a design. The most confusing aspect at the moment is what power motor will be required. Its only going to be turning a threaded rod so there shouldn't be massed of resistance.

Title: Re: Help with Stepper motor and PIC board?
Post by: bernard on May 18, 2011, 04:31:03 PM
"only 9kg" -- well that is heavy to me. How easy is it to rotate the rod really?

For the mechanical side (finding the right, affordable motor) I am pretty ignorant -- I know someone that did exactly that with his router table but it was not with a stepper motor, just a standard motor, up/down buttons and limit switches.

(that makes me think that you will probably need a mechanism to "limit" the movement to not exceed the maximum position range.)

You might want to check the myriads of "DIY CNC" sites out there doing very similar stuff to get advice on the "mechanical" side of things.

You might not need to build new PCBs: there are already lots of "breakout-boards" out there. (Sparkfun/Robotshop)

This is a pretty common thing you are looking for. I guess the solution would depends on how much "fun" you want to put in this :)

Title: Re: Help with Stepper motor and PIC board?
Post by: Chems on May 18, 2011, 05:34:32 PM
Yeah I thought it would be a bit easier to find the stuff. I spent a lot of time looking at Arduino and it looks perfect. Although the router weights 9kg its just turning a threaded rod with a fairly shallow pitch. It doesn't take much really to turn it but its hard to guess what that is in NM.

Title: Re: Help with Stepper motor and PIC board?
Post by: Drewid on June 09, 2011, 08:03:06 PM
Hey Chems,  How's tricks?     ;D ;D

I know someone who might be useful. I'll give him a nudge and see if I can get any comments.

Title: Re: Help with Stepper motor and PIC board?
Post by: Drewid on June 10, 2011, 03:31:39 PM
MMr Jones he say:
It's certainly a fun complicated subject, from my early days of making my own stepper drivers I've found that while it's indeed great to do, there's nothing like buying a pre-made system off the internet that does everything more reliably than I could ever achieve. My current CNC mill has cheapo driver units (I say cheap, about £40 each really but they are high-current) which are far better than I could have made, and the system I made for controlling is an ARM cpu based unit, but it's just not great so I want to replace it. There are so many new units out now though, I just found this on ebay:

Has pretty much everything you need, 3 drivers, parallel interface and even a manual sub port which you can also buy a handheld controller for to move the axis around. Even I'm thinking of replacing my setup with one of these now!