Turning circuit on with push button and other boolean decisions - Page 1
Forum section: electronics / beginners

author: THATguy
author_rank: Regular Contributor
timestamp: October 17, 2016, 06:44:41 am
content: I have a push button, how would I set this up to activate the circuit.Also once this circuit is going, I want it to shutdown when X current is detected.I suppose I'll do this with transistors?I do understand boolean logic gates and creating them from transistors.Just to be clear, the button doesn't lock down into ON position (current only flows while the button is held).

author: Ian.M
author_rank: Super Contributor
timestamp: October 17, 2016, 06:57:48 am
content: Probably a MOSFET to switch power to the circuit, some sort of flip-flop to remember if the button has been pushed, and a current sense resistor and some sort of comparator to generate a reset signal for the flip-flop. It gets a bit trickier if you need the same button to act as a toggle.

author: danadak
author_rank: Super Contributor
timestamp: October 17, 2016, 10:16:34 am
content: What is the Vcircuit and Icircuit needed ?What is the accuracy of the measured current needed ?Do you use UPs or just discrete circuits as a general practice ?Regards, Dana.

author: Ammar
author_rank: Regular Contributor
timestamp: October 17, 2016, 11:04:26 am
content: Do you want it to latch on when the momentary button is pressed and then shut of if the current reaches a threshold OR stay on while the momentary button is pressed and only turn off if it reaches a current threshold?

author: grifftech
author_rank: Frequent Contributor
timestamp: October 17, 2016, 02:57:53 pm
content: bodge a click pen to hold the button

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 06:24:15 am
content: Yes Discrete circuit. I want to keep this circuit as small as possible.Vcircuit & Icircuit?The button only needs to get the circuit going. Then the current will go along a different route.Perhaps it charges a cap that makes a some sort of resistance greater on the button circuit, which then causes the current to keep flowing into the main circuit, until it turns it's self off (by discharging the cap, and increasing the main circuit resistance, so the circuit is now waiting for the button circuit). See, I'm probably over complicating this. Or yes Mosfet might be easier.Ideally I want the circuit to run about 1.5v, but could be 3v.I'll need to measure millivolts.

author: Ammar
author_rank: Regular Contributor
timestamp: October 19, 2016, 06:59:00 am
content: If this is for an application I would suggest a low power MCU that wakes up upon pin change. It would then read whatever voltage/current you want with an ADC and then go back to sleep when done.Is this out of interest or for an assignment?

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 07:10:47 am
content: I made a diagram.Hope this gives you a better idea of what I'm trying to build and what components are required.The A? might need to be more than one component or have additional parallel wire path within.The same goes for B?.

author: Ammar
author_rank: Regular Contributor
timestamp: October 19, 2016, 07:34:39 am
content: I would be glad to help, much like many others on the forum. However, it would be great to know whether this is for an assignment or out of interest as a hobbyist.If it is for an assignment I would focus on helping you answer the question. If it were out of personal interest, I would let you know things like using Z and Y for labeling wires in your diagram is really confusing as these are used to denote impedance and admittance respectively. I would help you refine your question. But you really need to be more clear about your application and what you are trying to achieve.

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 08:32:39 am
content: It is for a circuit I'm acutally building. Not an assignment.The sensor measures an environmental property and gives out a differing voltage.When the set millivoltage is detected then something shuts the circuit down.I've updated the diagram, hope that helps you get to grips with my design.I don't mind if you can't give me both A and B. If you only have a solution for one, that is fine.I looked at flip flop, but that requires two switches and two power sources. Or a switch that has two states.I require a temporary on state switch (push spring button).

author: jonovid
author_rank: Super Contributor
timestamp: October 19, 2016, 08:37:13 am
content: ok so this is a latching relay type thing, switch on = latch stay on that will change state So when the switch returns to off , the next action is resetting the latch to the off state. (but IF =latch on )and ( A = above threshold set ) then (set latch to the off state ) 0=0=reset. do you need a pilot circuit? running? acts like a circuit breaker? pops off if A = above threshold ?

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 08:38:46 am
content: woops forgot to upload the updated diagram

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 08:54:59 am
content: Quote from: jonovid on October 19, 2016, 08:37:13 amTaking a quick look at some switching relays.Don't understand where the switch off power comes from, or why the first circuit is even there?I don't get this one, can't figure out where the power is flowing. [oh this is AC, that's probably why]Perhaps I've made my question too complicated.If someone can give me an idea of how to solve this diagram, perhaps that will give me an idea of how to solve the entire thing.

author: jonovid
author_rank: Super Contributor
timestamp: October 19, 2016, 09:09:42 am
content: Quoteok from the circuit output the relay takes over the power on. other button is the reset, others may have a better understanding about this type of circuit in TTL logic .as a hobbyist I would experiment to see what works .

author: Ian.M
author_rank: Super Contributor
timestamp: October 19, 2016, 09:21:51 am
content: You haven't made it too complicated, but your diagrams suck. For a block diagram, you need to string together the following modules:* a power source* a load* an electronically controlled switch or relay - probably implemented as a transistor or MOSFET. The actual circuits will tend to be simpler if its between the load and the -ve side of the power source.* a current sensor - probably implemented as a low value resistor with the voltage drop across it amplified. Again the circuit will be a lot simpler if one end of the shunt directly connects to the -ve side of the power source.* a pushbutton switch. Unless there is a specific requirement otherwise, it gives us more options if both its terminals go to the control block.* an as yet unspecified control block that takes the signals from the current sensor and the pushbutton switch and provides an output to the electronic switch. It needs power and ground connections to do its job, but if standby current is a problem, you may choose to let the button supply its initial power then take its operating power from after the electronic switch which would then need to be on the high side of the load.-----Remember, current can only flow in complete loops.Also the voltages and currents involved make a lot of difference in the practical implementation so its best to state their approximate values at the outset.

author: THATguy
author_rank: Regular Contributor
timestamp: October 19, 2016, 10:05:18 am
content: Quote from: Ian.M on October 19, 2016, 09:21:51 amYou're correct. I should have made my A, B, & M boxes a different colour from the wire.I did have a power source - battery, there is a symbol on the left.The load would have been in A, B, or M - resistor, or something.Quote from: Ian.M on October 19, 2016, 09:21:51 amI need to study how these work, to understand that.Quote from: Ian.M on October 19, 2016, 09:21:51 amI don't know how to amplify the voltage across it, or what a shunt is.Quote from: Ian.M on October 19, 2016, 09:21:51 amSorry, did not know there was a specific push button switch symbol.Quote from: Ian.M on October 19, 2016, 09:21:51 amYes, ideally I do not want current to be used in standby mode.I've updated my diagram, hope it is a bit clearer.

author: Ian.M
author_rank: Super Contributor
timestamp: October 19, 2016, 10:12:32 am
content: No. show each module I listed as a SEPARATE block or symbol, with all the interconnections you think they will need, and if you use a block for any module, each of its 'pins' labelled. We don't care about colours or arrows on wires, and we don't need three images of the same circuit as you have already specified the conditions under which load current shall flow.

author: Ammar
author_rank: Regular Contributor
timestamp: October 20, 2016, 04:15:28 am
content: Can you post a part number or data sheet for the sensor you are using?

author: THATguy
author_rank: Regular Contributor
timestamp: October 20, 2016, 05:51:41 am
content: I'm going to have a go at figuring out A. [see attached diagram]I'm not sure if this will work. Perhaps the capacitor plate can't charge up because of the resistor?Maybe the second state of the circuit cannot keep the capacitor charged up?

author: Ian.M
author_rank: Super Contributor
timestamp: October 20, 2016, 06:34:38 am
content: Cant work. All the switch does is short out the capacitor, but the diode blocks any current from flowing. If you remove the parts that cant do anything (diode, capacitor, switch), all you are left with is a 1.5V cell, a resistor and a bulb in series. Incidentally, the resistor cant have 1.6V across it if the battery is 1.5V. It will settle at a voltage less than the battery voltage, such that the voltage across it plus the voltage across the bulb sum to the battery voltage.Here's the sort of diagram I had in mind:The block labelled 'Control' would turn on 'out' as soon as power was applied and turn it off again when the signal 'in' from the current sensor reaches the threshold you specify.To go further we would need to know the supply voltage, the normal load current, and also the fault current you want to trip (turn off) at.

author: THATguy
author_rank: Regular Contributor
timestamp: October 20, 2016, 08:18:37 am
content: Awesome.What components are those Vcsw and Icsw symbols??I'll set up my circuit and see what voltages I'm using then get back on here.Thanks.

author: Ian.M
author_rank: Super Contributor
timestamp: October 20, 2016, 08:53:55 am
content: They are theoretical simulator blocks that could each be realised with one or more real-world components. E.g. VCSW1 is a voltage controlled switch and could be implemented by a pair of MOSFETs + a pullup resistor, and IcVs1 is a current controlled voltage source and could be implemented by a current shunt resistor, an OPAMP and a couple more resistors to set its gain. though the OPAMP would also need a supply feed. They could also be implemented as single components or prebuilt modules, e.g a relay and Sparkfun'samplified ACS712hall effect current sensor breakout board.The purpose of the schematic was not to give you something to build but to get you thinking about the circuit topology you need so you can effectively communicate your requirements to us to get valid suggestions for something buildable.