Shop OBEX P1 Docs P2 Docs Learn Events
Controlling the Opto22 Module Rack and Modules..how!? — Parallax Forums

Controlling the Opto22 Module Rack and Modules..how!?

ArchiverArchiver Posts: 46,084
edited 2004-03-05 20:26 in General Discussion
how can i use a basic stamp (2 series i do believe) to get
information from the inputs modules and send information to the
output modules.

what im trying to do is detect the voltage created by an ac
generator, then switch off the power coming from a battery, and have
the power from the generator routed to power what the battery was
powering until it got switched off.

i don't need code written. wut i would need to know is if the opto22
modules can achieve this, and what commands i could use to
send/recieve information from the opto22 module rack when connected
with the control interface board.

thank you for any help.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-02 01:02
    I use the Opto-22 G4 Modules with all Stamp Models.
    The Opto-22 modules have a logic side and a Load/Input side for the real
    world.

    The Input modules have a Logic + Output and Logic Ground.
    Logic + goes to +5 volts
    Logic Ground goes to the 5 volt common
    Output connects to the stamp Pin. When there is voltage on the input side,
    the output goes low, and drags the Stamp Pin low. you read the pin as Low = On

    The Output Modules have a Logic + and Logic Control
    Logic + to +5
    Logic Control to a Stamp Output pin. When the stamp pin goes low the Output
    turns on.
    You need a 100k pull-up resistor from the Stamp Pins to +5.
    If you use the Opto G4 mounting board the pull-up resistors are already there.
    You must be careful of the 8 pin limit on the Stamp. Too many Outputs on at
    once can exceed the limit. Check the Stamp Manual for the type of stamp you are
    using. The Opto-22 Output modules draw about 13-15 MA when on. Try to mix the
    inputs with the outputs per 8 pin group to prevent overloading the Stamp.

    Hope you are not too confused.
    Alan Bradford
    Plasma Technologies

    In a message dated 3/1/2004 10:33:20 AM Eastern Standard Time,
    qaidskey@y... writes:
    how can i use a basic stamp (2 series i do believe) to get
    information from the inputs modules and send information to the
    output modules.

    what im trying to do is detect the voltage created by an ac
    generator, then switch off the power coming from a battery, and have
    the power from the generator routed to power what the battery was
    powering until it got switched off.

    i don't need code written. wut i would need to know is if the opto22
    modules can achieve this, and what commands i could use to
    send/recieve information from the opto22 module rack when connected
    with the control interface board.

    thank you for any help.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-02 20:17
    thanx very much. but i still got a few questions. can the input
    modules read how much voltage is flowing through them into a variable
    in the stamp? and if i got what u told me, turning the stamps pins
    low would turn either module on letting electricity flow through it?


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > I use the Opto-22 G4 Modules with all Stamp Models.
    > The Opto-22 modules have a logic side and a Load/Input side for the
    real
    > world.
    >
    > The Input modules have a Logic + Output and Logic Ground.
    > Logic + goes to +5 volts
    > Logic Ground goes to the 5 volt common
    > Output connects to the stamp Pin. When there is voltage on the
    input side,
    > the output goes low, and drags the Stamp Pin low. you read the pin
    as Low = On
    >
    > The Output Modules have a Logic + and Logic Control
    > Logic + to +5
    > Logic Control to a Stamp Output pin. When the stamp pin goes low
    the Output
    > turns on.
    > You need a 100k pull-up resistor from the Stamp Pins to +5.
    > If you use the Opto G4 mounting board the pull-up resistors are
    already there.
    > You must be careful of the 8 pin limit on the Stamp. Too many
    Outputs on at
    > once can exceed the limit. Check the Stamp Manual for the type of
    stamp you are
    > using. The Opto-22 Output modules draw about 13-15 MA when on. Try
    to mix the
    > inputs with the outputs per 8 pin group to prevent overloading the
    Stamp.
    >
    > Hope you are not too confused.
    > Alan Bradford
    > Plasma Technologies
    >
    > In a message dated 3/1/2004 10:33:20 AM Eastern Standard Time,
    > qaidskey@y... writes:
    > how can i use a basic stamp (2 series i do believe) to get
    > information from the inputs modules and send information to the
    > output modules.
    >
    > what im trying to do is detect the voltage created by an ac
    > generator, then switch off the power coming from a battery, and
    have
    > the power from the generator routed to power what the battery was
    > powering until it got switched off.
    >
    > i don't need code written. wut i would need to know is if the
    opto22
    > modules can achieve this, and what commands i could use to
    > send/recieve information from the opto22 module rack when connected
    > with the control interface board.
    >
    > thank you for any help.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-02 23:43
    The Stamp side of the Opto modules is a digital 1 bit signal On or Off (Low
    or High) you cannot read an analog signal.
    On the output modules when the stamp pin goes low, the module turns on. It is
    Optically isolated so no current flows from the stamp to the load on the
    output of the module. Think of it as a switch. When the pin goes low the switch
    turns on.

    The input modules work the same way, but in reverse. When the voltage is
    present at the input of the module, it turns on a switch that grounds the stamp
    pin. Low = On. They are also optically isolated. No current flows from the load
    to the stamp pin.
    Opto 22 is a trade name for their Optically isolated solid state relays.

    Alan Bradford
    Plasma Technologies

    In a message dated 3/2/2004 5:10:46 PM Eastern Standard Time,
    qaidskey@y... writes:
    thanx very much. but i still got a few questions. can the input
    modules read how much voltage is flowing through them into a variable
    in the stamp? and if i got what u told me, turning the stamps pins
    low would turn either module on letting electricity flow through it?


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > I use the Opto-22 G4 Modules with all Stamp Models.
    > The Opto-22 modules have a logic side and a Load/Input side for the
    real
    > world.
    >
    > The Input modules have a Logic + Output and Logic Ground.
    > Logic + goes to +5 volts
    > Logic Ground goes to the 5 volt common
    > Output connects to the stamp Pin. When there is voltage on the
    input side,
    > the output goes low, and drags the Stamp Pin low. you read the pin
    as Low = On
    >
    > The Output Modules have a Logic + and Logic Control
    > Logic + to +5
    > Logic Control to a Stamp Output pin. When the stamp pin goes low
    the Output
    > turns on.
    > You need a 100k pull-up resistor from the Stamp Pins to +5.
    > If you use the Opto G4 mounting board the pull-up resistors are
    already there.
    > You must be careful of the 8 pin limit on the Stamp. Too many
    Outputs on at
    > once can exceed the limit. Check the Stamp Manual for the type of
    stamp you are
    > using. The Opto-22 Output modules draw about 13-15 MA when on. Try
    to mix the
    > inputs with the outputs per 8 pin group to prevent overloading the
    Stamp.
    >
    > Hope you are not too confused.
    > Alan Bradford
    > Plasma Technologies
    >


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-03 01:53
    aaaaah...i think im gettin it. so if i had an output module, and an
    inpute module (we'll say 12v-32v) hooked up in series. if i had the
    output "on" and electricity began to flow at about 12v so that the
    input turned "on" and forced a pin low, i could then find out if the
    pin was low and in turn switch the output off (if i wanted to) to
    switch off the input and the output and then do w/e i wanted really.

    thanx again!





    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > The Stamp side of the Opto modules is a digital 1 bit signal On or
    Off (Low
    > or High) you cannot read an analog signal.
    > On the output modules when the stamp pin goes low, the module turns
    on. It is
    > Optically isolated so no current flows from the stamp to the load
    on the
    > output of the module. Think of it as a switch. When the pin goes
    low the switch
    > turns on.
    >
    > The input modules work the same way, but in reverse. When the
    voltage is
    > present at the input of the module, it turns on a switch that
    grounds the stamp
    > pin. Low = On. They are also optically isolated. No current flows
    from the load
    > to the stamp pin.
    > Opto 22 is a trade name for their Optically isolated solid state
    relays.
    >
    > Alan Bradford
    > Plasma Technologies
    >
    > In a message dated 3/2/2004 5:10:46 PM Eastern Standard Time,
    > qaidskey@y... writes:
    > thanx very much. but i still got a few questions. can the input
    > modules read how much voltage is flowing through them into a
    variable
    > in the stamp? and if i got what u told me, turning the stamps pins
    > low would turn either module on letting electricity flow through it?
    >
    >
    > --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > > I use the Opto-22 G4 Modules with all Stamp Models.
    > > The Opto-22 modules have a logic side and a Load/Input side for
    the
    > real
    > > world.
    > >
    > > The Input modules have a Logic + Output and Logic Ground.
    > > Logic + goes to +5 volts
    > > Logic Ground goes to the 5 volt common
    > > Output connects to the stamp Pin. When there is voltage on the
    > input side,
    > > the output goes low, and drags the Stamp Pin low. you read the
    pin
    > as Low = On
    > >
    > > The Output Modules have a Logic + and Logic Control
    > > Logic + to +5
    > > Logic Control to a Stamp Output pin. When the stamp pin goes low
    > the Output
    > > turns on.
    > > You need a 100k pull-up resistor from the Stamp Pins to +5.
    > > If you use the Opto G4 mounting board the pull-up resistors are
    > already there.
    > > You must be careful of the 8 pin limit on the Stamp. Too many
    > Outputs on at
    > > once can exceed the limit. Check the Stamp Manual for the type of
    > stamp you are
    > > using. The Opto-22 Output modules draw about 13-15 MA when on.
    Try
    > to mix the
    > > inputs with the outputs per 8 pin group to prevent overloading
    the
    > Stamp.
    > >
    > > Hope you are not too confused.
    > > Alan Bradford
    > > Plasma Technologies
    > >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-03 12:49
    Well, I guess Im lost now! If you turn on an output pin, you do not have to
    read it to see if it is on. The software should keep track of it for you.
    Think of the Opto modules as level shifters for the pins. They shift the
    level of the input to a safe 0-5 volts for the inputs and shift the 0-5 volt
    output to a level your load needs. It is no more complicated than that.
    If you need to verify an output is on, for a fail safe condition, then you
    can use another input module and Input on the Stamp to read the load.

    Alan Bradford
    Plasma Technologies


    In a message dated 3/2/2004 10:33:40 PM Eastern Standard Time,
    qaidskey@y... writes:
    aaaaah...i think im gettin it. so if i had an output module, and an
    inpute module (we'll say 12v-32v) hooked up in series. if i had the
    output "on" and electricity began to flow at about 12v so that the
    input turned "on" and forced a pin low, i could then find out if the
    pin was low and in turn switch the output off (if i wanted to) to
    switch off the input and the output and then do w/e i wanted really.

    thanx again!





    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > The Stamp side of the Opto modules is a digital 1 bit signal On or
    Off (Low
    > or High) you cannot read an analog signal.
    > On the output modules when the stamp pin goes low, the module turns
    on. It is
    > Optically isolated so no current flows from the stamp to the load
    on the
    > output of the module. Think of it as a switch. When the pin goes
    low the switch
    > turns on.
    >
    > The input modules work the same way, but in reverse. When the
    voltage is
    > present at the input of the module, it turns on a switch that
    grounds the stamp
    > pin. Low = On. They are also optically isolated. No current flows
    from the load
    > to the stamp pin.
    > Opto 22 is a trade name for their Optically isolated solid state
    relays.
    >
    > Alan Bradford
    > Plasma Technologies
    >


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-03 13:00
    HI,
    Getting back to your original posting:
    I would just use a power relay that had its coil connected to the generator.
    When the generator is running, the coil is energized and the power is routed
    from the generator. When the generator is off the relay de-energizes and using
    the normally closed contacts rout the power from the batteries. This is the
    simple way to do it.
    If you want to use a stamp as a relay control, then have one pin set up as an
    input and monitor the generator output voltage and when it reaches a certain
    level, switch the relay.
    An Opto-22 type input module had a range of input voltages so select the
    right one for your application.
    The power relay is driven by an output pin through an Opto-22 Output module.
    A more complicated way to do the same thing as a single relay.

    Hope this clears things up,
    Alan Bradford
    Plasma Technologies

    In a message dated 3/1/2004 10:33:20 AM Eastern Standard Time,
    qaidskey@y... writes:
    how can i use a basic stamp (2 series i do believe) to get
    information from the inputs modules and send information to the
    output modules.

    what im trying to do is detect the voltage created by an ac
    generator, then switch off the power coming from a battery, and have
    the power from the generator routed to power what the battery was
    powering until it got switched off.

    i don't need code written. wut i would need to know is if the opto22
    modules can achieve this, and what commands i could use to
    send/recieve information from the opto22 module rack when connected
    with the control interface board.

    thank you for any help.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-03 21:39
    yeah im lost too, i really dont get what u just said. but what i
    meant was that the output modules are like switches at high power
    right? and the input modules are like "auto-switches" in the way that
    if electricyt flows through them it automatically switches on and
    puts the pin from the stamp, low, right?


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > Well, I guess Im lost now! If you turn on an output pin, you do
    not have to
    > read it to see if it is on. The software should keep track of it
    for you.
    > Think of the Opto modules as level shifters for the pins. They
    shift the
    > level of the input to a safe 0-5 volts for the inputs and shift the
    0-5 volt
    > output to a level your load needs. It is no more complicated than
    that.
    > If you need to verify an output is on, for a fail safe condition,
    then you
    > can use another input module and Input on the Stamp to read the
    load.
    >
    > Alan Bradford
    > Plasma Technologies
    >
    >
    > In a message dated 3/2/2004 10:33:40 PM Eastern Standard Time,
    > qaidskey@y... writes:
    > aaaaah...i think im gettin it. so if i had an output module, and an
    > inpute module (we'll say 12v-32v) hooked up in series. if i had the
    > output "on" and electricity began to flow at about 12v so that the
    > input turned "on" and forced a pin low, i could then find out if
    the
    > pin was low and in turn switch the output off (if i wanted to) to
    > switch off the input and the output and then do w/e i wanted
    really.
    >
    > thanx again!
    >
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > > The Stamp side of the Opto modules is a digital 1 bit signal On
    or
    > Off (Low
    > > or High) you cannot read an analog signal.
    > > On the output modules when the stamp pin goes low, the module
    turns
    > on. It is
    > > Optically isolated so no current flows from the stamp to the load
    > on the
    > > output of the module. Think of it as a switch. When the pin goes
    > low the switch
    > > turns on.
    > >
    > > The input modules work the same way, but in reverse. When the
    > voltage is
    > > present at the input of the module, it turns on a switch that
    > grounds the stamp
    > > pin. Low = On. They are also optically isolated. No current flows
    > from the load
    > > to the stamp pin.
    > > Opto 22 is a trade name for their Optically isolated solid state
    > relays.
    > >
    > > Alan Bradford
    > > Plasma Technologies
    > >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-04 00:29
    That is correct. The circuits are electrically isolated, but the signal
    passes through. It is just a way to get a 5 volt Stamp to talk to the real world
    of
    different voltages.
    Alan Bradford
    Plasma Technologies

    In a message dated 3/3/2004 5:01:19 PM Eastern Standard Time,
    qaidskey@y... writes:
    yeah im lost too, i really dont get what u just said. but what i
    meant was that the output modules are like switches at high power
    right? and the input modules are like "auto-switches" in the way that
    if electricyt flows through them it automatically switches on and
    puts the pin from the stamp, low, right?


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > Well, I guess Im lost now! If you turn on an output pin, you do
    not have to
    > read it to see if it is on. The software should keep track of it
    for you.
    > Think of the Opto modules as level shifters for the pins. They
    shift the
    > level of the input to a safe 0-5 volts for the inputs and shift the
    0-5 volt
    > output to a level your load needs. It is no more complicated than
    that.
    > If you need to verify an output is on, for a fail safe condition,
    then you
    > can use another input module and Input on the Stamp to read the
    load.
    >
    > Alan Bradford
    > Plasma Technologies


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-04 02:57
    how would i "monitor" the voltage? would i do this by using an input,
    whose starting voltage was about what i wanted it, and wait for it to
    drive the pin on the stamp low?


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > HI,
    > Getting back to your original posting:
    > I would just use a power relay that had its coil connected to the
    generator.
    > When the generator is running, the coil is energized and the power
    is routed
    > from the generator. When the generator is off the relay de-
    energizes and using
    > the normally closed contacts rout the power from the batteries.
    This is the
    > simple way to do it.
    > If you want to use a stamp as a relay control, then have one pin
    set up as an
    > input and monitor the generator output voltage and when it reaches
    a certain
    > level, switch the relay.
    > An Opto-22 type input module had a range of input voltages so
    select the
    > right one for your application.
    > The power relay is driven by an output pin through an Opto-22
    Output module.
    > A more complicated way to do the same thing as a single relay.
    >
    > Hope this clears things up,
    > Alan Bradford
    > Plasma Technologies
    >
    > In a message dated 3/1/2004 10:33:20 AM Eastern Standard Time,
    > qaidskey@y... writes:
    > how can i use a basic stamp (2 series i do believe) to get
    > information from the inputs modules and send information to the
    > output modules.
    >
    > what im trying to do is detect the voltage created by an ac
    > generator, then switch off the power coming from a battery, and
    have
    > the power from the generator routed to power what the battery was
    > powering until it got switched off.
    >
    > i don't need code written. wut i would need to know is if the
    opto22
    > modules can achieve this, and what commands i could use to
    > send/recieve information from the opto22 module rack when connected
    > with the control interface board.
    >
    > thank you for any help.
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-04 21:18
    ok! so say i had an input module that was 12-32 vdc hooked up in
    series with an output module that ran just about the same voltage,
    and used the code (we'll saying im using pin 6 for input, and pin 5
    for output)(btw, i dont know if this is the proper terms or not):

    Low 5
    Repeater:
    if 6 = off then goto repeater
    High 5

    ...so then this would hypothetically mean that the output is turned
    on and letting voltage goto the input, and when the input is turned
    on (which would be when it reaches 12vdc, in this case) it will then
    goto the "High 5" line and switch the input off and then in turn
    switch the input off...right?
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-05 10:52
    Yes, that is how it should work.
    You need to change the If/Then Statement (Unless you had a variable called
    'off' and set its value to 0 (Zero)

    Low 5
    Repeater:
    if 6 = 0 then goto repeater
    High 5

    Alan Bradford
    Plasma Technologies

    In a message dated 3/4/2004 5:50:13 PM Eastern Standard Time,
    qaidskey@y... writes:
    ok! so say i had an input module that was 12-32 vdc hooked up in
    series with an output module that ran just about the same voltage,
    and used the code (we'll saying im using pin 6 for input, and pin 5
    for output)(btw, i dont know if this is the proper terms or not):

    Low 5
    Repeater:
    if 6 = off then goto repeater
    High 5

    ...so then this would hypothetically mean that the output is turned
    on and letting voltage goto the input, and when the input is turned
    on (which would be when it reaches 12vdc, in this case) it will then
    goto the "High 5" line and switch the input off and then in turn
    switch the input off...right?


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-05 20:26
    ok. thanx a lot for all your help!


    --- In basicstamps@yahoogroups.com, plasmastamp@a... wrote:
    > Yes, that is how it should work.
    > You need to change the If/Then Statement (Unless you had a variable
    called
    > 'off' and set its value to 0 (Zero)
    >
    > Low 5
    > Repeater:
    > if 6 = 0 then goto repeater
    > High 5
    >
    > Alan Bradford
    > Plasma Technologies
    >
    > In a message dated 3/4/2004 5:50:13 PM Eastern Standard Time,
    > qaidskey@y... writes:
    > ok! so say i had an input module that was 12-32 vdc hooked up in
    > series with an output module that ran just about the same voltage,
    > and used the code (we'll saying im using pin 6 for input, and pin 5
    > for output)(btw, i dont know if this is the proper terms or not):
    >
    > Low 5
    > Repeater:
    > if 6 = off then goto repeater
    > High 5
    >
    > ...so then this would hypothetically mean that the output is turned
    > on and letting voltage goto the input, and when the input is turned
    > on (which would be when it reaches 12vdc, in this case) it will
    then
    > goto the "High 5" line and switch the input off and then in turn
    > switch the input off...right?
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.