Shop OBEX P1 Docs P2 Docs Learn Events
Measure external 24 presence without current flow? — Parallax Forums

Measure external 24 presence without current flow?

PDSAZPDSAZ Posts: 5
edited 2008-08-15 04:28 in BASIC Stamp
·Hi everyone,
I am still learning and getting up to speed and appreciate all the help here!

As you can tell I am a novice so thanks for your understanding.

I have·a 24V DC external circuit.· I need to see if there is 24 volts present on this circuit with out shorting pins 1 and 2?·

in the attached drawing if Q1 is open.· How would I measure the voltage without closing the circuit to pin 2?

Basically it is just to tell me that 24v is present so I can light up an LED with the stamp indicating voltage presence.

I have looked a at a couple of circuits but, am scared of doing the wrong thing and killing my stamp.

Any suggestions?

Thanks all!
640 x 340 - 12K

Comments

  • metron9metron9 Posts: 1,100
    edited 2008-08-15 00:52
    I don't understand your schematic. You have 24 volts positive terminal connected to the collector and the 24V ground to the emmiter and nothing connected to the Base of the transistor. You need a resistor to the base and a load between the positive terminal and the collector.

    Your·R2 should be about 750ohms with the 3K that gives you 4.8V at about 6mA so that will show a HIGH value on the stamp pin.


    So connecting your + side of your external circuit through the resistor divider is correct.

    If there is a chance the voltage can spike higher than 24V (motors are being driven, lighting strikes or static charge, you may wish to use a 4.8V zener or TVS diode from the stamp pin to ground as well and you have to make sure R2 is grounded and won't get disconnected (on a breadboard for example, oops) or you will have 24V going to your stamp pin!

    Remember the grounds of both stamp and the external device must be common. (connected together)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!

    Post Edited (metron9) : 8/15/2008 12:57:49 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-08-15 02:07
    ·PDSAZ

    What you have in Photo >>>·24V measure >>> ·will not work because when you put power to pin 1 and pin 2· pins 4 and you·will have a short which will burn up your Optic Sensors

    Here is all you need to do what you want to

    look at photo below

    Also look at this as well

    What’s a Microcontroller?

    Chapter #3: Digital Input - Pushbuttons · Page 71

    Here is the Link to it

    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf

    In your case you just would not use the switch

    ·(your switch would be the Optic Sensor which you tell if you have 24 volts)·but every thing else would be the same

    code wise


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 8/15/2008 2:24:54 AM GMT
    1696 x 944 - 95K
  • PDSAZPDSAZ Posts: 5
    edited 2008-08-15 02:39
    Metron, Sam,

    Thanks for the replies.· As I mentioned I am really new to this so I appreciate your patience.

    Let me give some background.

    There are 2 machines connected by cables.· machine A delivers parts to machine B.

    Machine A will switch on 24V when it has parts ready to send to machine B.

    machine B will close a switch (in this case the tranisitor but, could be a relay) when it is ready to receive parts.

    When Machine A turns on 24V and machine B closes the circuit then parts are delivered from Machine A to Machine B.

    I want to create a box that will show this in action I think the stamp is wells suited to do this. What·I need to know is·if their is 24V present without shorting pins 1 and 2.



    I tried to attached another drawing that hopefully shows this better.· Metron/Sam does that change how I would go about it?

    Sam - It looks like using the optocoupler that it would complete the circuit between pins 1 and 2 and cause the machine A to deliver parts as if the contacts on B were closed?

    Thanks again for all the great help!
    778 x 456 - 22K
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-08-15 02:54
    ·PDSAZ

    I would still·use what·I posted

    Let me ask you something is there any reason why you are using 24 volt

    If there is·NO reason why not use a 3 volt·Power supply·between the two

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 8/15/2008 3:00:20 AM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-08-15 02:56
    Transformers don't work·for DC voltage.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-08-15 02:59
    allanlane5
    Thank You for catching that mistake i reworded it

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-15 03:14
    What you have is a classic digital current loop (although the polarity of the lefthand isolator needs to be reversed and you need a current-limiting resistor).

    Attached is the correct way to monitor the loop. To do so, you have to break the loop and insert your own optoisolator, which switches on when the loop is activated.

    -Phil
    480 x 287 - 2K
  • PDSAZPDSAZ Posts: 5
    edited 2008-08-15 03:38
    Sam/Phil,
    Thanks again for the replies.· I will give your circuit a try.

    Sam- The machine are already existing so I don't have the option to change it.

    Phil - Thanks for catching my mistake on the polarity.· I was trying to draw it to show it conceptually and missed it.

    Here is what I am trying to have when this is all said and done.

    Machine A
    My test box
    Machine B where my test box·will do the following:

    1.· Light an LED when both 24V is present and contactor on Machine B is closed.
    2.· Light and LED when 24V is present regardless of state of machine B. without completing the circuit between A&B.

    Thanks again.· Learning a ton from this forum!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-15 04:28
    My circuit above will satisfy condition 1. For condition 2, add another opto isolator across the 24-volt supply, with a 2.2K series resistor. Connect the phototransistor to the Stamp in the same fashion as I illustrated above.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
Sign In or Register to comment.