Shop OBEX P1 Docs P2 Docs Learn Events
I need help to connect 2 relay module to BS2sx — Parallax Forums

I need help to connect 2 relay module to BS2sx

XavierXavier Posts: 26
edited 2014-07-09 09:49 in BASIC Stamp
Hi,
I just got this 2 relay module and I want some help to connect it to BS2sx, I'm not an electrician and I have no idea about electricity, so I did't want to connect it with out some help. And It has a jumper and I don't know what it is for, so if someone who could possibly explain it. Please some help.

http://www.sainsmart.com/arduino-pro-mini.html

Thanks. :smile: :thumb:

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-05-13 14:06
    The schematic has some major issues. I would say the lack of documentation and a faulty schematic may mean having to do a little imperical testing.
  • XavierXavier Posts: 26
    edited 2013-05-14 06:56
    Hi,

    I have found this, I hope it could help cause I don't understand much of this.

    http://yourduino.com/sunshop2/index.php?l=product_detail&p=218

    Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-14 07:14
    It looks like VCC and JD-VCC would be connected to +5V and GND would be connected to Gnd (Vss). IN1 and IN2 would be connected to the Stamp I/O pins of your choice. This device uses optoisolators which look like an LED to the microcontroller and the examples in the "What's a Microcontroller?" tutorial would work. Keep in mind that the resistor shown in the tutorial already is provided in your module and the LED will turn on when the I/O pin is made LOW.

    I don't see a jumper. If you're referring to the 3-pin header, that's for JD-VCC (and VCC and GND).
  • XavierXavier Posts: 26
    edited 2013-05-14 07:47
    Mike Green wrote: »
    It looks like VCC and JD-VCC would be connected to +5V and GND would be connected to Gnd (Vss). IN1 and IN2 would be connected to the Stamp I/O pins of your choice. This device uses optoisolators which look like an LED to the microcontroller and the examples in the "What's a Microcontroller?" tutorial would work. Keep in mind that the resistor shown in the tutorial already is provided in your module and the LED will turn on when the I/O pin is made LOW.

    I don't see a jumper. If you're referring to the 3-pin header, that's for JD-VCC (and VCC and GND).

    Hi,

    Yes the 3-pin header (JD-VCC, VCC and GND) and the jumper is in JD-VCC AND VCC, so do you mean that I have to remove the jumper in JD-VCC AND VCC and connect both to VDD and GND to VSS of the 3-pin header and IN1/IN2 to I/O or do I connect the VCC and GND from the 4-pin header (GND,IN1,IN2 and VCC) to the BS2sx.

    And I have some questions,
    What is the difference between VCC and GND in the 3-pin and 4-pin header?
    What is the JD-VCC?
    And What is the jumper for?

    I would like to know in order to share the information about this with others who have the same problems.

    Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-14 08:45
    Presumably, there's a jumper there to connect JD-VCC to VCC so you can have a single connection (from VCC) to +5V. Depending on the relays used, JD-VCC and VCC could be different supply voltages. That's probably why there's a separate header connection for each. JD-VCC powers the output side of the optoisolator, the switching transistor, and the relay coil. VCC just powers the input side of the optoisolator.

    I'm assuming that all the places marked VCC are connected together and that all the places marked GND are connected together. That's the convention.
  • XavierXavier Posts: 26
    edited 2013-05-14 09:09
    Thanks Mike,

    So if all VCC and GND are connected together I could leave the Jumper there and connect the VCC next to the IN-PIN TO VDD and GND (in the 3-pin header) to VSS or do you recommend that I take off the jumper and connect both JD-VCC and VCC (3-pin header) to VDD?
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-14 09:17
    It all depends on how you have the BS2sx set up. How are you powering it? Are you using an existing board, like the Super Carrier or the Board of Education?

    VCC needs to be connected to a source of +5V with enough current capacity to handle the requirements of the relays plus a little more (10s of mA). GND needs to be connected to the common ground (of everything digital). If you leave the jumper between JD-VCC and VCC on the 3-pin header, you can otherwise ignore the 3-pin header and just use the 4-pin header for VCC, GND, and the two INx connections.
  • XavierXavier Posts: 26
    edited 2013-05-14 09:33
    I'm using a Basic Stamp2sx home board and powering it with a rechargeable vrla battery +6V:

    http://www.rambal.com/descargas/libros/Manual-de-uso-Placa-SX-1.pdf

    a
    nd for example I want to control 2 lamps so I would need the IN1 FOR 1 lamp and IN2 for the other.

    And how can I give it a plus (10s of mA) to the current capacity (+5V) for the relays requirements?
  • PublisonPublison Posts: 12,366
    edited 2013-05-14 10:07
    Xavier wrote: »
    I'm using a Basic Stamp2sx home board and powering it with a rechargeable vrla battery +6V:

    http://www.rambal.com/descargas/libros/Manual-de-uso-Placa-SX-1.pdf

    a
    nd for example I want to control 2 lamps so I would need the IN1 FOR 1 lamp and IN2 for the other.

    And how can I give it a plus (10s of mA) to the current capacity (+5V) for the relays requirements?

    Based on the link that you gave, (and my Spanish is rusty), you can use VDD in the upper left on the board for your 5 volt supply to the relay. The header marked VSS is the ground connection.

    From what I see in the PDF, the regulator is a standard 7805, 5 volt regulator. It is capable of supplying 1.5 AMPs @ 5 volts, (varies a little between manufactures).

    This regulator normally wants to see at least 7 volts on the input to give a good supply of 5 volt to the board. I would add another battery in series to the input, (12 volts), to provide enough voltage. The regulator will handle up to around 25 volts. At 12 volt input, the regulator might get a little warm.

    The battery might be 6 volts with a fresh charge, but after it drops below that, the circuit will be inoperable, as the regulator can not supply the correct voltage to the board and relays.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-14 10:17
    As Publison said, you can use the Vdd pin header for +5V and the Vss pin header for Gnd. A 6V battery is too low a voltage for the 7805 regulator to ensure properly regulated +5V. You need at least 7V. The 7805 has more than enough capacity for this task. You could use a 12V battery (2 +6V batteries in series) or replace the 7805 with a similar "low dropout" regulator that would work at +6V.
  • XavierXavier Posts: 26
    edited 2013-05-14 10:43
    Thanks,

    I will try to get another +6V battery or a +12V battery before trying it, I'll try with the jumper.

    A question if I take out the jumper the JD-VCC must be +5V or it can be another? Why?

    Thanks for the help.:thumb::thumb:
  • PublisonPublison Posts: 12,366
    edited 2013-05-14 10:57
    Xavier wrote: »
    Thanks,

    I will try to get another +6V battery or a +12V battery before trying it, I'll try with the jumper.

    A question if I take out the jumper the JD-VCC must be +5V or it can be another? Why?

    Thanks for the help.:thumb::thumb:

    Try and understand the quote from the PDF you supplied:
    NOTES: If you want complete optical isolation, connect "Vcc" to Arduino +5 volts but do NOT connect Arduino Ground. Remove the Vcc to JD-Vcc jumper. Connect a separate +5 supply to "JD-Vcc" and board Gnd. This will supply power to the transistor drivers and relay coils.
    If relay isolation is enough for your application, connect Arduino +5 and Gnd, and leave Vcc to JD-Vcc jumper in place.

    Since this is not a Parallax product, you may have to contact the manufacturer for a better description.
  • ppillardppillard Posts: 22
    edited 2014-07-09 09:49
    Xavier, did you ever get this arduino relay working for your project?
Sign In or Register to comment.