{"id":164,"date":"2020-08-14T19:49:31","date_gmt":"2020-08-14T12:49:31","guid":{"rendered":"https:\/\/www.makeriot2020.com\/?p=164"},"modified":"2020-08-14T19:49:33","modified_gmt":"2020-08-14T12:49:33","slug":"useful-circuits-using-nand-gates-logic-gates-part-2","status":"publish","type":"post","link":"https:\/\/www.makeriot2020.com\/index.php\/2020\/08\/14\/useful-circuits-using-nand-gates-logic-gates-part-2\/","title":{"rendered":"Useful Circuits using NAND Gates &#8211; Logic Gates Part 2"},"content":{"rendered":"\n<p>In part one of this series, I showed you how to construct the basic logic gates using transistors and a few resistors. Today I will expand on that by showing you two very simple, but useful circuits, constructed with NAND gates, as well as a handful of other components.<br><br>The first circuit will be a Capacitive On\/OFF Switch, Based on the CD4011 CMOS Quad NAND Gate. I draw the circuit to function on 5v, but you can also change the relay and use it with a supply voltage of up to 12v DC<\/p>\n\n\n\n<p>Let use look at the circuit<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"724\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-1024x724.png\" alt=\"\" class=\"wp-image-165 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-1024x724.png 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-600x424.png 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-300x212.png 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-768x543.png 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/Capacitive-Switch.png 1169w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/724;\" \/><figcaption>Capacitive Switch using CD4011 CMOS Quad Nand IC<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-1.png\">Capacitive-Switch-Schematic<\/a><a href=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/Capacitive-Switch-1.png\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p>As we can see here, the two NAND gates are configured as a LATCH or R\/S Flip Flop. Touching the &#8220;ON&#8221; touch plate causes a change in the input logic, making the latch change state and switching ON the output. Touching the &#8220;OFF&#8221; touch plate, resets the latch, switching the output OFF.<br><br>You can also send the input directly to a microcontroller like Arduino. In that case you would take the output at pin 1 through a resistor to the input of the microcontroller.<\/p>\n\n\n\n<p>The circuit can also work in reverse logic, as pin 4 will be the complementary state of pin 1, thus off becomes 1 and on becomes 0<\/p>\n\n\n\n<p>Our second circuit for today is a PWM motor controller, made using 4 NAND gates, a few resistors, capacitors, diodes, a mosfet and a variable resistor.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"726\" data-src=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/PWM-Controller-1024x726.png\" alt=\"\" class=\"wp-image-167 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/PWM-Controller-1024x726.png 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/PWM-Controller-600x425.png 600w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/PWM-Controller-300x213.png 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/PWM-Controller-768x545.png 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2020\/08\/PWM-Controller.png 1169w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/726;\" \/><figcaption>PWM Motor Controller using NAND Gates<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/PWM-Controller-1.png\">PWM-Motor-Controller<\/a><a href=\"http:\/\/144.126.248.244\/wp-content\/uploads\/2020\/08\/PWM-Controller-1.png\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p>In this circuit, Nand Gate U7.1 generates the PWM frequency, as well as changes the on-off period of the PWM signal via R37, as the user turns the pot, the charge-discharge time of C1 is changed, thus altering the duty cycle of the signal.<br><br>This is thus an effective, low component way to do PWM motor control without a microcontroller.<\/p>\n\n\n\n<p>Next week, I will introduce another two usefull NAND Gate based circuits for you to try out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part one of this series, I showed you how to construct the basic logic gates using transistors and a few resistors. Today I will expand on that by showing you two very simple, but useful circuits, constructed with NAND gates, as well as a handful of other components. The first circuit will be a &hellip; <a href=\"https:\/\/www.makeriot2020.com\/index.php\/2020\/08\/14\/useful-circuits-using-nand-gates-logic-gates-part-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Useful Circuits using NAND Gates &#8211; Logic Gates Part 2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[49,45,48],"class_list":["post-164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-discrete-components","tag-electronics","tag-nand-gates"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":0,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media\/168"}],"wp:attachment":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}