Pages: [1]   Go Down
Author Topic: Resettable circuit  (Read 472 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I currently have a circuit that controls a pump depending on the value of a sensor. If the sensor is off, the pump is on, and if the sensor is on, the pump is off. What I want to do is, if the sensor goes on, I want the pump to stay off, even if the sensor goes back to off, and wait for a reset from a momentary push button. I've tried doing some searching on how to set this up and I think the best way to do it would be with an AND gate, but I've never used one of these before so I'm not sure if that's what I need, or if there's some other easier way. I am trying to do it via hardware, as the arduino is only monitoring the status of the pump, and not actually controlling it. Thanks in advance.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to do it in hardware, you look for a JK-Flip Flop.  Perhaps a Gated Flip Flop (with Enable pin.)
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 126
Posts: 8494
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't get my head around all the ons and offs, but a D-type FF would do this I think.

sensor -> CLK
5v -> D
pushbutton -> RST
output -> Q or \Q

Let's stay with positive logic to make life simpler.

Whenever the sensor goes high it will clock the FF thus causing the output to go high. This output will stay high forever or until the button is pressed, at which time it will go low.

D-type FFs have a Q and /Q outputs so you can choose which logic suites the app.

Note JK flip flops will probably do the same thing, but I find Ds easier to think about. Also the sensor output may have to be sharpened up with a schmitt trigger or something, depends on the sensor type.

______
Rob
« Last Edit: April 20, 2011, 08:43:30 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow! Thanks for pointing me in the right direction. Although, you almost made my head explode. I kept looking up datasheets for flip flops and for some reason it just wasn't sinking in. It wasn't till I downloaded a logic circuit simulator and drew up my circuit that I finally figured out what you guys were saying. I guess I'm more of a visual learner. I'm going to order me a 74LS74 and get this wired up. Thanks again for the help.
Logged

Pages: [1]   Go Up
Jump to: