We use cookies to personalize content, interact with our analytics companies, advertising networks and cooperatives, and demographic companies, provide social media features, and to analyze our traffic. Our social media, advertising and analytics partners may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services. Learn more.
Is it possible to connect leds to the gShield that will light together or instead of the built in leds? I’m working on my own X-controller box and it would have been cool to have some leds showing operation outside the box.
EDIT:
The leds are marked D1-D4. On the edge of the controller there are pin holes also marked D1-D4. Could those be connections for leds?
The green LEDs on the gShield are just hooked up in parallel with one of the motor windings.
If you wanted to have external LEDs you could just hook them up using the same method. You would hook an LED up in series with a current limit resistor between either pair of stepper motor wires (black/green or white/red).
Direction doesn’t matter as the voltage changes polarity regularly. The gShield uses 2.7 Kohm resistor which at 24 volts yields a current of approximately 9 mA.
You would need to check your LED characteristics to make sure you don’t exceed its maximum values for voltage and current.
I think the gshield has the LED cathode connected to black (if you followed the assembly instructions) and the anode connected (through a resistor) to green.
I’ve done some testing.
Used one green led from my Arduino Uno kit and a 2.2Kohm resistor.
Connected to ground and any of the four stepper motor wires and got light.
Didn’t get anything from the D holes on the controller.
What will the average voltage on the steppermotor wires be over time. I read about 4-5V on each wire connection when motors not running. Measured between motorwire and -24VDC.
I’m trying to calculate the best resistor to use for my leds. Green 3.3V 20mA leds.
You need to design your LEDs to work in the worst case.
24 volts - 3.3 volts = 20.7 volts you need to drop.
20.7 volts / 20 mA = 1035 ohms. Closest standard resistor value = 1100 ohms at 5% tolerance that’s 1100 +/- 55 ohms gives a range of 1045 to 1155 ohms.
P = voltage x current = 20.7 x 0.020 = 0.414 watts. Use next standard value = 1 watt.
Personally, I wouldn’t drive the LEDs that hard. I would plan on about 10 mA.
Yep, math error, shouldn’t do math late at night. Corrected the original.
It won’t hurt to drive them at 20mA if you need the brightness. I usually cut back some. I have a lot of equipment that can light up the room the LEDs are so bright.
The power supply for the motors is 24 volts. That’s what appears on the leads to the motors.
Since the motor voltage is turned on and off rapidly (and reversed at times) you will see a dimming effect much like the dimmer works on a house light.
Is it possible to add two LEDs to one stepper motor?
It would be neat to have a control panel that has six LEDs. Two for each axis. One that lights up with + moves on that axis and another that lights of for - movements on that axis.
Not just “Bells and whistles” any more. Now it is “Bells, Whistles, & LEDs”.
Yes. You would wire one up between the black and green wire with one polarity and then wire one up between the green and black with the other polarity. Similar arrangement for the white/red.
Great! Thank you! Guess I’m off to get some LEDs to install in my control box. Might drop you a line if I have any questions.
Is there a program that makes it easy to draw up wiring diagrams? I am a complete newbie to virtual drawing and could use some advice. It would be very nice to be able to draw up my wiring diagrams for my control box.