Author Topic: Detecting a closed circuit with a few complications.  (Read 8780 times)

0 Members and 1 Guest are viewing this topic.

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Detecting a closed circuit with a few complications.
« on: March 02, 2018, 01:47:10 pm »
Hi All,

I have been working on solutions to a problem I have in one of my designs.
The basic circuit is the following:


I need to monitor the status of the limit switch.
For physical reasons, I only have access to the "GO Button " half of the circuit.

When the GO Button is not closed, I can detect 24v in parallel to the Go Button if the limit switch is not open.
When the go button is pressed, there is no voltage drop across the go button contacts, so my circuit would report that the limit switch is now open.
What is the easiest way to detect this in both Go Button states?
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Detecting a closed circuit with a few complications.
« Reply #1 on: March 02, 2018, 02:23:26 pm »
If your detection has to be a logic level signal to another logic
device, then it has to be debounced.

I would do something as simple as a series R to a PSOC input,
then use the debouce component inside it to clean up the signal.
In addition at the PSOC inout pin I would also connect a pair of
diodes as per -




PSOC debounce component usage page 10.


http://www.cypress.com/documentation/application-notes/an60024-psoc-3-psoc-4-psoc-5lp-switch-debouncer-and-glitch-filter


You can do this by writing no code, for what you have described so far.



Regards, Dana.

Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #2 on: March 02, 2018, 03:07:53 pm »
@Danadak:   Not helpful.  Please read https://www.eevblog.com/forum/beginners/beginners-don't-run-away-please!/ and possibly reconsider your posting habits.

@system24seven,
You  cannot detect the limit switch state solely by detecting voltage across the 'Go' button.   When 'Go' is open, the voltage reflects the limit switch state, but when its closed, you need to monitor the current through the button.   Detect the current and OR it with the voltage present signal, and you'll have the actual limit switch state.    How you detect the current is highly dependent on how much current there is.   Connect a multimeter on its 10A range in series with the GO button, push it, measure the current and post it here.

The next question is:
Do you need a logic level output from this detection circuit or do you just want to drive an indicator lamp, sounder or relay or switch something?
 
The following users thanked this post: system24seven

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #3 on: March 02, 2018, 03:37:40 pm »
If your detection has to be a logic level signal to another logic
device, then it has to be debounced.

I would do something as simple as a series R to a PSOC input,
then use the debouce component inside it to clean up the signal.
In addition at the PSOC inout pin I would also connect a pair of
diodes as per -




PSOC debounce component usage page 10.


http://www.cypress.com/documentation/application-notes/an60024-psoc-3-psoc-4-psoc-5lp-switch-debouncer-and-glitch-filter


You can do this by writing no code, for what you have described so far.



Regards, Dana.



Please would you STOP!!!!!!! telling everyone to do everything with a PSOC no matter how irelevant to the discussion.
 
The following users thanked this post: kony, Ian.M, drussell, floobydust

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Detecting a closed circuit with a few complications.
« Reply #4 on: March 02, 2018, 04:34:45 pm »
Simon, regarding this thread -

https://www.eevblog.com/forum/beginners/detecting-a-closed-circuit-with-a-few-complications/


I am not sure what the problem is you are seeing.

I, like others who advocate STM or uChip or Intel, always think in terms of the parts I regularly use
and recommend accordingly. Is that not allowed on this site ? If you look at my posts I have also
recommended Freescale, and Atmel Tiny. I think I even covered Renesas at one point. Should I not
be doing this ?

This particular design, I assumed, maybe wrongly, that he was trying to develop a logic signal off
a mechanical switch. So PSOC came to mind, not only because it has a debounce component in it,
but that's its behavior is also programmable. Then I showed, as you can see, how to protect an
input to a generic gate....And I will admit I also assumed he was going to do something with the
signal. Maybe that is a mistake on my part.

You can also see in other posts for users that are looking for really small amounts of logic, I also
recommend the verilog capability attached to the fabric inside PSOC. Most of those users
need that small fabric + a CPU + analog, so its a natural for PSOC. And as you know other
vendors are starting to offer that capability, although in severely reduced form, in general purpose
embedded CPUs. They are catching up to Cypress.

Is there a problem using ones knowledge base here, seems like a great forum to me.I enjoy helping
people here. And occasionally finding out something I do not understand. I do not have a lock
on the field of EE, and never will.

I have seen some resistance to PSOC from specific people, not sure why. If you examine I make my
points and let those people go on their way. Its not my attitude to force anyone to do anything, just
show them what I think is a good solution. Like I think all responsible posters do. Have been accused
of being a Cypress employee, or on their payroll. Just call their HR department, you won't find me there
in any capacity. I do know a lot of people there, in management and field engineering, which was the majority
of my profession, FAE. Same is true for Renesas and Freescale (Iwas at one point a specialist for Freescale 8 bit),
ST to a minor degree. I did a lot of work past years on Cypress forum, leaving it ~ 2 years ago, mainly I wanted
exposure to a broader spectrum of experienced EEs, I still learn a lot here from other experienced EEs.

Let me know, if you want I will leave the forum.  I will comply with your decision.


Regards, Dana.
« Last Edit: March 02, 2018, 04:37:16 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #5 on: March 02, 2018, 04:48:28 pm »
Thank you for completely disrupting this thread and apologies to the original poster. You did not answer the original question you instead decided that there will be another question and you decided on the answer. I'm sorry but I'm getting fed up with you. As is the rest of the forum. I have nothing against PSOC and I have a couple of sample boards of them myself I wish to look into but you do nothing but push these devices as the answer to everything. Stop doing it or I will ban you!!!!!!!!!!!!!!. You are not helping anybody you are simply running around talking about your pet parts. We don't want to know and we don't care. In fact the question sofar has not even asked about microcontrollers. The question is generic and has nothing to do with any particular microcontroller family. This is your final warning

In answer to the original poster and the answer has nothing at all to do with the discussion sofar that has nothing to do with the question is that you cannot detect the state of the limit switch in the way you expect to. It's simply not possible. As you correctly suggest you can detect whether or not the go button is pressed. Nothing about the go button can tell you state of limit switch. You could measure across the go button and you should see 24 V if the limit switch is closed should it open you'll see no voltage. But once you have closed the go button there is no way of detecting the state of the limit switch it simply not possible.
 
The following users thanked this post: drussell

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #6 on: March 02, 2018, 05:07:34 pm »
@Danadak,
The problem is: You frequently reply with some variant of 'Use a PSOC ....' without considering if it can solve the O.P's problem.

From your posting history, it wouldn't be unreasonable to assume that you are being paid or receiving some other tangible benefit for promoting PSOCs.    It looks like spam, it smells like spam, it tastes like spam, and really isn't welcome here no matter what brand of tinned luncheon meat it actually is.   If you are just an enthusiast, and haven't been paid or received any PSOC related freebies, then its possibly even worse as it makes you appear rather obsessive, which reduces the likelihood that your non-PSOC contributions will be valued.

In this specific instance, the O.P. is already detecting 24V across the button, isn't having problems detecting that voltage, but is having problems detecting the limit switch state when the 'Go' button is pressed, shorting out the 24V signal.  As the O.P isn't complaining about any contact bounce issues, and your proposed circuit cant detect the limit switch state with the 'Go' button pressed, your reply was unhelpful and irrelevant, so I and Simon called you on it.

I suggest you refrain from mentioning PSOCs unless specifically asked  for the rest of this month.   After that, please *READ* and *COMPREHEND* the question and only propose a PSOC if there has been no other suggestion for 24H or if, compared to the alternatives, using a PSOC will be significant time and cost saving and can actually solve the problem.

@Simon + O.P,
In answer to the original poster and the answer has nothing at all to do with the discussion sofar that has nothing to do with the question is that you cannot detect the state of the limit switch in the way you expect to. It's simply not possible. As you correctly suggest you can detect whether or not the go button is pressed. Nothing about the go button can tell you state of limit switch. You could measure across the go button and you should see 24 V if the limit switch is closed should it open you'll see no voltage. But once you have closed the go button there is no way of detecting the state of the limit switch it simply not possible.
.... unless you can also detect the current through the 'Go' button.   Unfortunately this may not be possible without breaking the circuit to add a current sensor in series with it.

I am not an EEVblog forum moderator, nor do I have any contractual relationship with EEVblog.  My opinions are solely my own.
« Last Edit: March 02, 2018, 06:15:19 pm by Ian.M »
 
The following users thanked this post: drussell

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #7 on: March 02, 2018, 05:25:56 pm »
Yes a current measurement would probably work. Ultimately it might help if the original poster gives us some context.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #8 on: March 02, 2018, 05:26:59 pm »
@Danadak,
If you are just an enthusiast, and haven't been paid or received any PSOC related freebies, then its possible even worse as it makes you appear rather obsessive, which reduces the likelihood that your npn-PSOC contributions will be valued.



I suspect this is the case. I appreciate the enthusiasm but is not helpful.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #9 on: March 02, 2018, 06:11:59 pm »
further posts about anything not related to the topic will be deleted.
 
The following users thanked this post: tooki

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #10 on: March 02, 2018, 06:15:51 pm »
+1 for monitoring the current through the circuit as your second input aspect if you cannot reasonably monitor across the limit switch itself due to physical location.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Detecting a closed circuit with a few complications.
« Reply #11 on: March 02, 2018, 06:18:41 pm »
One approach would be to inject a small signal AC component onto the high side of go
switch and look for inductance of the contactor coil A controller could manage this with
A/D and some math and measuring the phase on the line. Depends on L variation in
the contactor coil, line variations. You would have to error budget this.


Another approach is to simulate go switch closure but with hi Z and measure the current
to keep coil from energize if limit switch closed. You would detect go is open and close the loop,
say an external FET driven by output on a UP with a series R that limits current to < pullin current of
contactor coil. LPF or averaging the measurement would be prudent to eliminate AC line
pickup and focus on DC component.


Another possibility is detect transient when load is disconnected by limit switch.
This is tricky, depends on some capacitive coupling or limit switch bounce. Possibly
just line L field collapsing would be enough. This of course does not necessarily function
to detect contactor coil energize, just disconnect. Especially if it has a snubber or diode transient
suppressor across its coil. Is the switch centrifugal or just a simple mechanical activation ?


In either case you need to debounce any effects of limit switch and go switch in the
measuring loop. Again leading to a processor of some sort.


Let forum know if you want specific recommendations on either.


One other possibility, a small series R with the go switch, and a LED across it.
R sized to insure LED turn on when GO and LIMIT closed. R also has to be sized
to insure contactor coil turn on can occur. Thinking another way LED could be in
optocoupler, allowing you to get an isolated logic level status.


Regards, Dana.


« Last Edit: March 02, 2018, 08:21:02 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 
The following users thanked this post: system24seven

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #12 on: March 02, 2018, 06:24:57 pm »
In either case you need to debounce any effects of limit switch in the measuring loop.
Again leading to a processor of some sort.

Why would that be?  You don't even know what he is trying to do.

Most likely a resistor and a simple transistor amplifier or an op-amp or something will easily suffice.  IMHO, the answer to everything is not always a microcontroller.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #13 on: March 02, 2018, 06:26:41 pm »
As I said I think the original poster need to give us an context. It's hard to recommend a solution if we don't know exactly what he's trying to do.
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: Detecting a closed circuit with a few complications.
« Reply #14 on: March 02, 2018, 06:29:06 pm »
if the switch is spdt replace with dpdt, if spst replace with dpst.
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #15 on: March 02, 2018, 06:29:58 pm »
As I said I think the original poster need to give us an context. It's hard to recommend a solution if we don't know exactly what he's trying to do.

Indeed.  No need to make anything unnecessarily complex.

I suggest we wait for additional context from the OP before wildly speculating any further.    :)
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting a closed circuit with a few complications.
« Reply #16 on: March 02, 2018, 06:32:28 pm »
if the switch is spdt replace with dpdt, if spst replace with dpst.

It sounds a little like the current limit switch is built into a sealed device hence a lack of access.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #17 on: March 02, 2018, 06:33:33 pm »
@system24seven, please don't be discourages about some of the argument above.  This has been going on for awhile here in a few different beginner threads.

Ok, now on to your problem.  I have 2 questions before I can give a few solid suggestions.

1.  When you say knowing the status of the 'Limit Switch', do you just mean lighting up  or turning off and indicator lamp if the 'Limit' switch is open?  Or, do you need to feed another device like an alarm or buzzer?

2.  How much current does your 24v relay coil consume?  (You can measure this by placing an amp meter in parallel with the 'GO' button.)  Will it still operate with 22v?  (You may find out in the relay's data sheet)

Depending on your answers, there may be a truly easy way to solve this problem.

(With this, others may have figured out what I am proposing, so please don't spoil it...)
« Last Edit: March 02, 2018, 06:37:27 pm by BrianHG »
 
The following users thanked this post: drussell, system24seven

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #18 on: March 02, 2018, 06:36:36 pm »
...
What is the easiest way to detect this in both Go Button states?

(emphasis mine)

if the switch is spdt replace with dpdt, if spst replace with dpst.

Indeed, if that is an option, it is certainly a very valid answer to the original question, which was looking for easy, simple methods to obtain the desired monitoring result. 

+1
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #19 on: March 02, 2018, 06:40:10 pm »
if the switch is spdt replace with dpdt, if spst replace with dpst.

It sounds a little like the current limit switch is built into a sealed device hence a lack of access.

No, he means replace the GO button so you have an additional set of contacts so you can tell whether the GO button is presently activated or not, hence be able to deduce the limit switch position from lack of voltage across the main GO button contacts when you know the GO button is NOT being pressed.

The original phrasing of the OP's question seems to indicate that he needs to do all the sensing and monitoring at the GO button, otherwise he would just monitor the limit switch directly. 

I can think of many situations where this would be the case and, indeed, it is a good question!  :)
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #20 on: March 02, 2018, 06:42:03 pm »
...
What is the easiest way to detect this in both Go Button states?

(emphasis mine)

if the switch is spdt replace with dpdt, if spst replace with dpst.

Indeed, if that is an option, it is certainly a very valid answer to the original question, which was looking for easy, simple methods to obtain the desired monitoring result. 

+1

For physical reasons, I only have access to the "GO Button " half of the circuit.
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: Detecting a closed circuit with a few complications.
« Reply #21 on: March 02, 2018, 06:43:40 pm »
Yep, the most obvious way is to monitor both the voltage and current flowing across the go button.
0 V, 0 mA = Limit open Go open OR Limit open Go closed (do you need to differentiate that? Either case the limit switch position are the same)
24 V, 0 mA = Limit closed Go open
0 V, some mA = Limit closed Go closed

Otherwise if you can use SPDT switches on both of the switches, you can place fairly large resistors (enough resistance to not activate the coil) so that the switches is completing the circuit directly when closed, or completing the circuit through resistor when open. In that case, detecting switch states is simply detecting voltage level across GO button.
 
The following users thanked this post: system24seven

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11648
  • Country: my
  • reassessing directives...
Re: Detecting a closed circuit with a few complications.
« Reply #22 on: March 02, 2018, 06:44:42 pm »
@system24seven, please don't be discourages about some of the argument above.  This has been going on for awhile here in a few different beginner threads.
be it the moderator hasnt got in the shitty way, everything was just about to go fine. the OP has made it pretty clear. SPST switch and no access to other parts. what helpful in speculating any further? want to hear another solution? use mechanical relay instead of SPST switch, so we can make algorithm if no go and no voltage = no limit switch. ie limit switch state can only be decided if relay is not energized, some sort of chopping mechanism should be able to distinguish both states. will this solution being deleted too? F! serving oneself for the country
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #23 on: March 02, 2018, 06:49:18 pm »
Otherwise if you can use SPDT switches on both of the switches, you can place fairly large resistors (enough resistance to not activate the coil) so that the switches is completing the circuit directly when closed, or completing the circuit through resistor when open. In that case, detecting switch states is simply detecting voltage level across GO button.

You don't need to use an SPDT switch to put a resistor across it.  MANY fault indicators, status lights, etc. use this idea.  Heck, even a neon bulb across the thermostat in your kettle of coffee pot will light up to indicate that the cycle is complete.  Very, very common.
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #24 on: March 02, 2018, 06:57:27 pm »
if the switch is spdt replace with dpdt, if spst replace with dpst.

Indeed, if that is an option, it is certainly a very valid answer to the original question, which was looking for easy, simple methods to obtain the desired monitoring result.

For physical reasons, I only have access to the "GO Button " half of the circuit.

I realize the limit switch is "off limits"  :)

I thought grifftech was talking about the GO button.  That would work if it had an additional contact, wouldn't it, or did I miss something? 

(Other than, of course, that he may well not be able to replace the GO button switch, even though he has access to the circuit for sensing, so it certainly may not be a useful solution in this case...  We will obviously need the OP to chime in on this.)
 
The following users thanked this post: system24seven

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Detecting a closed circuit with a few complications.
« Reply #25 on: March 02, 2018, 07:03:19 pm »
A simple (and only) solution would be to monitor the current through the "GO" switch. What components to use, depends on the current required by the contactor in normal operation. There are "current sensing" reed relays that may do the job well.
Safety devices hinder evolution
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #26 on: March 02, 2018, 07:04:56 pm »
Sorry @drussell, my comment wasn't aimed specifically at you, I'm trying to remind everyone that the OP has no access to the limit switch and contactor relay.

I want my 2 questions answered since that contactor relay may have a 1 amp coil.  Or, it may be an electronic circuit and only draws 25ma from the GO button.  This changes the implementation of my idea and with 1 amp, a resistor solution isn't very reliable or can heat up.

I want to suggest something that will be reliable and guaranteed to work.
« Last Edit: March 02, 2018, 07:07:36 pm by BrianHG »
 
The following users thanked this post: drussell, system24seven

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #27 on: March 02, 2018, 07:09:54 pm »
+1.
I asked back in reply#2 for that info:
Detect the current and OR it with the voltage present signal, and you'll have the actual limit switch state.    How you detect the current is highly dependent on how much current there is.   Connect a multimeter on its 10A range in series with the GO button, push it, measure the current and post it here.
However I was having a brain-fart and didn't think of the really simple test of simply connecting the multimeter on Amps directly across the Go button, simulating pushing the button, to measure it.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7000
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #28 on: March 02, 2018, 11:45:28 pm »
The wire can be 0V, 24V or floating. There is a way to detect the three possibilities on a single wire, but you need power.
You can use a dual-optocoupler or a couple transistors. This is the sort of idea:
 
The following users thanked this post: system24seven

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #29 on: March 03, 2018, 12:11:28 am »
No.  O.P's requirements:
I need to monitor the status of the limit switch.
For physical reasons, I only have access to the "GO Button " half of the circuit.

When the GO Button is not closed, I can detect 24v in parallel to the Go Button if the limit switch is not open.
When the go button is pressed, there is no voltage drop across the go button contacts, so my circuit would report that the limit switch is now open.
What is the easiest way to detect this in both Go Button states?
Your dual opto circuit doesn't indicate the limit switch state while the Go button is pressed.

FAIL  :--
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #30 on: March 03, 2018, 01:04:29 am »
Ok, got tired of waiting for the OP to answer this my 2 questions, so, I'll just assume his contactor relay draws a huge current.

My circuit will work from 100ma to 4 amps DC.  At 100ma, the contactor will get 22.8v instead of 24v.  At 4 amps, the contactor will get 22.4v instead of 24v.  I would be surprised if the contactor would fail to properly switch losing approximately 1.5v, or around 6% on it's power supply.  This circuit will handle contactors with 24vdc at up to 90 watts inrush current coils.  For the 24VDC contactors which have a 225 watt inrush current, you will need to go to 10 amp diodes.

Digikey has stock of the diodes and relay.   The relay contacts are only 2 amps.  Larger contact current 1.5v relays exist...

If you need a power relay, use 1 to 2 more diodes in series and an Omron 'G6RL-1A DC3' rated with 10 amp contacts.  Your contactor will now only get 21.6v to 21v.
« Last Edit: March 03, 2018, 02:27:25 am by BrianHG »
 
The following users thanked this post: system24seven

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7000
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #31 on: March 03, 2018, 02:21:50 am »
No.  O.P's requirements:
I need to monitor the status of the limit switch.
For physical reasons, I only have access to the "GO Button " half of the circuit.

When the GO Button is not closed, I can detect 24v in parallel to the Go Button if the limit switch is not open.
When the go button is pressed, there is no voltage drop across the go button contacts, so my circuit would report that the limit switch is now open.
What is the easiest way to detect this in both Go Button states?
Your dual opto circuit doesn't indicate the limit switch state while the Go button is pressed.

FAIL  :--

I figured you'd know before and after the GO button is pressed if the limit switch tripped. So we'll have to monitor current to know in real time.

This application sounds like a motor and travel limit switch? Operator presses and holds button and needs to know when you've reached the end?
Most large contactors are AC coil.
 
The following users thanked this post: system24seven

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37742
  • Country: au
    • EEVblog
Re: Detecting a closed circuit with a few complications.
« Reply #32 on: March 03, 2018, 04:07:22 am »
Hi All,

I have been working on solutions to a problem I have in one of my designs.
The basic circuit is the following:

I need to monitor the status of the limit switch.
For physical reasons, I only have access to the "GO Button " half of the circuit.

When the GO Button is not closed, I can detect 24v in parallel to the Go Button if the limit switch is not open.
When the go button is pressed, there is no voltage drop across the go button contacts, so my circuit would report that the limit switch is now open.
What is the easiest way to detect this in both Go Button states?

Assuming there are no grounding issues between you circuit and the switch/relay system, a simple resistor divider should do it. One that reduces 24V to say 3.3V or 5V for whatever logic you are using. Maybe with a reverse diode across the lower resistor for protection.
More complex would be to use an optocoupler.
« Last Edit: March 03, 2018, 04:11:14 am by EEVblog »
 
The following users thanked this post: tpowell1830, system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #33 on: March 03, 2018, 05:08:43 am »
Hi All,

I have been working on solutions to a problem I have in one of my designs.
The basic circuit is the following:

I need to monitor the status of the limit switch.
For physical reasons, I only have access to the "GO Button " half of the circuit.

When the GO Button is not closed, I can detect 24v in parallel to the Go Button if the limit switch is not open.
When the go button is pressed, there is no voltage drop across the go button contacts, so my circuit would report that the limit switch is now open.
What is the easiest way to detect this in both Go Button states?

Assuming there are no grounding issues between you circuit and the switch/relay system, a simple resistor divider should do it. One that reduces 24V to say 3.3V or 5V for whatever logic you are using. Maybe with a reverse diode across the lower resistor for protection.
More complex would be to use an optocoupler.

Can you please explain this, or, illustrate you idea.  I'm having trouble visualizing you wiring.
According to many contactor data sheets, for the 24vdc coils units, those coils are specked to consume as much as 3.5amps initially when switched on, then, they settle to 100ma current.  If the OP's circuit is an electronic driven contactor, where there only may be around 10ma in the loop, all I would do is use an optocoupler in the circuit as well.

You can see in my attached data sheet, the 90watts for the 24v DC contactor is 3.75 amps until it is closed when it goes to 2.8 watts, or around 116ma.  This is a huge swing.
« Last Edit: March 03, 2018, 05:11:35 am by BrianHG »
 
The following users thanked this post: system24seven

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #34 on: March 03, 2018, 06:07:42 am »
Before we start getting into solutions, I thought it best to lay out the problem more clearly.  Here is how I understand it...

Two switches having two states each generates four possible states of the system, having the following characteristics:



Here we can see three possible measurable quantities for the voltage across the GO button: 0V, 24V and Undefined - and if we have 3 distinct values for this voltage, we can exactly determine the state of the switches when no current is flowing.

However, the undefined value causes a problem.  It could possibly be 0V or 24V, which extinguishes the certainty.

If, however, there could be some unique voltage across the GO button, then the certainty is reinstated.  (I have chosen 12V - but it could be ANY voltage sufficiently different from the nominal 0V and 24V that it can be reliably distinguished from them.)

Inverting the table using observations to determine states produces this:



My solution would introduce a voltage across the GO button from a source of sufficiently high enough impedance that it has no measurable effect on the normal operation of the system, but not so high that the voltage detection mechanism cannot reliably detect it when both switches are open.  There would also be a shunt resistor for detecting current flow.

How these quantities are then processed is open for discussion.
« Last Edit: March 03, 2018, 06:09:40 am by Brumby »
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #35 on: March 03, 2018, 06:29:38 am »
Before we start getting into solutions, I thought it best to lay out the problem more clearly.  Here is how I understand it...

Two switches having two states each generates four possible states of the system, having the following characteristics:



Here we can see three possible measurable quantities for the voltage across the GO button: 0V, 24V and Undefined - and if we have 3 distinct values for this voltage, we can exactly determine the state of the switches when no current is flowing.

However, the undefined value causes a problem.  It could possibly be 0V or 24V, which extinguishes the certainty.

If, however, there could be some unique voltage across the GO button, then the certainty is reinstated.  (I have chosen 12V - but it could be ANY voltage sufficiently different from the nominal 0V and 24V that it can be reliably distinguished from them.)

Inverting the table using observations to determine states produces this:



My solution would introduce a voltage across the GO button from a source of sufficiently high enough impedance that it has no measurable effect on the normal operation of the system, but not so high that the voltage detection mechanism cannot reliably detect it when both switches are open.  There would also be a shunt resistor for detecting current flow.

How these quantities are then processed is open for discussion.
Please show me an example schematic of how this could work.  Remember, the OP might have access to an outside voltage source, but, it is not guaranteed.  Also, the op has no access to anything on the right hand side of his schematic, just the 2 wires which go to the GO button.  While the go button is closed, keeping the contactor on, he needs to know if at anytime the limit switch has been opened.

He does not care about the limit switch's position when the GO button is off.  This would be all too easy to detect.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #36 on: March 03, 2018, 06:42:10 am »
I've already thought of two three ways.  Give me some time to draw something up.

Knowing the current draw and tolerance of the existing system to a voltage drop across a shunt resistor would be nice - but I'll just throw in some numbers to make it work.

He does not care about the limit switch's position when the GO button is off.  This would be all too easy to detect.
Don't do this.  As a first pass, ignoring one of the valid states BEFORE you have a solution is a brilliant way to trip yourself up.  Wait until the re is a solution and THEN see if you want to ignore it or not.  If a solution is still elusive, then if it is clearly stated that knowledge of this state is not required and ignoring this state will allow a solution to be forthcoming, then and only then would I consider this a valid course of action.

However, ignoring it is absolutely not necessary.  It actually falls out of the solution, with practically no additional effort.
« Last Edit: March 03, 2018, 06:48:24 am by Brumby »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #37 on: March 03, 2018, 06:45:29 am »
I've already thought of two three ways.  Give me some time to draw something up.

Knowing the current draw and tolerance of the existing system to a voltage drop across a shunt resistor would be nice - but I'll just throw in some numbers to make it work.
Here are the numbers for most of the 24vdc contactor coils, the power requirements are boxed in red, the tolerances are just to the right:
« Last Edit: March 03, 2018, 06:50:43 am by BrianHG »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #38 on: March 03, 2018, 06:50:37 am »
I'm not doing a full circuit design with finished calculations.  I'm just going to do something for illustration.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #39 on: March 03, 2018, 06:51:48 am »
I'm not doing a full circuit design with finished calculations.  I'm just going to do something for illustration.
??????  You only need 2 different parts to make this work!  I posted a working schematic above.
https://www.eevblog.com/forum/beginners/detecting-a-closed-circuit-with-a-few-complications/msg1441675/#msg1441675
Remember, the OP said he already could already tell if the limit switch was open when the GO button wasn't pressed.  He just didn't have a way to tell when the button was closed.  This was all we had to solve for him.
« Last Edit: March 03, 2018, 07:38:57 am by BrianHG »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #40 on: March 03, 2018, 07:19:05 am »
OK then.  In that case the solution is even easier.

A 1k series resistor and an LED across the GO button.




Next.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #41 on: March 03, 2018, 07:44:56 am »
OK then.  In that case the solution is even easier.

A 1k series resistor and an LED across the GO button.




Next.
When the button is closed, there is 0v everywhere, even if the limit switch is open or closed.  This is the only other solution I have which will always tell you the status of the limit switch, no matter if the GO button is pressed powering that 3.75 amp contactor relay coil, or the GO button is open, lowering the current across the contactor relay coil below the minimum hold current of 11ma.

When the limit switch is closed, the output of this circuit will go low, when the limit switch is open, this circuit's output will go to VCC:


My earlier circuit is simpler, doesn't require a VCC, but this circuit gives you the limit switch state with GO on or off, makes no difference & the GO button will still properly drive that 3.75 amp contactor coil.
« Last Edit: March 03, 2018, 08:25:04 am by BrianHG »
 
The following users thanked this post: system24seven

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #42 on: March 03, 2018, 08:42:37 am »
I'd bet on there being an excessive ground offset at the 'Go' button location, so the output from that probably isn't suitable to go direct to a logic level input.  However that can be fixed by bringing the emmitter connection to the logic board as well and either optoisolating or using a well protected differential comparator, with one input from your output as shown and the other from a 2x 10K potential divider between the emitter and Vcc.

Another simple solution that also offers isolation would be a pair of reed relays,  one with a high impedance coil to sense the voltage across the button without activating the contactor, and the other with a low impedance current sensing coil to detect the contactor coil current.   Wire their SPST contacts in parallel to mirror the limit switch's action.
« Last Edit: March 03, 2018, 08:48:41 am by Ian.M »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #43 on: March 03, 2018, 10:54:54 am »
Hmmm... Yes, I went a bit too far with my "simplification".

The one thing that does seem to be consistent, though, is that all the solutions combine a voltage detection and a current detection.  The manner of processing those is what differs.
 

Offline Damianos

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: gr
Re: Detecting a closed circuit with a few complications.
« Reply #44 on: March 03, 2018, 01:33:41 pm »
Just thinking about:
« Last Edit: March 03, 2018, 04:59:36 pm by Damianos »
 
The following users thanked this post: system24seven

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #45 on: March 03, 2018, 02:10:23 pm »
This was my minimum solution.  It shows all 4 states with 2 resistors and a meter.  There are better ways to handle the display - but I went with simple.





A = GO button closed, LIMIT switch open
B = GO button closed, LIMIT switch closed  (yes, I know it's close)
C = GO button open, LIMIT switch open
D = GO button open, LIMIT switch closed


You could also feed the meter voltage via a resistive divider to an analogue input of a micro and display it however you want.
« Last Edit: March 03, 2018, 02:16:35 pm by Brumby »
 
The following users thanked this post: system24seven

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Detecting a closed circuit with a few complications.
« Reply #46 on: March 03, 2018, 03:49:07 pm »
You can use an optocoupler to detect the current through the GO-switch. The circuit assumes that the 24V solenoid will work at 21V due to voltage drop across the optocoupler. Using the optocoupler will also provide nice galvanic isolation from the circuit you are monitoring. The string of 1N4001s are there to limit the maximum voltage/current across/through the optocoupler.

« Last Edit: March 03, 2018, 04:05:09 pm by Kalvin »
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #47 on: March 03, 2018, 04:18:08 pm »
You can use an optocoupler to detect the current through the GO-switch. The circuit assumes that the 24V solenoid will work at 21V due to voltage drop across the optocoupler. Using the optocoupler will also provide nice galvanic isolation from the circuit you are monitoring. The string of 1N4001s are there to limit the maximum voltage/current across/through the optocoupler.
This is the same as my relay solution above: https://www.eevblog.com/forum/beginners/detecting-a-closed-circuit-with-a-few-complications/msg1441675/#msg1441675

Except your 1N4007's will explode when your switch on that 3.75 amp contactor coil and, with 3 of them, even at full 1 amp load, you get a 1v drop across each equaling 3v total meaning the contactor coil will get 21v.  According to the contactor data sheet I posted above, the absolute minimum DCV drive is 85% of 24v, or, 20.4v.  So, if the op's powersupply and length of wiring is only down by 0.6v in any of his machines, the contactor isn't guaranteed to turn on properly.  This is a super close margin for a 24v system, especially if the OP 24v source isn't regulated.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Detecting a closed circuit with a few complications.
« Reply #48 on: March 03, 2018, 04:29:50 pm »
You can use an optocoupler to detect the current through the GO-switch. The circuit assumes that the 24V solenoid will work at 21V due to voltage drop across the optocoupler. Using the optocoupler will also provide nice galvanic isolation from the circuit you are monitoring. The string of 1N4001s are there to limit the maximum voltage/current across/through the optocoupler.
This is the same as my relay solution above: https://www.eevblog.com/forum/beginners/detecting-a-closed-circuit-with-a-few-complications/msg1441675/#msg1441675

Except your 1N4007's will explode when your switch on that 3.75 amp contactor coil and, with 3 of them, even at full 1 amp load, you get a 1v drop across each equaling 3v total meaning the contactor coil will get 21v.  According to the contactor data sheet I posted above, the absolute minimum DCV drive is 85% of 24v, or, 20.4v.  So, if the op's powersupply and length of wiring is only down by 0.6v in any of his machines, the contactor isn't guaranteed to turn on properly.  This is a super close margin for a 24v system, especially if the OP 24v source isn't regulated.
I used 1N4007s as an example. One can select whatever diode is suitable for the job. I decided to post my suggestion as one might have an optocoupler and suitable diodes at hand.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #49 on: March 03, 2018, 04:31:31 pm »
This was my minimum solution.  It shows all 4 states with 2 resistors and a meter.  There are better ways to handle the display - but I went with simple.





A = GO button closed, LIMIT switch open
B = GO button closed, LIMIT switch closed  (yes, I know it's close)
C = GO button open, LIMIT switch open
D = GO button open, LIMIT switch closed


You could also feed the meter voltage via a resistive divider to an analogue input of a micro and display it however you want.

Very tricky, as I illustrated in the contactor data sheets I posted above, to switch on, (to make thing easy for your circuit I'll use the contactor which uses 3.75 amps to turn on and stabilizes at 100ma.)  You need a shunt resistor which cannot exceed a 2v drop, to be safe to turn on according to the data sheet, which will be a 0.54 ohm shunt.  Now, once the contactor settles to 100ma when sealed according to the data sheet, the voltage drop you will measure across your 0.54 ohm shunt will be 0.05v, not 1v like in your illustration measurement 'B'.  I don't think the op will be able to get a good measurement electronics out of that except at the level of a good DVM.
 

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #50 on: March 03, 2018, 04:32:20 pm »
Hi All,

First of all, thanks for the replies, this has been very educational.
Apologies for not replying sooner, I have been stuck in transit with the snow.

Contactor in use is:
Schneider LC2K1210B7
https://www.schneider-electric.us/en/product/LC2K1210B7/tesys-k-reversing-contactor---3p---ac-3-%3C=-440-v-12-a---1-no---24-v-ac-coil

Minimum switching voltage 17V.
4.5VA holding power to keep the contactor coil energised.


I did just realise that the contactor coil is in fact AC, and the power supply in the unit is not rectified. Fail.


I only need to monitor the limit switch state, as correctly pointed out, the limit switch/contactor is part of a hoist assembly.

It sounds like I need to use a two part approach and OR the results of voltage and current sensing.
I will be taking output from the detection as a logic signal, so the optocouplers are a great solution for isolation, and would have likely been part of the signal path in the final design.

The next query is whether changing to AC will require more complexity. I assume that I could rectify the output signal somehow, as I don't need more than 0.1 Second detection accuracy, so plenty of time to debounce etc.

In reality, I have a cable with two limit switch circuits sharing a common (one for up, one for down) and also a separate ground, and I would have two identical circuits monitoring these.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #51 on: March 03, 2018, 04:41:18 pm »
You can use an optocoupler to detect the current through the GO-switch. The circuit assumes that the 24V solenoid will work at 21V due to voltage drop across the optocoupler. Using the optocoupler will also provide nice galvanic isolation from the circuit you are monitoring. The string of 1N4001s are there to limit the maximum voltage/current across/through the optocoupler.
This is the same as my relay solution above: https://www.eevblog.com/forum/beginners/detecting-a-closed-circuit-with-a-few-complications/msg1441675/#msg1441675

I used 1N4007s as an example. One can select whatever diode is suitable for the job. I decided to post my suggestion as one might have an optocoupler and suitable diodes at hand.
Ok, you are correct.  But, I did the searching and math, as in my above posted, sitting withing the safe margins of the stratup current and startup voltage for the contactor with a little additional safe margin, the cheapest diode combination which I used was only 2x MUR540's.  However, at startup, the total voltage drop was 1.6v, once the contactor was sealed, this voltage dropped to 1.3v.  Unfortunately, 1.3v isn't good enough with a series protection resistor to turn on an optocoupler reliably, especially when you get that 1.6v or more startup current.  My original cheap 2$ 1.5v relay's 98ma draw and 1.3-1.6v coil operating voltage was the most rugged and gauranteed to function design with the available information.

+, the relay is good if all the op wants a large warning lamp, or buzzer/siren, even operated from 120v/240v.
Except your 1N4007's will explode when your switch on that 3.75 amp contactor coil and, with 3 of them, even at full 1 amp load, you get a 1v drop across each equaling 3v total meaning the contactor coil will get 21v.  According to the contactor data sheet I posted above, the absolute minimum DCV drive is 85% of 24v, or, 20.4v.  So, if the op's powersupply and length of wiring is only down by 0.6v in any of his machines, the contactor isn't guaranteed to turn on properly.  This is a super close margin for a 24v system, especially if the OP 24v source isn't regulated.
« Last Edit: March 03, 2018, 05:04:09 pm by BrianHG »
 

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #52 on: March 03, 2018, 04:42:06 pm »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #53 on: March 03, 2018, 05:03:15 pm »
Hi All,

First of all, thanks for the replies, this has been very educational.
Apologies for not replying sooner, I have been stuck in transit with the snow.

Contactor in use is:
Schneider LC2K1210B7
https://www.schneider-electric.us/en/product/LC2K1210B7/tesys-k-reversing-contactor---3p---ac-3-%3C=-440-v-12-a---1-no---24-v-ac-coil

Minimum switching voltage 17V.
4.5VA holding power to keep the contactor coil energised.


I did just realise that the contactor coil is in fact AC, and the power supply in the unit is not rectified. Fail.


I only need to monitor the limit switch state, as correctly pointed out, the limit switch/contactor is part of a hoist assembly.

It sounds like I need to use a two part approach and OR the results of voltage and current sensing.
I will be taking output from the detection as a logic signal, so the optocouplers are a great solution for isolation, and would have likely been part of the signal path in the final design.

The next query is whether changing to AC will require more complexity. I assume that I could rectify the output signal somehow, as I don't need more than 0.1 Second detection accuracy, so plenty of time to debounce etc.

In reality, I have a cable with two limit switch circuits sharing a common (one for up, one for down) and also a separate ground, and I would have two identical circuits monitoring these.

WAIT A SECOND, your contactor has an AC coil, but, in your circuit,, you are using a DC supply.  Is this correct?

Ok, if your circuit is DC just change the 2x 'MUR420' diodes in my 2 design with 2x or 3x Diodes Incorporated '10A01-T'.
However, you need to be sure about your true turn on voltage of 17v, TeSys K contactor does not specify this.  From what I have seen, 85% of the coil specified voltage, ie 20.5v DC to guarantee turn on of the contactor.  Where did you get this 17V?  Is you 24v DC supply regulated, or, just rectified AC-DC with a 100hz/120hz pulse in it?

 

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #54 on: March 03, 2018, 05:08:09 pm »

WAIT A SECOND, your contactor has an AC coil, but, in your circuit,, you are using a DC supply.  Is this correct?

Ok, if your circuit is DC just change the 2x 'MUR420' diodes in my 2 design with 2x or 3x Diodes Incorporated '10A01-T'.
However, you need to be sure about your true turn on voltage of 17v, TeSys K contactor does not specify this.  From what I have seen, 85% of the coil specified voltage, ie 20.5v DC to guarantee turn on of the contactor.  Where did you get this 17V?  Is you 24v DC supply regulated, or, just rectified AC-DC with a 100hz/120hz pulse in it?

My supply is inside the hoist, which has a rectifier for another purpose (DC coil brake), and it has a conventional transformer, so the circuit is not using DC at all. That was my big mistake.

As far as the 17v, if you scroll waaaaaaay down the page, there is another table with "Complementary" title.
There is where the extra signal circuit details are listed.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #55 on: March 03, 2018, 05:22:25 pm »
 :palm: AC, this changes quite a bit.  Yes, the AC coils have a lower turn voltage range because of the peaks in the swing of the AC.

Also, taken from the datasheet:
Minimum switching current 5 mA signalling circuit ***  This usually means once switched on, this is the amount of power which can hold the relay in place.
Minimum switching voltage 17 V signalling circuit

But read just above:

Control circuit voltage limits     0.2...0.75 Uc at <= 122 °F (50 °C) drop-out
                                                0.8...1.15 Uc at <= 122 °F (50 °C) operational  ***This is 19.2v

Inrush power in VA 30 VA at 68 °F (20 °C)  ***This means around 1.25amps to switch.
Hold-in power consumption in VA 4.5 VA at 68 °F (20 °C)  ***This means around 188ma to hold.  These numbers make a lot more sense...

0.80, or 80% of 24v = 19.2v at 122 degrees.  The lower 17v figure is probably minimum at room temperature, not a good choice for guaranteed operation at all specified temperatures.

Next question, will an optocoupler output be sufficient for your detector.  What do you need to switch, an AC or DC device and at how many volts?
« Last Edit: March 03, 2018, 05:26:44 pm by BrianHG »
 
The following users thanked this post: system24seven

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #56 on: March 03, 2018, 05:29:42 pm »
I will be taking multiple of these detector circuits in using MCP23017 IO expanders, so an optocoupler would be ideal, as I could separate my +5v rail from the AC side of the system. Originally I was going to use an LM339 Comparator then chain in an optocoupler after that.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #57 on: March 03, 2018, 05:33:29 pm »
New schematic coming...
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #58 on: March 03, 2018, 05:57:52 pm »
As its AC, the best option for the current sensing would be current transformers. That gives you isolation and minimal voltage drop. As the holding current is about 190mA with a 1.25A surge at pull-in, there's plenty of drive available.   Each current transformer secondary would feed a bridge rectifier (1N4148 signal diodes would be suitable as long as the transformer ratio is high enough) and then be loaded by a burden resistor and a Zener clamp to limit it to an appropriate logic level, with a capacitor to smooth the output enough so it stays at logic '1' between half cycles.   Choose the burden resistor so it reaches the logic '1' threshold at 2/3 the holding current.    For a one-off you could easily wind your own on pot cores.  I expect a 100:1 ratio would be satisfactory.

The voltage sensing will obviously use an AC input optocoupler, with a pair of suitable limiting resistors in series, with Zener clamping (2x 24V back to back, or a 24V bidirectional TVS diode) across the opto LED + the lower resistor to handle the back-EMF from the contactor coil when the Go button opens.

Its purely a matter of personal preference if you take the voltage and current inputs direct to separate MCP23017 inputs and OR them in software or if you use external OR gates to combine them before the MCP23017.
 
The following users thanked this post: system24seven

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #59 on: March 03, 2018, 06:17:25 pm »
As its AC, the best option for the current sensing would be current transformers.
...
 I expect a 100:1 ratio would be satisfactory.
...

Having never used current transformers, I had a search through the offerings at RS, they seem to only have large units >30A that install onto cables.
I assume there are tiny <2A PCB mount offerings available?
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #60 on: March 03, 2018, 06:37:47 pm »
Ok, this circuit will work with AC or DC.
It is 100% isolated from your lift's wiring.  This means no powering, filtering, and protecting any analog comparators/op-amps on the AC side or within your MCU side since there is no connected link.
It meets all the min and max values for your contactor's coil surge - on - minimum hold for off - off currents with some good clearance.

You may parallel the transistor outs of the optocoupler if you want just the status of the limit switch, otherwise, having separate outputs may be useful to you.  I recommend a 10-100k pullup on the OC's transistor out with a 1uf to GND to filter out the 120/100hz from the AC cycling transitions in the circuit which the optocoupler is fast enough to pass through.



The contactor coil will get 20.8vac during power-up surge 21.4vac while kept on.  When the GO switch is open, the contactor coil will only see 2ma.  This circuit will withstand a 4amp continuous.

Note you can switch the 8 diodes with a current sensing transformer.
« Last Edit: March 03, 2018, 07:21:40 pm by BrianHG »
 
The following users thanked this post: system24seven

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Detecting a closed circuit with a few complications.
« Reply #61 on: March 03, 2018, 07:00:39 pm »
That's why I was suggesting pot cores.   Try winding 200 turns of fine magnet wire directly on the former for the secondary and a 2 turn heavy gauge primary wound on top of it.  Eventually you'll use enamelled solid copper wire for the primary, and protect the secondary with tape, but while you are messing around with it to get a suitable turns count and turns ratio, its easiest to use stranded hookup wire for the primary, so you can easily get to the secondary to add or remove turns.    Use a Variac feeding a low voltage transformer and a fixed resistor to get a suitable current through its primary for testing. 

Its also possible to build them on ring cores, but they are a PITA to hand wind so don't do that unless  you are planning on volume production.

If you want to use BrianHG's circuit,  you could replace the eight diodes with two bridge rectifiers.  Short each one from + to - and connect them in series via their AC terminals.
Brian's circuit is likely to be the cheapest and most compact, but you do need to be able to tolerate about 2V voltage drop, and we don't know how much is already taken up in wiring losses.
 
The following users thanked this post: system24seven

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #62 on: March 03, 2018, 07:11:47 pm »
You can eliminate D4 and D8 in my design, however, during operation, the optocoupler LED will only see 2v going thru the 220 ohm resistor, 2.5v max during the current in-rush.  The nice thing here is regardless of some small losses in cables, these voltages are fairly closely constant as they represent the loop current and current across the diodes.

And yes, using a bridge rectifier with the +&- shorted is a cheap way to get 2 diode drop, but you will need 2 of them.
« Last Edit: March 03, 2018, 07:19:37 pm by BrianHG »
 

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #63 on: March 03, 2018, 08:04:11 pm »
You can eliminate D4 and D8 in my design, however, during operation, the optocoupler LED will only see 2v going thru the 220 ohm resistor, 2.5v max during the current in-rush.  The nice thing here is regardless of some small losses in cables, these voltages are fairly closely constant as they represent the loop current and current across the diodes.

And yes, using a bridge rectifier with the +&- shorted is a cheap way to get 2 diode drop, but you will need 2 of them.

In the context this circuit exists in, the cables between this detector and the contactor are normally 1mm diameter copper of up to 100m.
That equates roughly 4v drop in the line.

I am worried that this would be possibly unreliable at distance.

If I was to make a gain stage out of a couple of transistors and a few resistors, place this where the optocoupler is, and feed the opto with the output of the transistors, could I decrease the number of diodes to 2?
 
One forward, one reverse in parallel
~1V drop on the 24v line.

I would need to have a low voltage rail to switch with the transistor, but thats ok in context.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #64 on: March 03, 2018, 08:10:07 pm »
Yes you can.  I just checked the optocoupler datasheet.  Using only diodes D1,D2 & D5,D6, you will see a 1.35v drop (voltage loss across relay @ 200ma holding contactor on) and the optocoupler needs typically 1.2v to turn on.  During the 1.25 amp surge, you voltage loss at the contactor will now be 1.6v according to the MUR240 datasheet.

Going down to 1 diode, you are now talking about 0.65v across the diodes.  Even with transistor amplifiers, this is getting messy.  Having single diodes back-to-back, and using a signal transformer to send to an op-amp on your PCB or MCU to sample will be the only cheap isolated choice here.  In other words, for when the switch is open, use a single optocoupler.  When the switch is closed, use the output of the transformer which you will need to amplify with an opamp or comparator to feed a MCU digital input.

Using this transformer across 2 parallel back-back silicon diodes diodes for that 0.75v drop, you can now go to a schottky diode making your voltage drop go down to around 0.3v.

Xformer #1: https://www.digikey.com/product-detail/en/tamura/TTC-5023/MT7238CT-ND/674136
Xformer #2: https://www.digikey.com/product-detail/en/triad-magnetics/TY-400P/237-1133-ND/242655
Schottky : https://www.digikey.com/product-detail/en/vishay-semiconductor-diodes-division/SB540-E3-73/SB540-E3-73GICT-ND/3711864


However, the output of the transformer will be a 50/60hz square wave at 0.2v instead of the optocoupler transistor output of 5v.
« Last Edit: March 03, 2018, 09:21:19 pm by BrianHG »
 
The following users thanked this post: system24seven

Offline system24sevenTopic starter

  • Newbie
  • Posts: 9
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #65 on: March 03, 2018, 08:29:39 pm »
I think that gives me some serious tinkering to do now, ill build it and show my results. Could take a bit of time though.
Thanks all.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Detecting a closed circuit with a few complications.
« Reply #66 on: March 03, 2018, 08:44:58 pm »
Using the 4 diode total scheme, only D1,D2,D5,D6 you may need to lower the 220ohm series resistor to 100 ohm, or even 47 ohm.
 
The following users thanked this post: system24seven

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #67 on: March 04, 2018, 02:16:39 am »
You could also feed the meter voltage via a resistive divider to an analogue input of a micro and display it however you want.

... ... ... ... ...

I don't think the op will be able to get a good measurement electronics out of that except at the level of a good DVM.

* The analogue meter was just to illustrate the four conditions.  Placement of the dots was indicative (actual positions will be dependent on the math).  Try doing the same illustration with a digital one.
* Implementing a digital processing solution was always going to be the practical path.
* The concept is simple and valid
* The AC twist adds a minor complexity - resolvable in at least 3 simple ways that came to mind as I was typing this.

... but considering the direction this thread is going, I'll leave you to it.
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Detecting a closed circuit with a few complications.
« Reply #68 on: March 04, 2018, 05:32:58 am »
In the context this circuit exists in, the cables between this detector and the contactor are normally 1mm diameter copper of up to 100m.
That equates roughly 4v drop in the line.

Have you measured the actual voltage in typical operation?  "24 V" is often more like 25.6 V to start with, for one thing....  Can you check the actual voltage at the contactor in a typical sample unit and get a real idea for how much additional voltage drop you're going to be able to tolerate?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Detecting a closed circuit with a few complications.
« Reply #69 on: March 04, 2018, 09:14:50 am »
Lots of elabourate solutions have been proposed, involving opto-couplers.

Why not just use a current monitoring relay? It goes in series with the load and closes a set of switch contacts, when the current exceeds a certain threshold. The downside is, most current monitoring relays I've found are quite expensive. As this application is AC, a current transformer could be used to switch an ordinary AC voltage relay.
https://www.digikey.com/product-detail/en/littelfuse-inc/TCSH2A/F10659-ND/7931381
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: Detecting a closed circuit with a few complications.
« Reply #70 on: March 04, 2018, 12:48:09 pm »
Why not just use a current monitoring relay?

Perhaps because the state of the limit switch is required to be known when current is flowing ... and when it's not.
 

Offline Damianos

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: gr
Re: Detecting a closed circuit with a few complications.
« Reply #71 on: March 05, 2018, 06:52:59 pm »
Continuing to play on this subject, I attached one more idea!
Note: LED2 and U2 input must be connected as shown. An AC input optocoupler does not work in this circuit.

BTW: signaling minimum levels, that referred in datasheet, are relative to auxiliary contact (terminals 13 & 14), to keep it clean from corrosion.
 
The following users thanked this post: system24seven

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Detecting a closed circuit with a few complications.
« Reply #72 on: March 05, 2018, 07:03:35 pm »
Here is another one: Put a resistor in series with the GO-switch and select a resistor so that it gets heated to 60C when the solenoid is active. Then glue the resistor to Attiny85 and use the Attiny85 to measure the temperature. The temperature is "high" when solenoid is "on" and temperature is "low" when solenoid is "off". Alternatively you can use a diode or NTC/PTC as temperature sensor for the resistor and use Attiny85 to measure the voltage change across the diode/NTC/PTC. Of course you can build analog counterpart from a comparator or an op amp, but that would be too simple and old school. :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf