Extending gShield leds

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.

2 Likes

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.

[Oops! Edited to correct math error 11/20/2015]

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.

1 Like

Ok, so the motors can potentially draw 24V on each wire.

Btw, is there a slight error in your calculation?
I’m getting 1035ohms on 3.3V, 20mA. See picture.

If i run the LEDs on 10mA, I can use 2K ohms on them. They will look a little bit dim on low power, but there will be light.

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.

1 Like

I will do some more testing. Maybe 1.5K ohm will be ok.

Nice calculator page :smile:

Sorry can’t help u with the op-amp. I don’t have a clue :flushed:

The power available to the stepper motors is so overwhelming you don’t have to worry about the current syphoned off for an LED.

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”.

Lol

Be a nice “flashy” addition to a control box.

Happy X-Carving!!!

1 Like

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.

Happy X-Carving

Try this: http://www.expresspcb.com/free-cad-software/

Thanks Larry,
Guess I should have mentioned that I am a Mac Man. I no longer even own a PC.

Are there options such as this for Mac users?

Not sure. I left Apple behind when they went to a closed architecture with the MacIntosh. :smile:

:wink::+1: