G+_Ardi x Posted November 3, 2017 Share Posted November 3, 2017 Greetings Know How community. I have a project, where arduino needs to know if switch(DH) is whether closed or open. There is a relay (BF ) in parallel to the switch. I only need to know the position of the switch if the relay makes a connection between B and F. (The switch is car ignition and I will NOT be making any physical modifications to it. Happy to hear and discuss on your ideas?? Link to comment Share on other sites More sharing options...
G+_Ardi x Posted November 3, 2017 Author Share Posted November 3, 2017 Could opto-isolator between points B and C work? Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 3, 2017 Share Posted November 3, 2017 Can't you just code for the change in vdc or resistance on the whole circuit? Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 3, 2017 Share Posted November 3, 2017 Ardi x I guess you could use a current sensor, with a resistor across it, attached to the hot-end of the ignition coil wire. You could then turn this into a digital 1 or 0 (on/off) using a voltage comparator. I really don't see any other way to do this without "modifying" the circuits, and the above is the only way to go (the only modification you would be making is clamping a sensor to the ignition coil wire). This is an example from sparkfun: https://www.sparkfun.com/products/11005 Link to comment Share on other sites More sharing options...
G+_Black Merc Posted November 3, 2017 Share Posted November 3, 2017 ?(BF) relay coil or the contacts(switch) part? Just asking for clarifacation. Link to comment Share on other sites More sharing options...
G+_Telford Dorr Posted November 3, 2017 Share Posted November 3, 2017 If the connections between B and F are a contact closure, you would be unable to determine if the switch is closed while B-F is also closed, without modifying the circuit. You would have to do the following: - connect a diode from H to F in place of the wire connection (assuming H is battery positive and F is the switched load, anode to H, cathode to F). Closing the switch will cause the diode to conduct, powering the load. - Connect a resistor (maybe 10 kohm) from H to ground. This will pull the switch output low, even if the relay is closed, because the diode will be reverse biased. - Create a voltage divider with a couple of resistors to reduce the 14.4 volt battery voltage to below 5 volts, so an Arduino input can handle it. (You can use the 10 k resistor above as a part of the divider. When the switch is closed, the Arduino will see a digital high; when the switch is open, the Arduino will see a digital low. The diode will need to be sized to handle the load current, whatever that is. It will also add a 0.6 to 0.8 volt drop, so be sure the load can handle that. Link to comment Share on other sites More sharing options...
G+_Jason Perry Posted November 3, 2017 Share Posted November 3, 2017 If it is an option you can run your circuit into the ADC and put 2 different values of resistors between AE and CG. Then you can code for the different values on the ADC. Wait. The resistors would have to be inline with the relay and switch for that to work. Link to comment Share on other sites More sharing options...
G+_John Sullivan Posted November 4, 2017 Share Posted November 4, 2017 Based on the circuit that you provided, the Arduino can only "see" the switch at D-H when the contacts at B-F are open. Once the B-F contacts close, anything that happens beyond that connection is invisible to the Arduino. I notice that some people here are assuming that the EFGH line is above ground, but as this is an automobile circuit (you said D-H is an ignition switch), the EFGH line is chassis ground, correct? Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted November 5, 2017 Share Posted November 5, 2017 Couple questions... Is the chip in this diagram the arduino? Can you replace the switch? A double pole, double throw switch would let you read with the arduino on side while the other side completes the circuit in your diagram. https://learn.sparkfun.com/tutorials/switch-basics/poles-and-throws-open-and-closed Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 5, 2017 Share Posted November 5, 2017 I still think using a clamp-on current sensor is the best option. If the engine is running there should be current flowing through the circuit at the ignition coil/switch D-H. Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 5, 2017 Share Posted November 5, 2017 William L. DeRieux IV I agree, if a binary is needed.. wrap the wire multiple times around the doughnut Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 5, 2017 Share Posted November 5, 2017 Jon Paul Bubendorfer doughnut? You mean the ignition coil? The sensor I'm referring to is a current sensor (ie split core current transformer) https://www.sparkfun.com/products/11005 A voltage comparator could be configure to go high when the sensor detects current and low when no current is flowing. Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 5, 2017 Share Posted November 5, 2017 Yup, that's what I mean, but I'm used to totally round. Thus, "doughnut". http://www.crmagnetics.com/remote/cr2550?gclid=Cj0KCQjwyvXPBRD-ARIsAIeQeoGPvLL-4kqcnW4TaUYIlwW8I_CgTj5cVzTeFz6CZgOBMCeEX9MJ9vMaApOHEALw_wcB Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 5, 2017 Share Posted November 5, 2017 crmagnetics.com - CR2550 Low Cost Remote Current Indicator from CRMagnetics Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 5, 2017 Share Posted November 5, 2017 And of course, I always use a clamp on as well, even for large applications. We're taking the same thing. I use one to send a text to my phone when my sump pump turns on. Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 5, 2017 Share Posted November 5, 2017 Jon Paul Bubendorfer The remote current indicator you linked to would require cutting and splicing the wiring in the car to run it through the sensor and I believe that Ardi x said they didn't want to modify the car's circuit at all. (that's why I suggested the clamp-on type.) Link to comment Share on other sites More sharing options...
G+_Jon Paul Bubendorfer Posted November 5, 2017 Share Posted November 5, 2017 Ya, that was a random and not a good link. I'm with ya on clamp on. Link to comment Share on other sites More sharing options...
G+_John Sullivan Posted November 5, 2017 Share Posted November 5, 2017 William L. DeRieux IV Where would you attach the current sensor in the diagram.? The person who asked the original question said "I only need to know the position of the switch if the relay makes a connection between B and F" If you put your clamp-on sensor after the B-F contacts, once the B-F contacts close, your sensor won't read anything, regardless of whether D-H is open or closed, thus will not indicate the state of the D-H switch. Putting the clamp on sensor before the B-F connection will read current when the D-H switch closes, but will continue to read current when the B-F contacts close, regardless whether the D-H switch is open or not. Neither solution solves the person's question. Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 5, 2017 Share Posted November 5, 2017 cosmic Ray It will probably require more than 1 current sensor attached to the circuit so that it becomes a digital logic problem where you would have to come up a truth or logic table that describes the state of the relay and switch. Without modifying the circuit, the only way to know what is going on is to use external phenomenon such as reading magnetic fields from the conductors (a current sensor). I'm sure that B-F is not really a relay, but is instead the relay contacts (the part that the relay coils wither connect or disconnect) meaning that B-F is essential another switch. Detecting the state of two switches, using the above, turns this into a binary logic problem. Like I said, the options are severely limited without modifying the circuit. Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 5, 2017 Share Posted November 5, 2017 cosmic Ray Here's quick sketch of what I'm talking about: This should be the truth table with C1/C2 being current sensors, S1 is B-F, and S2 is D-H. If Ardi x (the op) wants to know the position of D-H (S2) only when B-F (S1) is closed..... The you would read current at C1/C2 like this: C1=current flow C2=no current flow D-F (S2) is open C1=current flow C2=current flow D-F (S2) is closed In other words, when D-H (s2) is open C2 will have no current flow indicated. Like wise it is closed only when C2 indicates current flow. I suppose C1 could be eliminated altogether -- remembering that C2 only read the current passing through the conductor it is attached to (and when D-H is open, this will be 0). Also, C1 could in theory be connected between the relay contacts of B-H so that you could bread current flow through it. Like I said, this is merely a binary logic problem at this point. Link to comment Share on other sites More sharing options...
G+_John Sullivan Posted November 7, 2017 Share Posted November 7, 2017 William L. DeRieux IV Hi William, thanks for the detailed explanation and the diagram with logic chart, however your logic is not correct. Your chart looks good until the last entry, which should read "closed - closed - flow - No flow". Now both line 2 and line 4 would show No flow through C2 whenever S1 is closed, which is correct. Looking back at the original diagram, (and I also am assuming that B-F are relays contacts, not the relay coil), once B-F (your S1) closes, there will be no flow past that point. B-F effectively "shorts out" the rest of the circuit. So again, once B-F closes, your S2 won't read anything, and thus won't indicate whether D-H is open or closed. S2 only works when B-F is open, which is the opposite of what the person wants. Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 7, 2017 Share Posted November 7, 2017 cosmic Ray S2 only works when B-F is open, which is the opposite of what the person wants. I only need to know the position of the switch if the relay makes a connection between B and F. If B-F closes (and based on what you said) -- the Arduino would never see D-H and this means that what Ardi x wants to do is not possible. To make this work at all...there would have to be a resistor between terminals A and B so that B-F would not be a dead short (allowing some current to flow through D-H, if it were closed). But again, this requires physical modification of the circuit. It would be beneficial to have more information about why the position of D-H is critical only when B-F closes and what this is being used for (as that info might help to determine another way to do it). As of, right now, I really can't see why the position of D-H matters, only, if B-H closes (D-H wouldn't matter at that point). Link to comment Share on other sites More sharing options...
G+_Ardi x Posted November 7, 2017 Author Share Posted November 7, 2017 Thanks to everyone for their input. I read all of your comments. I think I have found a solution, so I will make a new post tomorrow with a more detailed picture and an explanation, so you can discuss whether my idea will work or not. Link to comment Share on other sites More sharing options...
G+_John Sullivan Posted November 8, 2017 Share Posted November 8, 2017 William L. DeRieux IV Hi William. To quote you: "If B-F closes (and based on what you said) -- the Arduino would never see D-H and this means that what +Ardi x wants to do is not possible." Exactly the point I was trying to make (glad we agree on that!) As to your resistor theory, I was thinking of something similar, although I would use two resistors, one in series with the B-F switch (relay) and one in series with the D-H switch. This would give us, when both switches were closed, a parallel resistance circuit, which would allow some current through DH even when BF was closed (and which would be detected by your C2 sensor). It would also give a different current reading when BF was open and DH closed, and a zero current reading when DH was open. The three readings could be used to give a remote indication of the state of the switches. Link to comment Share on other sites More sharing options...
G+_William L. DeRieux IV Posted November 8, 2017 Share Posted November 8, 2017 cosmic Ray Putting a resistor in series with B-F / D-H would require modifying the circuit (something they said they didn't want to do) -- but I can't see any other way of doing it. I think that the requirements of this Arduino project might need to be re-evaluated. I guess we'll have to wait for Ardi x to give that more detailed explanation of what they are trying to accomplish. Link to comment Share on other sites More sharing options...
Recommended Posts