From: IOhannes m zmölnig zmoelnig@iem.at To: pd-list@lists.iem.at Subject: Re: [PD] stepper control
depends... you really have the same jitter when doing signal processing, and yet you don't hear it. (just hook your [metro 0.1] to a [tgl] -> [vline~] -> [dac~])
why? because [dac~]/[adc~] synchronize the jittery input data with a real-time clock.
so Pd itself is accurate enough. the problem is that you cannot really hook a number box to your stepper motor, you need some object that translates the in-patch messages to real-world events. and this object needs to properly handle the timed messages.
since ray did not mention how he gets the data to the stepper motor, there is little additional help I can give.
gfmdsr IOhannes
yes, after lots of tests i discover the polarity switching sequence
to make the motor spin continuosly in one direction or the other.
of course the method of using a metro for banging each pulse
runs into problems when going a bit faster and it completely
collapse. im using an l-298 h bridge with an arduino and
firmata and doing all the control with digital pulses.
there is another little stepper driver controller that
can work with only 2 instructions, the direction and the pulse.
it could be really cool if it where possible to do the control
with an oscillator as Roman suggested but then how would
you connect the 4 cables of the bipolar stepper?
is there a tutorial on how to drive steppers with the same
control you drive sound into a speaker?
thanks
r.y
Just to share some thoughts after reading this:
https://en.wikipedia.org/wiki/Stepper_motor
Also please be careful and be aware that there is risk of damaging things.
yes, after lots of tests i discover the polarity switching sequence to make the motor spin continuosly in one direction or the other. of course the method of using a metro for banging each pulse runs into problems when going a bit faster and it completely collapse.
I understand the context, BUT, I think this will happen at some point on any stepper motor, high speed is not their "show".
it could be really cool if it where possible to do the control with an oscillator as Roman suggested but then how would you connect the 4 cables of the bipolar stepper?
Consider this a risk to the amp, do it with a low power one, probably with one of those inside little usb speakers.
Any stereo amp has 4 cables for the speakers, L/ground to one coil, R/G for the other. (needs polarity testing for the motor cables)
I think you can get very useful data on how to control that specific motor if you think of both coils as Microphones, you can connect both coils to your soundcard(A), ch1/coil 1, ch2/coil 2, and start recording the audio that it produces when spinning it with your fingers (or spinning it with another motor at a constant speed).
You will get very precise waveforms to analyze (specially the shift between L/coil 1 and R/coil 2.)
(A) Be sure not to connect the motor to your normal Mic input (some sound cards have +5V on the ring of 3.5 mm stereo jack for the electret microphones)
is there a tutorial on how to drive steppers with the same control you drive sound into a speaker?
Probably you write one : )
Mensaje telepatico asistido por maquinas.
On Sun, Aug 14, 2016 at 08:16:52AM +0000, Lucas Cordiviola wrote:
Also please be careful and be aware that there is risk of damaging things.
Consider this a risk to the amp, do it with a low power one, probably with one of those inside little usb speakers.
Any inductive load will give a back EMF on the negative going edge of the pulse. Look at stepper motor driver circuits and you will see that protection diodes are used. Push-pull audio amps aren't really designed for this kind of punishment, they are linear, whereas stepper drivers are designed to switch a clean pulse. That said, for small motors you will get limited success, so its a useful hack to know.
Andy
On Sun, Aug 14, 2016 at 1:34 PM, Andy Farnell padawan12@obiwannabe.co.uk wrote:
On Sun, Aug 14, 2016 at 08:16:52AM +0000, Lucas Cordiviola wrote:
Also please be careful and be aware that there is risk of damaging things.
Consider this a risk to the amp, do it with a low power one, probably with one of those inside little usb speakers.
Any inductive load will give a back EMF on the negative going edge of the pulse. Look at stepper motor driver circuits and you will see that protection diodes are used. Push-pull audio amps aren't really designed for this kind of punishment, they are linear, whereas stepper drivers are designed to switch a clean pulse. That said, for small motors you will get limited success, so its a useful hack to know.
And most cheap audio amps won't go bipolar, the 'negative' output is always 0 Volts. You would need 4 channels of sound to do it.
But if the OP already has an Arduino and an L298 it just makes sense to program the Arduino to step the motor and use the serial port to tell it when to step or at what speed to run. If you want better sync, try sending a square wave audio signal from the Pd patch to the Arduino and program the Arduino to use that as the stepper clock. (You would need two channels of audio, one for each direction.)
Martin
Following Roman's idea:
But this is for Unipolar motors (5 wires):
With 4 audio channels to 2 sets of small USB speakers (2 stereo amps / 4 speakers ) wouldn't it achieve "super smooth micro stepping"?
https://en.wikipedia.org/wiki/Stepper_motor#Phase_current_waveforms
https://en.wikipedia.org/wiki/Stepper_motor#Microstepping
Mensaje telepatico asistido por maquinas.
From: Martin Peach chakekatzil@gmail.com Sent: Sunday, August 14, 2016 5:52 PM To: Andy Farnell Cc: Lucas Cordiviola; pd-list@lists.iem.at; ray Y Subject: Re: [PD] stepper control
On Sun, Aug 14, 2016 at 1:34 PM, Andy Farnell <padawan12@obiwannabe.co.ukmailto:padawan12@obiwannabe.co.uk> wrote: On Sun, Aug 14, 2016 at 08:16:52AM +0000, Lucas Cordiviola wrote:
Also please be careful and be aware that there is risk of damaging things.
Consider this a risk to the amp, do it with a low power one, probably with one of those inside little usb speakers.
Any inductive load will give a back EMF on the negative going edge of the pulse. Look at stepper motor driver circuits and you will see that protection diodes are used. Push-pull audio amps aren't really designed for this kind of punishment, they are linear, whereas stepper drivers are designed to switch a clean pulse. That said, for small motors you will get limited success, so its a useful hack to know.
And most cheap audio amps won't go bipolar, the 'negative' output is always 0 Volts. You would need 4 channels of sound to do it.
But if the OP already has an Arduino and an L298 it just makes sense to program the Arduino to step the motor and use the serial port to tell it when to step or at what speed to run. If you want better sync, try sending a square wave audio signal from the Pd patch to the Arduino and program the Arduino to use that as the stepper clock. (You would need two channels of audio, one for each direction.)
Martin
hello,
electronic circuit like : http://reprap.org/wiki/Pololu_stepper_driver_board or http://www.schmalzhaus.com/EasyDriver/ can control the steeper in a more acurate way than what you can do with an audio amplifier. (see datasheet for more info about the way this chip control a motor).
they are inexpensive and can easily be control thanks to a line out and small electronic circuit (OP AMP)
I think you will have better result using this dedicated chip than hacking an audio amplifier.
cheers c
Le 15/08/2016 à 09:50, Lucas Cordiviola a écrit :
Following Roman's idea:
But this is for Unipolar motors (5 wires):
With 4 audio channels to 2 sets of small USB speakers (2 stereo amps / 4 speakers ) wouldn't it achieve “super smooth micro stepping”?
https://en.wikipedia.org/wiki/Stepper_motor#Phase_current_waveforms
https://en.wikipedia.org/wiki/Stepper_motor#Microstepping
Mensaje telepatico asistido por maquinas.
*From:* Martin Peach chakekatzil@gmail.com *Sent:* Sunday, August 14, 2016 5:52 PM *To:* Andy Farnell *Cc:* Lucas Cordiviola; pd-list@lists.iem.at; ray Y *Subject:* Re: [PD] stepper control
On Sun, Aug 14, 2016 at 1:34 PM, Andy Farnell <padawan12@obiwannabe.co.uk mailto:padawan12@obiwannabe.co.uk> wrote:
On Sun, Aug 14, 2016 at 08:16:52AM +0000, Lucas Cordiviola wrote: > Also please be careful and be aware that there is risk of > damaging things. > > Consider this a risk to the amp, do it with a low power one, > probably with one of those inside little usb speakers. Any inductive load will give a back EMF on the negative going edge of the pulse. Look at stepper motor driver circuits and you will see that protection diodes are used. Push-pull audio amps aren't really designed for this kind of punishment, they are linear, whereas stepper drivers are designed to switch a clean pulse. That said, for small motors you will get limited success, so its a useful hack to know.
And most cheap audio amps won't go bipolar, the 'negative' output is always 0 Volts. You would need 4 channels of sound to do it.
But if the OP already has an Arduino and an L298 it just makes sense to program the Arduino to step the motor and use the serial port to tell it when to step or at what speed to run. If you want better sync, try sending a square wave audio signal from the Pd patch to the Arduino and program the Arduino to use that as the stepper clock. (You would need two channels of audio, one for each direction.)
Martin
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Totally,
Martin suggested something using what Ray already had (arduino - L298), but these chips seems perfect.
and can easily be control thanks to a line out and small electronic circuit (OP AMP)
You meant: (square wave) --> [dac] --> line out --> op amp --> Step (logic)
Right?
Mensaje telepatico asistido por maquinas.
From: Pd-list pd-list-bounces@lists.iem.at on behalf of cyrille henry ch@chnry.net Sent: Monday, August 15, 2016 9:50 AM To: pd-list@lists.iem.at Subject: Re: [PD] stepper control
hello,
electronic circuit like : http://reprap.org/wiki/Pololu_stepper_driver_board [http://reprap.org/mediawiki/images/a/a3/0J4575.1200.jpg]http://reprap.org/wiki/Pololu_stepper_driver_board
Pololu stepper driver board - RepRap - RepRapWikihttp://reprap.org/wiki/Pololu_stepper_driver_board reprap.org Please note: Pololu stepper driver boards has 0.05 ohm sense resistors instead of StepStick 0.2 ohm. A Pololu stepper driver board is a well known RepRap machine ...
or http://www.schmalzhaus.com/EasyDriver/ can control the steeper in a more acurate way than what you can do with an audio amplifier. (see datasheet for more info about the way this chip control a motor).
they are inexpensive and can easily be control thanks to a line out and small electronic circuit (OP AMP)
I think you will have better result using this dedicated chip than hacking an audio amplifier.
cheers c
Le 15/08/2016 à 14:43, Lucas Cordiviola a écrit :
Totally,
Martin suggested something using what Ray already had (arduino – L298), but these chips seems perfect.
/> and can easily be control thanks to a line out and small electronic circuit (OP AMP) /
You meant: (square wave) --> [dac] --> line out --> op amp --> Step (logic)
(square wave) --> [dac] --> line out --> op amp --> driver board -> Stepper
cheers c
Right?
Mensaje telepatico asistido por maquinas.
*From:* Pd-list pd-list-bounces@lists.iem.at on behalf of cyrille henry ch@chnry.net *Sent:* Monday, August 15, 2016 9:50 AM *To:* pd-list@lists.iem.at *Subject:* Re: [PD] stepper control
hello,
electronic circuit like : http://reprap.org/wiki/Pololu_stepper_driver_board http://reprap.org/wiki/Pololu_stepper_driver_board
Pololu stepper driver board - RepRap - RepRapWiki http://reprap.org/wiki/Pololu_stepper_driver_board reprap.org Please note: Pololu stepper driver boards has 0.05 ohm sense resistors instead of StepStick 0.2 ohm. A Pololu stepper driver board is a well known RepRap machine ...
or http://www.schmalzhaus.com/EasyDriver/ can control the steeper in a more acurate way than what you can do with an audio amplifier. (see datasheet for more info about the way this chip control a motor).
they are inexpensive and can easily be control thanks to a line out and small electronic circuit (OP AMP)
I think you will have better result using this dedicated chip than hacking an audio amplifier.
cheers c
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
You meant: (square wave) --> [dac] --> line out --> op amp --> Step (logic)
(square wave) --> [dac] --> line out --> op amp --> driver board -> Stepper
Right, thanx for clarifing.
By "Step (logic)" I was referring to the Driver Board "step" input.
Mensaje telepatico asistido por maquinas.