Adding push button to 2 way motor circuit
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
I boloxed up the words raise logic low, I just wrote it wrong, tea break back in a bit.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
Hi, I need to read up on flipflop/latch circuits, I will be back tomorrow with a circuit, press a button ...if it is down it will go up and if it is up it will go down.
Any ways back tomorrow.
Tar&stuff.
Any ways back tomorrow.
Tar&stuff.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
Hi, I don't need to wait till tomorrow.
The easiest way to do this is a quad NOR gate and two momentary switches.
That's one switch for open and one for close. If you want just one button you need a different chip and a 555 timer.
If you search ''quad NOR TTL'' on eBay and get one. Tell me the part number and I will tell you how to wire it up, you need a small price of strip board and two momentary switches.
I need the part number to wire it up, dead easy to do.
There are loads on eBay, its up to you which one you get.
Tar&stuff.
The easiest way to do this is a quad NOR gate and two momentary switches.
That's one switch for open and one for close. If you want just one button you need a different chip and a 555 timer.
If you search ''quad NOR TTL'' on eBay and get one. Tell me the part number and I will tell you how to wire it up, you need a small price of strip board and two momentary switches.
I need the part number to wire it up, dead easy to do.
There are loads on eBay, its up to you which one you get.
Tar&stuff.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
If you run a wire from +side of the batt to raise or lower inputs it will open or close, the problem is you are not using the stop controls so it will be clunky.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
It would be wise to have an on/off switch for the TTL because otherwise it will be permanently on so will flatten the battery.
If you run a wire from + batt to raise input with a button, and a wire from + batt to lower input wiith a button it will work, but the TTL is better.
Tar&stuff.
If you run a wire from + batt to raise input with a button, and a wire from + batt to lower input wiith a button it will work, but the TTL is better.
Tar&stuff.
Re: Adding push button to 2 way motor circuit
TY Pirate
I will read up on TTL !
Rainer
I will read up on TTL !
Rainer
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
I think the reason why the transistor fries is because, the collector is + and emmitter should be _ ( minus) when you short circuit the emitter is + as the base is _ and perhaps earthed ... Current flows from emmiter through base to earth, the opposite direction to which it was designed.
I suggest '' fundamentals of digital electronics'' by R Dueck. One of the best books I have ever read. TTLs are just logic gates, CMOS are also logic gates, you can make gates from transistors and resistors or relays and resistors or switches and resistors. TTLs are convenient , cheap and don't suffer from ESD problems, CMOS are difficult to handle because of ESD.
Any way I recommend the book, a bit old fashioned but digital switching is digital switching.
I paid 99p on eBay for mine, best quid I ever spent.
Best of luck with it.
Tar&stuff.
I suggest '' fundamentals of digital electronics'' by R Dueck. One of the best books I have ever read. TTLs are just logic gates, CMOS are also logic gates, you can make gates from transistors and resistors or relays and resistors or switches and resistors. TTLs are convenient , cheap and don't suffer from ESD problems, CMOS are difficult to handle because of ESD.
Any way I recommend the book, a bit old fashioned but digital switching is digital switching.
I paid 99p on eBay for mine, best quid I ever spent.
Best of luck with it.
Tar&stuff.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
Transistor
You need to open circuit either base or emmiter, if you are going to short with your switch, I said collector earlier but that was wrong,
TTL.
If you look up ''S R latch'' you will notice that it is made from 2 NOR gates, it has 2 inputs set and reset, it has 2 outputs Q and ( not Q) /Q. When Q=1(+5V).../Q= 0(0V). When you apply a 5V pulse to set Q= 1 and /Q= 0 this state holds until you pulse reset when Q changes from 1 to 0 and /Q changes from O to 1( unless its the other way around, but that's a detail, its one way or the other, no matter at this point). So if you run a wire from the batt to a momentary switch/button and from the button to set, when you press the button it sets. Run a wire from the stop 4V output to reset and when the stop limit is reached the latch is reset and Q and /Q reverse, run a wire from Q to the 5V raise input, so when you press set ...Q = 5V the transistor is switched on and the door opens, when it is open its stop output pulses reset which switches the transistor off.
Do the same with close.
A quad input NOR TTL has 4 NOR gates, that is enough to make 2 S R latches. It also has 2 pins for power on/off to the chip.
Tar&stuff.
You need to open circuit either base or emmiter, if you are going to short with your switch, I said collector earlier but that was wrong,
TTL.
If you look up ''S R latch'' you will notice that it is made from 2 NOR gates, it has 2 inputs set and reset, it has 2 outputs Q and ( not Q) /Q. When Q=1(+5V).../Q= 0(0V). When you apply a 5V pulse to set Q= 1 and /Q= 0 this state holds until you pulse reset when Q changes from 1 to 0 and /Q changes from O to 1( unless its the other way around, but that's a detail, its one way or the other, no matter at this point). So if you run a wire from the batt to a momentary switch/button and from the button to set, when you press the button it sets. Run a wire from the stop 4V output to reset and when the stop limit is reached the latch is reset and Q and /Q reverse, run a wire from Q to the 5V raise input, so when you press set ...Q = 5V the transistor is switched on and the door opens, when it is open its stop output pulses reset which switches the transistor off.
Do the same with close.
A quad input NOR TTL has 4 NOR gates, that is enough to make 2 S R latches. It also has 2 pins for power on/off to the chip.
Tar&stuff.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
You also need a couple of resistors, not sure what size off the top of my head.
Problem....
If you press both buttons at once it will fry, may be put one button at one end of the hutch and the other at the other end. I will see if I can think of a circuit to stop that, but I will have to do my homework, time and not much of it.
A problem with just buttons and no latch is that it will not do the motor any good if you hold the button on for too long.
I am thinking kids are going to be operating this!
You could put the door in a tube and a magnet on the rabbit, ( like a micro chip under the skin) when the rabbit goes in the tube the magnet close circuits a reed switch which opens the door, when its in the magnet closes a different reed switch which closes the door, you would need a different chip... The one button version.
I am thinking a one button circuit might be a better option.
Problem....
If you press both buttons at once it will fry, may be put one button at one end of the hutch and the other at the other end. I will see if I can think of a circuit to stop that, but I will have to do my homework, time and not much of it.
A problem with just buttons and no latch is that it will not do the motor any good if you hold the button on for too long.
I am thinking kids are going to be operating this!
You could put the door in a tube and a magnet on the rabbit, ( like a micro chip under the skin) when the rabbit goes in the tube the magnet close circuits a reed switch which opens the door, when its in the magnet closes a different reed switch which closes the door, you would need a different chip... The one button version.
I am thinking a one button circuit might be a better option.
-
piratepaul
- Posts: 432
- Joined: Mon May 20, 2013 2:45 pm
Re: Adding push button to 2 way motor circuit
You can do it with a single button, press on, press again for off, its quite simple but you need a few more gates, not sure what type. Back tonight.