Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Relays Or Switches?

Hi All.

I'm trying to decide how to best activate a couple things on my robot build (full sized K-9 in my avatar).

I need to turn on a laser pointer. I'm thinking a pico switch would work.
http://www.dimensionengineering.com/products/picoswitch

Is there a more direct solution with the EZ B (I'll be upgrading to v4 soon)?

---

Also, I need to move a car antenna up and down. This particular antenna requires reversing the polarity to get it to move backwards. A switch that's mechanically activated by a servo arm for one direction and another switch for the other direction would definitely work and I'd just need to control the duration of the switch's activation to control how far the antenna extends.

https://www.servocity.com/html/spdt_miniature_snap-action_mic.html

Would a relay be any better? Reversing the polarity appears to be more challenging for my feeble brain-- the simpler the better :)!

https://www.servocity.com/html/electronic_pwm_controlled_dual.html
This one seems to be able to run things forward and backward, but I'm not sure how it'd work with the EZ B.

thanks in advance

Frank

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#1  
First you want to consider what voltages do these items need?

For laser pointers many of those run on 3 - 5 volts. I have a little laser on my robot now that I power directly from the EZ-B. The positive on the laser goes to the signal/data line on the EZ-B. The ground or negative goes to the ground. I don't need anything else. Then I use a digital on/off control in ARC to controller the laser.

Relays overall are, "ok". I personally would tend to think of relays as either a last resort (force myself to use what I have) or us them for switching higher voltage devices. To drive a (I assume) 12volt automotive antenna (?) I think you might want to consider an h-bridge. That would let you control the DC motor forward and reverse from the EZ-B.

Using a servo to control snap action switches is very doable. That's a popular setup for very big robots that relies on standard R/C controls. My advice would be steer clear of that solution for your robot. I believe you would find a h-bridge motor driver a better solution. This page shows how an h-bridge would work.

For the K9 robot, the antenna are the ears, correct? Why would you not want to spin those with a standard servo?
#2  
Honestly a darlington transistor or mosphet used to trip a relay is your best option. Using a servo to flip a physical switch is a bit of a waste of resources.
#3  
They have TTL controlled relays very cheap. No need for a transistor.
TTL Relay
Just use a digital port on the EZ-B. They will handle 120V at 10 A.
#4  
@bookmaker... EZB digital port can handle 120V at 10A? I must have read that wrong...
#5  
He linked a relay and board that already has the circuit i mentioned soldered together. The relay can turn 110v on and off , the ezb 4.8 v signal triggers the relay on.
#6  
Laser pointers will draw more than 20ma, so they cannot be driven directly off the ezb data pin... You will need a relay or a mosfet... I prefer a 5v low mAh relay that can be driven directly from the EZB data pin...
#8  
Nice find Justin... the ones I have draw about 90 mA....
#9  
Thanks, eveyone.

For the TTL relay (I think I have one of those somewhere), how do I go about making the polarity reverse (both software and hardware-wise) so that the antenna retracts? Also, how do you control the duration of the antenna activation, to make the antenna will extend to a certain length? (I'm really quite a noob, if you haven't noticed already. :))

Thanks for the link on the lasers, Justin. That'll keep things nice and simple.
The car antenna is what makes the "probe" go up and down (that's the red suction cup thing that's coming from below the eye area). The ears are separate-- they will spin via a simple hook up to a couple servos.

Frank
#10  
I guess a servo might work for deploying and retracting the antenna.... or even maybe a linear actuator?
#11  
For relay control you would need two of them. Often a single pole double throw relay is used for on off. A double pole double throw relay is used for direction.
#12  
If you're not going to use an H bridge a better solution might be to use a mini servo with two snaps switches like you mentioned before.
#13  
I will be powering my EZ B at 6 volts (for my particular servos). Will it be ok to run those 5 volt lasers at the 6 volts, or will I need to reduce the voltage?

thanks,

Frank
#14  
You'll have to try one and see if it will last for more than a few minutes. Some of the better built laser pointers may work quite well.