Shop OBEX P1 Docs P2 Docs Learn Events
A little help on wiring a relay switch — Parallax Forums

A little help on wiring a relay switch

charleyshfcharleyshf Posts: 165
edited 2010-09-10 13:33 in Propeller 1
Hello,

I've been searching through the forums and really didn't see a possible answer for a question I have. I am trying to figure out how to wire a battle switch from Dimension Engineering to my propeller, the specs are:

Max relay voltage: 240VAC
Max relay current: 10A @ 28VDC, 12A @ 120VAC, 10A @ 240VAC.
Relay resistance: 100 mΩ max
3.5V to 5.5V operating voltage (on servo pigtail)
30mA typical draw from receiver

Specifically I am not sure if I should be using a 4.7k or 10k resistor when hooking the signal wire up to my Propeller.

My robot has a spearate power supply for the motor controller/motors and I would like to be able to shut this off when the robot is doing other things.

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-10 11:32
    You're asking the wrong question ... not about 4.7K vs. 10K resistors, but about how to activate the relay and what it needs.

    There are two numbers you've given that might have to do with activating the relay, the operating voltage (3.5V to 5.5V) and the typical draw from the receiver (30mA). Nowhere do you indicate how this relay works. Most typical relays have a coil and, when current is sent through the coil, an armature is pulled in which makes contact with a fixed contact and that's how a large current is controlled by a smaller one. Your info talks about a servo pigtail and a receiver and that doesn't make sense unless you're talking about a servo motor that mechanically throws a switch.

    How about a link to a datasheet on this switch?
  • Dr. MarioDr. Mario Posts: 331
    edited 2010-09-10 11:38
    Here's a simple solution: Either use photoMOSFET relay switch or use some wonderful relay switch drivers from SGS-Thomson (STMicroelectronics). Simple bipolar transistors will even work fine with that.

    On a side notice: Propeller's CMOS voltage differental driver (TTL to ECL logics already on-die) is good for up to 30mA and relay switch's coil usually consume lot of juices so it's not a good idea to directly drive it. I have driven a high voltage transformer via the transistor, with its base tied to Propeller chip, and it worked, so it oughta work with the relay switch.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2010-09-10 11:45
    You need to give us a few more details. First, is this just a relay that you are trying to drive or an R/C controlled relay module?? The "Battle Switch" and "Servo Pigtail" makes me think it is an R/C controlled relay that many of the BattleBot robots used. In that case driving it should be easy. Connect +5v and ground to power the switch part and then use a 1K ohm resistor on the signal lead. From there use one of the SERVO objects to send out the servo style signals. Those switches usually have a small PIC (or Atmel chip) on board that watches for SERVO pulses and then can engage the relay when called for.

    Now, if it is just a relay then you need to let us know the specs on the coil (voltage, etc) and with that we can give you some options for driving it. I usually prefer adding an opto-isolator (something like a 4n26) to protect the Propeller chip.

    Robert
  • charleyshfcharleyshf Posts: 165
    edited 2010-09-10 11:51
    Thank you for the quick responces! The link for the switch is:

    http://www.dimensionengineering.com/BattleSwitch.htm

    This is a R/C controlled relay switch that you can use from an R/C setup, and I assumed that I could use this with the propeller with a resistor

    Thanks again!!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-10 12:44
    Unfortunately, Dimension Engineering's information doesn't give much more useful information. It sounds like it ought to work with a Propeller. You'll need to supply +5V through the servo "pigtail" plug and you'll need at least a 2.2K resistor in series with the Propeller I/O pin to protect it from noise and a possible 5V potential. Any of the servo driver objects should work and you could also write simpler code to just provide one of two pulse widths (1ms and 2ms repeated every 20ms) to toggle the switch.
  • charleyshfcharleyshf Posts: 165
    edited 2010-09-10 13:23
    Mike Green wrote: »
    Unfortunately, Dimension Engineering's information doesn't give much more useful information. It sounds like it ought to work with a Propeller. You'll need to supply +5V through the servo "pigtail" plug and you'll need at least a 2.2K resistor in series with the Propeller I/O pin to protect it from noise and a possible 5V potential. Any of the servo driver objects should work and you could also write simpler code to just provide one of two pulse widths (1ms and 2ms repeated every 20ms) to toggle the switch.

    Thank you so much!! I just got done wiring it up and it works perfectly!! Again thanks to everyone who responded, it's been just over a year since I was able to work on my robot, and things are starting to come back to me, just not as quicky as I would like them to...
  • Dr. MarioDr. Mario Posts: 331
    edited 2010-09-10 13:33
    Charleyshf, you're welcome.
Sign In or Register to comment.