{"id":117995,"date":"2023-05-05T17:24:16","date_gmt":"2023-05-05T11:54:16","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=117995"},"modified":"2024-10-08T15:51:47","modified_gmt":"2024-10-08T10:21:47","slug":"adc-and-dac-trainer-tool-kit","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/adc-and-dac-trainer-tool-kit","title":{"rendered":"ADC and DAC Trainer Tool Kit"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-107020 alignright\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/10\/efy-tested-1.jpg\" alt=\"efy tested\" width=\"155\" height=\"155\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/10\/efy-tested-1.jpg 155w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/10\/efy-tested-1-150x150.jpg 150w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/10\/efy-tested-1-50x50.jpg 50w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/10\/efy-tested-1-100x100.jpg 100w\" sizes=\"auto, (max-width: 155px) 100vw, 155px\" \/><\/p>\n<p>Most trainer kits available in the market start showing wrong results after a few years of usage due to the aging of components. This ADC-DAC Trainer tool would work accurately for many more years.<\/p>\n<p>Analog-to-digital converters (ADC) and digital-to-analog converters (DAC) are integral parts of data processing and widely used industrial and household electronic devices. Different conversion methods include resistor ladder, binary weightage, and cascaded op-amp.<\/p>\n<p>The project uses Arduino IDE as the software development platform, so the trainees can perform ADC and <a href=\"https:\/\/www.electronicsforu.com\/videos-slideshows\/videos\/digital-analog-converter-dac\">DAC<\/a> experiments as well as get an idea about the configurations of ADC and DAC in Arduino. The main advantages of Arduino software are easy editing and debugging.<\/p>\n<h3>POC Video Tutorial in English:<\/h3>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/N5v-rQODEbM\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h3 style=\"text-align: left;\">POC Video Tutorial in Hindi:<\/h3>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/2UqQyQNLZsU\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h2 style=\"text-align: left;\"><strong>ADC-DAC Trainer Circuit Diagram<\/strong><\/h2>\n<p style=\"text-align: left;\">Fig. 1 shows the circuit diagram of the DAC-ADC trainer. The circuit consists of an ATmega328P microcontroller interfaced with a 20&#215;4 LCD module and I2C module, 8-bit LED digital word display\/generator, voltage regulator, voltage divider circuit for ADC input, and nine switching diodes, besides some discrete components such as resistors and capacitors.<\/p>\n<p style=\"text-align: left;\">The ATmega328P microcontroller used in Arduino Uno has six inbuilt ADCs with 10-bit resolution and six DACs with an 8-bit resolution that uses pulse width modulation (PWM) for DAC conversion. The Arduino IDE is known to be the most popular and cost-effective software development platform.<\/p>\n<figure id=\"attachment_118000\" aria-describedby=\"caption-attachment-118000\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-118000 size-full\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer.jpg\" alt=\"ADC-DAC Trainer Circuit Diagram\" width=\"1200\" height=\"620\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer.jpg 1200w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer-500x258.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer-1024x529.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer-696x360.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer-50x26.jpg 50w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig.-1-Circuit-diagram-of-the-trainer-100x52.jpg 100w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-118000\" class=\"wp-caption-text\">Fig. 1: Circuit diagram of the ADC-DAC trainer<\/figcaption><\/figure>\n<p style=\"text-align: left;\">This circuit using the ATmega328P microcontroller can be seen at www.arduino.cc. The ADC input can be from any of the six inbuilt ADCs in the chip.<\/p>\n<p style=\"text-align: left;\">In the circuit, the 9V-0-9V AC output of 230V AC step-down transformer X1 is rectified by diodes D11 and D12 and smoothened by capacitors C1 and C2. This 9V DC is connected to the input of regulator IC 7805, which converts it into 5.6V through diode D9. Diode D10 converts it to 5V, which is used as a positive supply to the circuit. Filter capacitors C3, C4, and C5 smoothen the supply voltage.<\/p>\n<p style=\"text-align: left;\">During operation, the power supply may fall slightly below 5V. The ADC input is connected from a 5.6V supply rail to calibrate the maximum ADC input to exactly 5V using pot VR2. Zener diode ZD1 is connected as protection for the ADC pin.<\/p>\n<p style=\"text-align: left;\">The circuit mainly works in two modes, ADC and DAC. When switch S10 is on, the device operates in DAC mode. When the switch is off, it toggles to ADC mode.<\/p>\n<p style=\"text-align: left;\">Diodes D1-D8 are used to show exact data generated by the microcontroller in ADC mode. Improper selection of switch S1-S8 in this mode may cause to light up improper LEDs. The protection diodes D1-D8 prevent the supply from the microcontroller to the common supply rail of DAC input and ensure proper LEDs light up.<\/p>\n<h2 style=\"text-align: left;\"><strong>ADC-DAC Trainer PCB<\/strong><\/h2>\n<p style=\"text-align: left;\">The I2C module and 20&#215;4 LCD are used for hardware simplicity. The controller SCL and SDA pins (A4 and A5 of I2C) are connected to the PC5 and PC4 pins of IC2. The ATmega328P runs at an oscillator frequency of 16MHz because crystal XT1 and capacitors C6 and C7 act as decoupling capacitors.<\/p>\n<figure id=\"attachment_118003\" aria-describedby=\"caption-attachment-118003\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-118003 size-full\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-2-Actual-size-PCB-of-trainer-2.jpg\" alt=\"ADC-DAC Trainer PCB layout\" width=\"600\" height=\"370\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-2-Actual-size-PCB-of-trainer-2.jpg 600w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-2-Actual-size-PCB-of-trainer-2-500x308.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-2-Actual-size-PCB-of-trainer-2-50x31.jpg 50w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-2-Actual-size-PCB-of-trainer-2-100x62.jpg 100w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-118003\" class=\"wp-caption-text\">Fig. 2: Actual-size PCB of trainer<\/figcaption><\/figure>\n<p style=\"text-align: left;\">Resistors R1-R9 are current-limiting resistors for respective LEDs. LED9 is for power-on indication and switch S9 is the power-on\/off switch. Resistor R11 and capacitor C8 convert the PWM DAC output to normal DC voltage. As per the datasheet of ATmega328P, capacitors C9, and C10 should be connected as near as possible to the power pins of the controller chip during assembly.<\/p>\n<figure id=\"attachment_118004\" aria-describedby=\"caption-attachment-118004\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-118004 size-full\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-3-Component-layout-of-the-PCB.jpg\" alt=\"DAC-ADC Trainer Component layout of the PCB\" width=\"600\" height=\"368\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-3-Component-layout-of-the-PCB.jpg 600w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-3-Component-layout-of-the-PCB-500x307.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-3-Component-layout-of-the-PCB-50x31.jpg 50w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2023\/04\/Fig-3-Component-layout-of-the-PCB-100x61.jpg 100w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-118004\" class=\"wp-caption-text\">Fig. 3: Component layout of the PCB<\/figcaption><\/figure>\n<p style=\"text-align: left;\">The software is written in Arduino C language Sketch and is well explained in the code. The software uses a special technique of employing a single port for input and output, which may be called port manipulation. Special libraries used in the software are Liquid <em>cystalI2C.h<\/em> and <em>wire.h<\/em>. Their installation process is available at online sites.<\/p>\n<h2 style=\"text-align: left;\"><strong>Construction and Testing<\/strong><\/h2>\n<p style=\"text-align: left;\">Download Arduino IDE from <em>www.arduino.cc<\/em> and complete the installation process. Open Arduino IDE and install the libraries. Download the source code file and compile Sketch using Arduino IDE. Connect Arduino Uno to your computer and select the proper port and board. Upload Sketch (<em>ADCDAC_Sketch.ino<\/em>). For further information, visit <em>www.arduino.cc<\/em><\/p>\n<p style=\"text-align: left;\">Assemble all the components on a general-purpose PCB with a proper soldering iron. An actual-size, single-side PCB layout for the trainer circuit is shown in Fig. 2 and its component layout in Fig. 3. Make all the wiring as per the circuit diagram (see Fig. 1). Cross-check for any wrong connections. Remove the programmed ATmega 328P IC from Arduino and insert it in its socket (ensure proper orientation).<\/p>\n<p style=\"text-align: left;\">(<em><strong>Note.<\/strong><\/em> I2C module and 20&#215;4 LCD need to be connected externally using jumper wire as their footprints are not given in the PCB layout.)<\/p>\n<div class=\"mepr_error\"><div class=\"locked-content\">\n<b>EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.<\/b><\/p>\n<p>Oops! This is an EFY++ article, which means it's our Premium Content. You need to be a Registered User of our website to read its complete content.<\/p>\n<p><b>Good News: <\/b>You can register to our website for FREE! <a href=\"https:\/\/www.electronicsforu.com\/plans\/subscription-plans\" target=\"_blank\" rel=\"noopener\">CLICK HERE<\/a> to register now.<\/p>\n<p><b>Already a registered member? <\/b>If YES, then simply login to you account below. (TIP: Use 'forgot password' feature and reset and save your new password in your browser, if you forgot the last one!)\n<\/div>\n<\/div><div>\n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/www.electronicsforu.com\/login\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/117995\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n      <a href=\"https:\/\/www.electronicsforu.com\/login?action=forgot_password\">Forgot Password<\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Most trainer kits available in the market start showing wrong results after a few years of usage due to the aging of components. This ADC-DAC Trainer tool would work accurately for many more years. Analog-to-digital converters (ADC) and digital-to-analog converters (DAC) are integral parts of data processing and widely used industrial and household electronic devices. [&hellip;]<\/p>\n","protected":false},"author":26281,"featured_media":118000,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,6070,2119,3713],"tags":[130,1985,110,83,10413,240],"class_list":{"0":"post-117995","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-advanced-projects","10":"category-diy-projects-video-tutorials","11":"category-premium","12":"tag-digital-electronics-projects","13":"tag-diy-projects","14":"tag-electronics-projects","15":"tag-featured","16":"tag-may-2023","17":"tag-tutorial"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/117995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/26281"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=117995"}],"version-history":[{"count":1,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/117995\/revisions"}],"predecessor-version":[{"id":144953,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/117995\/revisions\/144953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/118000"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=117995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=117995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=117995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}