Maker Pro
Maker Pro

Logic Gates

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
Dear all,

How can I combine logic gates and what logic gates should be combined to give this type of input and output ?

Thank you.

100_7927.jpg


Is this logic combination true and can be constructed in hardware ?

060520121679.jpg


Thank you.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I would have modelled the B output as B AND (NOT A)

Note that there could be many different answers (even more than usual) because there is one input state where the output is not defined.

Your result seems correct for the three values shown.
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
I would have modelled the B output as B AND (NOT A)

Note that there could be many different answers (even more than usual) because there is one input state where the output is not defined.

Your result seems correct for the three values shown.

What does the bolded part means ?
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
I would have modelled the B output as B AND (NOT A)

Note that there could be many different answers (even more than usual) because there is one input state where the output is not defined.

Your result seems correct for the three values shown.

060520121680.jpg

060520121683.jpg


This is the circuit where I want to implement my logic gates. Is the connection correct ? It seems cant work when constructed in hardware. :(....

This circuit basically is like this :
We make a heat detector circuit which can sense two different temperature. Lets say 40 degree and 80 degree celcius. I am using one LM 35 temperature sensor. And I set the threshold of the comparator. Using two comparator and both of them having different thresold so as to triggereed the output. So, when relay on the left is ON, it will drive the DC fan with 12V to GND. When the relay on the right is on, and the relay on the left is off, it will drive the DC fan with 9V only which gives a slower speed(for lower temperature/heat). We use logic gates to ensure that when I reach around 90 degree, only the left relay in ON and the right relay is OFF. So, is the implementation of the logic correct ? Or do you have any suggestion on implement this application so can sense two different temperaturee ?


Thank you for the help
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
That seems very complicated. You could get rid of the 9V supply and the relay by putting the motor in series with a resistance and switching this with a fet fed from one of the comparators. The other comparator would switch another fet to bypass the resistance.

No other logic would be needed.

Does the motor need a stabilised supply? If you use the same supply to power the motor and the other circuitry, you may get interference from the motor.
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
I do not get what you try to say. I need to follow according to this logic now
when start the circuit, the DC fan wont move.
When reach 40 degree, the DC fan will on with slighly lower speed.
when 80 degree, the DC fan will on with higher speed.

The 80 degree with override the 40 degree,
80 degree, the fan is power by 12V
40 degree the fan is power by 9V.
And I do not want when it reaches 80 degree, the DC fan is power by 12 + 9V = 21V :)

Thats why I need some logic gates to do this right ?
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
It's weird. When I on the relay to drive the fan by 9V, the voltage at the fan is around 9. and when I on for the 12V to drive the fan and 9V is off, the fsn voltage is around 12.But when I both on the 12V and 9V to drive the fan, the voltage is around 10? Why like this ?
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
If you put 9V and 12V on one output, the supplies will fight to gain superiority. With luck, you have not damaged anything.

I attach a diagram of my idea.
One fet feeds the fan with a resistor in series and the other feeds it direct.
Please comment.

Please add a T to unsabilised!
 

Attachments

  • fan.png
    fan.png
    5 KB · Views: 543

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A simpler approach may be to place a diode in series with the two power supplies just before (or after) the relay contacts.

That will prevent either supply from loading the other one down.

You could just get away with a single diode in series with the lower voltage supply.

But yeah, using regulated voltages for this... Not typically required.

Duke37's solution is to essentially connect a resistor in series with the fan at low temperature.

Another approach is to drive the fan using PWM from a 555 at low temperature.

At high temperature, force the 555 to have a high output by either shorting the timing capacitor (pulling trigger low) or a low output by asserting reset. (Pick the correct one to turn the motor on)
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
Can I have the sample circuit ? Have no much time already.Pls help.

Thank you :)
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
060520121680.jpg


How do I make this circuit special with PIR motion sensor ? What type of special component too that I can use ? And what kind of prototype I can build ? What decoration can be included ? But most important is that my circuit is unique and functional

Thank you
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Do you have a PIR sensor?

Do you have the datasheet?

Without both, you're not going to get far.
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
How do I amplify the voltage output from the comparator so as to be input to the logic gates ? I measured that the output voltage from comparator is less than 1V, so I plan to amplify it so as the comparator output is 1(HIGH), then then logic input is 1..Any ideas ?

Thank you
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
You do not need to amplify the output of a comparator. If you only get 1V out, I assume that you have not fitted a pull-up resistor. See the circuit I posted earlier.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I have PIR sensor and the datasheet

Can you provide us with a link?

And to assist by putting everything in one place, briefly restate what it is that you want the PIR to detect, and how you want your circuit to react.
 

vick5821

Jan 22, 2012
700
Joined
Jan 22, 2012
Messages
700
You do not need to amplify the output of a comparator. If you only get 1V out, I assume that you have not fitted a pull-up resistor. See the circuit I posted earlier.

where should I add my logic gates to my maain circuit as posted above ?
 
Top