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

0 Members and 1 Guest are viewing this topic.

Offline system24seven

  • Contributor
  • 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: 8144
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: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 
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: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 
The following users thanked this post: drussell

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8144
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: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 
The following users thanked this post: tooki

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1127
  • 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: 1127
  • 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: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 358
  • 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: 1127
  • 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: 14074
  • 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.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 3528
  • 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 »
__________
BrianHG.
 
The following users thanked this post: drussell, system24seven

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1127
  • 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: 1127
  • 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: 3528
  • 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.
__________
BrianHG.
 

Offline ArdWar

  • Contributor
  • Posts: 44
  • Country: id
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

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 9327
  • 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
if something can select, how cant it be intelligent? if something is intelligent, how cant it exist?
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1127
  • 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: 1127
  • 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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf