DMX Control of Stepper
DynamoBen
Posts: 366
I'm trying to build a new Halloween prop. The goal is to have DMX control of 1 bipolar stepper, 1 phase-angle dimmer, and one servo from one SX.
·
I'm using the DMX code from this thread:
http://forums.parallax.com/showthread.php?p=724440
·
…and stepper code from this thread:
http://forums.parallax.com/showthread.php?p=607883
·
While each work well individually when I merge them together neither works, thoughts?·
·
I'm using the DMX code from this thread:
http://forums.parallax.com/showthread.php?p=724440
·
…and stepper code from this thread:
http://forums.parallax.com/showthread.php?p=607883
·
While each work well individually when I merge them together neither works, thoughts?·
SXB
10K
Comments
Post Edited (JonnyMac) : 9/18/2008 6:01:18 PM GMT
If I didn't know any better I would think this was a hardware issue not code. The last time I saw something similar during a project I added a 10uF cap to the 5V rail and things began to work properly.
Any thoughts or similar expirences? (I'm using the SX development board /w breadboard)
Nevertheless - as JonnyMac suggested - the code and the schematic would make it less guessy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Thanks for the help so far.
Post Edited (DynamoBen) : 10/10/2008 3:02:52 PM GMT
This code is going to controll a halloween prop. The stepper is designed to raise/lower the prop and the phase angle dimmer will illuminate it. There is a section of the code that has not been added which controls two servos·for pan and tilt on the prop.
So the dimmer, stepper, and servor·code will co-exist and they will all control one prop via DMX.
Make sense?
Let me know if this works; if it does I will blow out the servo stuff to eight channels for a DMX servo controller.
Post Edited (JonnyMac) : 10/10/2008 8:23:30 PM GMT
Do the servos work?
Stepper still has the same symptoms. I went back to the original code you posted noticed something else. When the If...then statements are in place the stepper spin at 1/2 the speed than if you remove the statements. I also altered the Step_Reverse value to 169 and 170 in both cases the motor just stopped.
As far as the servos when I hooked them up they turned all the way to the right and the application began to "stutter" and not function. When I unplugged the servo things went back to "normal."
There is something really bizarre with the stepper code and DMX, I'm not sure what it is?
Post Edited (DynamoBen) : 10/12/2008 11:48:21 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
www.sxmicro.com - a blog·exploring the SX micro
www.tdswieter.com
I wasn't as clear as I could have been with the servo problem. The stutter begins when I start transmitting DMX.
Post Edited (DynamoBen) : 10/13/2008 3:51:51 AM GMT