Author Topic: Turning circuit on with push button and other boolean decisions  (Read 6614 times)

0 Members and 1 Guest are viewing this topic.

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Turning circuit on with push button and other boolean decisions
« on: October 17, 2016, 06:44:41 am »
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).
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Turning circuit on with push button and other boolean decisions
« Reply #1 on: October 17, 2016, 06:57:48 am »
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.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Turning circuit on with push button and other boolean decisions
« Reply #2 on: October 17, 2016, 10:16:34 am »
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.

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

Offline Ammar

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Turning circuit on with push button and other boolean decisions
« Reply #3 on: October 17, 2016, 11:04:26 am »
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?
 

Offline grifftech

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: us
    • youtube channel
Re: Turning circuit on with push button and other boolean decisions
« Reply #4 on: October 17, 2016, 02:57:53 pm »
bodge a click pen to hold the button :D
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #5 on: October 19, 2016, 06:24:15 am »
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.
 

Offline Ammar

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Turning circuit on with push button and other boolean decisions
« Reply #6 on: October 19, 2016, 06:59:00 am »
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?
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #7 on: October 19, 2016, 07:10:47 am »
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?.
 

Offline Ammar

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Turning circuit on with push button and other boolean decisions
« Reply #8 on: October 19, 2016, 07:34:39 am »
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.
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #9 on: October 19, 2016, 08:32:39 am »
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).
« Last Edit: October 19, 2016, 08:38:09 am by THATguy »
 

Offline jonovid

  • Super Contributor
  • ***
  • Posts: 1436
  • Country: au
    • JONOVID
Re: Turning circuit on with push button and other boolean decisions
« Reply #10 on: October 19, 2016, 08:37:13 am »
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 ?
« Last Edit: October 19, 2016, 08:52:13 am by jonovid »
Hobbyist with a basic knowledge of electronics
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #11 on: October 19, 2016, 08:38:46 am »
woops forgot to upload the updated diagram
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #12 on: October 19, 2016, 08:54:59 am »
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.
Taking 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.
« Last Edit: October 19, 2016, 08:57:30 am by THATguy »
 

Offline jonovid

  • Super Contributor
  • ***
  • Posts: 1436
  • Country: au
    • JONOVID
Re: Turning circuit on with push button and other boolean decisions
« Reply #13 on: October 19, 2016, 09:09:42 am »
Quote
Don't understand where the switch off power comes from
  ok 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 .
« Last Edit: October 19, 2016, 09:31:26 am by jonovid »
Hobbyist with a basic knowledge of electronics
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Turning circuit on with push button and other boolean decisions
« Reply #14 on: October 19, 2016, 09:21:51 am »
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.
« Last Edit: October 19, 2016, 09:25:03 am by Ian.M »
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #15 on: October 19, 2016, 10:05:18 am »
You haven't made it too complicated, but your diagrams suck.
You'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.

* 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.
I need to study how these work, to understand that.

* 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.
I don't know how to amplify the voltage across it, or what a shunt is.

* a pushbutton switch.  Unless there is a specific requirement otherwise, it gives us more options if both its terminals go to the control block.
Sorry, did not know there was a specific push button switch symbol.

* 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.
Yes, ideally I do not want current to be used in standby mode.

I've updated my diagram, hope it is a bit clearer.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Turning circuit on with push button and other boolean decisions
« Reply #16 on: October 19, 2016, 10:12:32 am »
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.
 

Offline Ammar

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Turning circuit on with push button and other boolean decisions
« Reply #17 on: October 20, 2016, 04:15:28 am »
Can you post a part number or data sheet for the sensor you are using?
 

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #18 on: October 20, 2016, 05:51:41 am »
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?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Turning circuit on with push button and other boolean decisions
« Reply #19 on: October 20, 2016, 06:34:38 am »
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.
 
The following users thanked this post: THATguy

Offline THATguyTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: nz
Re: Turning circuit on with push button and other boolean decisions
« Reply #20 on: October 20, 2016, 08:18:37 am »
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Turning circuit on with push button and other boolean decisions
« Reply #21 on: October 20, 2016, 08:53:55 am »
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's amplified ACS712 hall 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.
« Last Edit: October 20, 2016, 09:02:07 am by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf