United Kingdom
Asked — Edited
Resolved Resolved by Rich!

Switch Activated L.E.D

Hi all, I have been thinking about a way to add a led to the "Attck" script on K9. Now I believe I have an answer, but just wanted to sound it out.

I k9's head, the "laser" was on a slide style mechanism that had a switch on each end that turned the polarity of the attached motor, that returned the slide back to the start position. My thinking was if I attached a led and a resistor to this switch and used a servo to move the laser as the slide hit the switch it would turn the led on.?

The only sticking point, is which port to add it to and how to turn it on as I just need power

Thanks again for reading

:-)


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#1  

No need for switches to turn on LEDs, they can be powered directly from the signal pin of the EZ-B. Simple digital controls or script commands can turn them on and off.

If you find the led draws more current than the signal pin can provide you can use a TIP122 based circuit to switch the LED(s) using the signal pin and the same commands/controls above.

United Kingdom
#2  

HI @Rich,

my first thought was your TIP switch as i have built one for a previous project (the flashing light strip, if you remember). but my thought process was one of, if the servo was programmed to move the slider past the mechanical switch then it made sense to utalise this to turn the LED on without any clever programming - however it might extend my little knowledge of programming if i did it that way.

From your perspective, which would be the best/simplistic way?

#3  

I bought a whole bunch of low power LEDS off of ebay... Those are the ones that @Rich suggested that can run off of the ezb's signal pin... I think the ones I got draw maybe 20ma or so and their voltage range is between 5V and 12V....

United Kingdom
#4  

Hi @Richard R,

whats your preference if given the choice, mechanical or programmable. to be fair i think i have just answered my own question... as your a programmer Doh...

#5  

Definitely programmable... I subscribe to the KISS principal.... Rich is a programmer, "I give it a go" as you Brits like to say...:) I actually consider myself better at engineering than programming, although to be fair I just consider myself above average at both...