Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited
Resolved Resolved by Troy!

How To Flick A Switch

I have a feeling this is going to be another silly question for the ez-gurus to snigger to them selves at, but i'd like to know if there is a device that can be used as a switch. In my case to turn a light on and off using the EZ-B. I played with the idea of using a servo as a switch but I am not really convinced this is the best way to go.


Upgrade to ARC Pro

Get access to the latest features and updates with ARC Pro edition. You'll have everything that's needed to unleash your robot's potential!

No there is no such thing as a silly question on this forum, we are all here so we can ask questions and if we can help others also.
If you want to switch a mains ( ac )circuit I would suggest using a relay with an opto isolator,that will allow you to control it with a digital output from EZB
You can purchase these as a complete unit.
United Kingdom
Thank you for saying that. I always worry that some one is going to think I'm daft. Some forums people can be quite insulting and im still not used to the helpful freindlyness here.

Digital relay, I'm sure I've seen one of those recently
Please be carefull if you are switching ac mains voltage as it should be encased in a housing for safety.

this is a possibility
User-inserted image

remember you may be asking a question that could assist others

If you are not familiar with making connections to a mains circuit I suggest you use a dc adaptor and say a 12v dc bulb to experiment with.
United Kingdom
My plan is to basically connect a light to a battery. It isn't going mains powered. Although, I am also building an automatic docking station that is to power up when the robot gets to it so that is very useful for this.
I agree with Bravia. All questions are helpful. Even if we don't know the answer right away, you will have several people looking it up for you. Searching the forums may also yield an answer because it may have come up before.
Here is another possibility like Bravia's but is solid state relay and rated for 2 amps. (always watch the volts and amps)

User-inserted image

Another EBAY
User-inserted image

EDIT: I now see you're wanting it for DC. There are a few options in the forums to hand make them using TIP 120 transistors or MOSFETs. I will find premade ones and post below soon.

Single channel MOSFET
User-inserted image

4 channel MOSFET
User-inserted image

As I've said before you can always make them (i.e. TIP120 circuit) from designs posted in the forum by Rich and Josh.
@Bravia definitely has some good advice here, figured I'd add a bit to it.

@Jaychadw what you might be looking for is a Solid State Relay (SSR) which has all the benefits of a mechanical relay but without the noise (electrically and audibly). They seem to be getting pretty cheap in price on ebay.

EDIT: Sorry @Tony beat me to it:)
United Kingdom
@Troy and @Bravia Excellent advise I really appreciate you guys putting the time in to help me with this. I know what you mean, everyone here has helped me with my understanding with everything in such a supportive manner.

I am very low on funds so building my own may be a good idea. Finding it hard enough to spare funds for servo's and sensors. That being said a prebuilt one would be far more suited to what I require. By nature I am a coder, including AI and CV, so making the leap to full robotics was only right and has been amazing but i'm still very unsure about making my own circuits. I'm ok soldering a load of pre made parts together in the right(ish) way to get results but beyond that I get a little *stress*

@Troy and @Bravia i'm certainly going to be looking into SSR's. Within a couple of hours I have a greater understanding of this. When I've raised my equipment and REALLY get going with what I'm doing, I can't wait to show you all. As in essence you've helped me create it :P
I would rather go with the MOSFET circuit because there is less of a voltage drop between the collector and emitter which is more heat dissapation and slightly less power to the load. TIPs work fine but if I had a choice I'd go MOSFET.

Here is Rich's tutorial on TIP and MOSFET circuit building.
United Kingdom
I can't believe the TIP/Mosfet wasn't mentioned until post #9. Obviously, depending on the load, the TIP may be perfect, if not then it can be adapted to switch a relay if you can't find/don't want to use a pre-made board.

@jaychadw - You'll get used to this forum being totally different to pretty much all others in that everyone will help and nobody has an attitude or makes you feel stupid. Ask and you'll find someone will answer pretty much anything without judgement:)
Sorry Rich, I was going along the pre-made options first.
I realize I am late in this conversation but I will chime in. I used tip Darlington switching transistors to trigger standard automotive relays. I did this because I wanted to know what the components were capable of and I could use adequate equipment. On my fishtank controller I currently have 5 tips wired to trip relays that feed 110v household power to things like lights , pumps ect. I could have used premade ones and spent more money but most the premade units are not intended for AC 110v use. So I'm happy with what I have and wouldn't have done it differently the second time. I would only suggest a smaller case than I used:)
United Kingdom
wow guys, that's a lot of info. You guys are awsome

@Rich i'm getting there. Although I think i'm left permanantly scarred from some of the forums I've been on. You can wait days for a response only to be treated like an ass.

I haven't made a definite decision about which way i'm going to go with this, i'll be checking out that tutorial ( thanks @Troy and @Rich ) and look into those others like TIP/Mosfet
@Jaychad , awesome! Looks like your question is definitely answered. Could you mark the thread answered and give one of the members credit for helping out ? :) Thanks in advance! - Josh