Jump to content

Archived

This topic is now archived and is closed to further replies.

tabath

PIC and stepper motor

Recommended Posts

I'm looking at putting together a hack that basically just depesses a pin which in turn closes a valve - the pin and valve bit is done.

I'm thinking about using a PIC microcontroller and a stepper motor so I have control over how much the pin is depressed and so how far closed the valve is.

I have never done any PIC programming before but have found a kit and course that seems reasonable, I have seen pics controlling stepper motors as well but before I go ahead and shell out for the PIC kit I want to make sure this is the best and most cost efficient way to go. Still have to work out how to rig up the stepper motor to the pin to get stepped contol of the pin - any engineers on here done anything similar or could point me in the right direction for this?

Cheers

Share this post


Link to post
Share on other sites
I'm looking at putting together a hack that basically just depesses a pin which in turn closes a valve - the pin and valve bit is done.

I'm thinking about using a PIC microcontroller and a stepper motor so I have control over how much the pin is depressed and so how far closed the valve is.

I have never done any PIC programming before but have found a kit and course that seems reasonable, I have seen pics controlling stepper motors as well but before I go ahead and shell out for the PIC kit I want to make sure this is the best and most cost efficient way to go. Still have to work out how to rig up the stepper motor to the pin to get stepped contol of the pin - any engineers on here done anything similar or could point me in the right direction for this?

Cheers

I worked with a stepper motor 2 weeks ago. We used a basic stamp and added a function to rotate pin outputs like a shift register. Each step or half step is controlled by moving around some binary values, where each step cooresponds to moving over one place in the shift register. This is the way most stepper motors work.

To know the rotation of the motor to begin with it's useful to have a small IR LED and phototransistor assembly where the motor's shaft is connected to a small arm which can pass between the LED and phototransistor. This way, you can sense the 'zero' position of the motor and know its rotation simply by watching the phototransistor's signal.

For the driving pins off the PIC, it's useful to use a chip containing darlington pairs, or just a bunch of transistors so they can do the switching for the higher powered motor inputs. Hook up a bunch of them with pull-up resistors and then trigger the switches using the PIC pins.

Here's the free software for the basic stamp we used:

http://www.parallax.com/tabid/441/Default.aspx

Share this post


Link to post
Share on other sites
I worked with a stepper motor 2 weeks ago. We used a basic stamp and added a function to rotate pin outputs like a shift register. Each step or half step is controlled by moving around some binary values, where each step cooresponds to moving over one place in the shift register. This is the way most stepper motors work.

To know the rotation of the motor to begin with it's useful to have a small IR LED and phototransistor assembly where the motor's shaft is connected to a small arm which can pass between the LED and phototransistor. This way, you can sense the 'zero' position of the motor and know its rotation simply by watching the phototransistor's signal.

For the driving pins off the PIC, it's useful to use a chip containing darlington pairs, or just a bunch of transistors so they can do the switching for the higher powered motor inputs. Hook up a bunch of them with pull-up resistors and then trigger the switches using the PIC pins.

Here's the free software for the basic stamp we used:

http://www.parallax.com/tabid/441/Default.aspx

Thanks for the reply,I was considering programming the PIC with either C or assembler, wasn't aware of ones with the BASIC interpreter- learning curve would obviously be less - will look at the pricing considerations. Thanks for the heads up.

Also these parllax chips support iinterface with 1-wire microlans and since I was looking to find some way o fgetting temp input for this project this is brilliant. Just have to find out if they ship to the UK>

Share this post


Link to post
Share on other sites

Well,

I personally felt that the Stepper motor applications, the Circuitry of Cypress is awesome. I used it for some of my application, n its simply superb. They also provide the documentations, and kits.

To know more, check it at http://www.cypress.com/

Share this post


Link to post
Share on other sites

Have a look at the Arduino project at: http://arduino.cc/

I use one, though i've never implemented a stepper motor, and everything works perfectly.

It's programmed in a C-like way but you can do all the AVR (Atmel uC) stuff as well.

There is a stepper motor example here: http://www.arduino.cc/en/Tutorial/StepperUnipolar

I suppose the Arduino (Decimilla) is usefull for prototyping or hobby stuff (like me). PICs will be more cost effective if you're making loads.

You've probably finished already, but, future projects maybe...

Share this post


Link to post
Share on other sites

Stepper Motor Application Notes:(From Microchip)

AN907

Stepper Motor Fundamentals

AN906

Stepper Motor Control Using the PIC16F684

AN822

Stepper Motor Microstepping with PIC18C452

Here is a webseminar:

This webseminar introduces three types of stepping motors. The various components that make up each type are explored as well as how they interact to rotate the motor. Subsequent webseminars will be available to expand on topics not discussed here.

If you need "samples" of most types of PICs

Hope that helps,

-Tim

edit: - its not stepper motors but if motor control interests you -

Make Magazine: Baja Buggy

Baja Buggy (Every thing you need to build one yourself)

Built these up to teach people about driving a motor.

Share this post


Link to post
Share on other sites
Stepper Motor Application Notes:(From Microchip)

AN907

Stepper Motor Fundamentals

AN906

Stepper Motor Control Using the PIC16F684

AN822

Stepper Motor Microstepping with PIC18C452

Here is a webseminar:

This webseminar introduces three types of stepping motors. The various components that make up each type are explored as well as how they interact to rotate the motor. Subsequent webseminars will be available to expand on topics not discussed here.

If you need "samples" of most types of PICs

Hope that helps,

-Tim

edit: - its not stepper motors but if motor control interests you -

Make Magazine: Baja Buggy

Baja Buggy (Every thing you need to build one yourself)

Built these up to teach people about driving a motor.

Thanks for the links Valkyries -will follow up and have a read. I am still actually working on this project - looking to develop something comercial from it eventually but for now its just for personal interest.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...