Stepper motor Drivers in flowcode
Moderator: Benj
Stepper motor Drivers in flowcode
Hi,
I'm new to flowcode so hopefully somebody can help me with this. I'm trying to control a nema23 stepper motor using a motor driver and an arduino nano. I am unsure how to program this in flowcode. In flowcode the stepper motor output assumes that you will be connecting the coils of the stepper directly to the micro controller however there doesn't seem to be a way of selecting a motor driver output with STP DIR and ENA pins.
There have been a number of posts on this forum that appear to be from other beginners in a similar situation to me, mentioning using led outputs and other methods to presumably replicate the driver but I cannot find a clear guide explaining how to do this in FC7, and these are quite difficult to follow as a beginner. Could someone please help with this?
Cheers
links to other posts:
viewtopic.php?f=46&t=16989&p=70773&hili ... tor#p70773
viewtopic.php?f=46&t=18906&p=81717&hili ... tor#p81717
I'm new to flowcode so hopefully somebody can help me with this. I'm trying to control a nema23 stepper motor using a motor driver and an arduino nano. I am unsure how to program this in flowcode. In flowcode the stepper motor output assumes that you will be connecting the coils of the stepper directly to the micro controller however there doesn't seem to be a way of selecting a motor driver output with STP DIR and ENA pins.
There have been a number of posts on this forum that appear to be from other beginners in a similar situation to me, mentioning using led outputs and other methods to presumably replicate the driver but I cannot find a clear guide explaining how to do this in FC7, and these are quite difficult to follow as a beginner. Could someone please help with this?
Cheers
links to other posts:
viewtopic.php?f=46&t=16989&p=70773&hili ... tor#p70773
viewtopic.php?f=46&t=18906&p=81717&hili ... tor#p81717
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hi
FC does not assume you will be connecting a stepper motor directly to the microcontroller or any other motor for that matter! FC sets up and configures the control waveforms needed,, YOU must supply the buffers/drivers to interface to your chosen motor. How can any microcontroller supply 2.5A ish the Nema range of motors want.
Do you homework and investigate how to interface the outside world to a microcontroller.
Going back to your post, as you are using a driver module then look in the data sheet and it will tell you what it requires to function. Is it just an H-Bridge driver or a dedicated stepper motor driver etc. As you have not posted the driver you are using how can we help any further.
Matt
FC does not assume you will be connecting a stepper motor directly to the microcontroller or any other motor for that matter! FC sets up and configures the control waveforms needed,, YOU must supply the buffers/drivers to interface to your chosen motor. How can any microcontroller supply 2.5A ish the Nema range of motors want.
Do you homework and investigate how to interface the outside world to a microcontroller.
Going back to your post, as you are using a driver module then look in the data sheet and it will tell you what it requires to function. Is it just an H-Bridge driver or a dedicated stepper motor driver etc. As you have not posted the driver you are using how can we help any further.
Matt
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hello,
This is a stepper driver I've used before on a CNC project.
https://www.sparkfun.com/products/12779
You can drive it from Flowcode using LED components for the step and direction outputs. We can probably make a component quite easily so I'll get it on the list.
This is a stepper driver I've used before on a CNC project.
https://www.sparkfun.com/products/12779
You can drive it from Flowcode using LED components for the step and direction outputs. We can probably make a component quite easily so I'll get it on the list.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 5
- Joined: Fri Oct 29, 2021 2:47 pm
- Contact:
Re: Stepper motor Drivers in flowcode
Hi there
Is there a component available for a stepper driver. I have numerous and want to use them with an Arduino uno and a nema17 to build an automated filament winder.
Thanks very much
Is there a component available for a stepper driver. I have numerous and want to use them with an Arduino uno and a nema17 to build an automated filament winder.
Thanks very much
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hello,
Flowcode v9 supports step and direction type stepper drivers.
In earlier versions of Flowcode you probably need to do things using general purpose outputs such as LED components.
For example.
viewtopic.php?f=76&t=21384
Flowcode v9 supports step and direction type stepper drivers.
In earlier versions of Flowcode you probably need to do things using general purpose outputs such as LED components.
For example.
viewtopic.php?f=76&t=21384
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 5
- Joined: Fri Oct 29, 2021 2:47 pm
- Contact:
Re: Stepper motor Drivers in flowcode
Hi
That was quick. I couldn’t find the drivers in v9 but will look some more.
Thanks very much
That was quick. I couldn’t find the drivers in v9 but will look some more.
Thanks very much
-
- Valued Contributor
- Posts: 744
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 185 times
- Been thanked: 204 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hi
You can find them under Component Libraries > Outputs > Mechatronics
Regards
You can find them under Component Libraries > Outputs > Mechatronics
Regards
-
- Posts: 5
- Joined: Fri Oct 29, 2021 2:47 pm
- Contact:
Re: Stepper motor Drivers in flowcode
Thanks very much
All I have are in the attached. I am using v9 though - is there a difference?
Hope I am not being dense
All I have are in the attached. I am using v9 though - is there a difference?
Hope I am not being dense
- Attachments
-
- Capture.PNG (44.6 KiB) Viewed 6469 times
-
- Valued Contributor
- Posts: 744
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 185 times
- Been thanked: 204 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hi
Try using the Stepper Motor (Generic) or the NEMA8. The NEMAxx is really just a reference to the physical size of the motor and the component will probably work for all NEMA motors. The Wiki for these doesn't have an example as yet.
For both, under Properties > Driver you can choose between driving coils directly (via FETs or the like as Matt suggested in an earlier post in the thread) or use Step/Direction to provide signals to a driver board. The latter is probably easier as you can get away with just using Pulse / Direction / Enable pins if application allows.
Many driver board out there catering from hobby to industrial. Which one are you thinking on using?
Hope this helps
Regards
Try using the Stepper Motor (Generic) or the NEMA8. The NEMAxx is really just a reference to the physical size of the motor and the component will probably work for all NEMA motors. The Wiki for these doesn't have an example as yet.
For both, under Properties > Driver you can choose between driving coils directly (via FETs or the like as Matt suggested in an earlier post in the thread) or use Step/Direction to provide signals to a driver board. The latter is probably easier as you can get away with just using Pulse / Direction / Enable pins if application allows.
Many driver board out there catering from hobby to industrial. Which one are you thinking on using?
Hope this helps
Regards
-
- Posts: 5
- Joined: Fri Oct 29, 2021 2:47 pm
- Contact:
Re: Stepper motor Drivers in flowcode
Hi again
I have a few - testing really with 2209 drivers and 17HS4023 steppers but will probably use TB6600 4A 9-42V Stepper Motor Driver Controllers with stronger nema 17 motors. I have all those already and had it working with the CNC shield but want to be more economical and also use this little project to learn flowcode.
Thanks for your help here.
All the best
I have a few - testing really with 2209 drivers and 17HS4023 steppers but will probably use TB6600 4A 9-42V Stepper Motor Driver Controllers with stronger nema 17 motors. I have all those already and had it working with the CNC shield but want to be more economical and also use this little project to learn flowcode.
Thanks for your help here.
All the best
-
- Valued Contributor
- Posts: 744
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 185 times
- Been thanked: 204 times
- Contact:
Re: Stepper motor Drivers in flowcode
Hi
I've used TB6600 drivers and they are quite capable. I used pulse / direction with a duty cycle of 25% with little trouble at all (well apart from me doing something stupid).
The generic stepper component will work fine.
You seem quite familiar with stepper operation so I'm guessing you may just need a hand with FC itself to create the required pulses. Many ways to do such including using component, delays, PWM or timer interrupts.
Once you establish how many steps per revolution you need, and subsequent revs per second, you can work out your pulse rate and duty cycle. I'm not overly familiar with the Nano but it is more than capable of this.
I can probably knock up a very basic example if you get stuck.
Regards
I've used TB6600 drivers and they are quite capable. I used pulse / direction with a duty cycle of 25% with little trouble at all (well apart from me doing something stupid).
The generic stepper component will work fine.
You seem quite familiar with stepper operation so I'm guessing you may just need a hand with FC itself to create the required pulses. Many ways to do such including using component, delays, PWM or timer interrupts.
Once you establish how many steps per revolution you need, and subsequent revs per second, you can work out your pulse rate and duty cycle. I'm not overly familiar with the Nano but it is more than capable of this.
I can probably knock up a very basic example if you get stuck.
Regards
-
- Posts: 5
- Joined: Fri Oct 29, 2021 2:47 pm
- Contact: