Description: Any PIC microcontroller equipped with an ADC and sufficient memory to accommodate the program can be utilized. An LED is pulsed after each ADC acquisition to indicate the processor's activity, allowing for verification of software functionality. The LCD voltmeter files can be recompiled to examine the code operation using the built-in simulator or to modify the source code. The hex file is included in the download. The code is straightforward, demonstrating how to set up the ADC through direct control (without using built-in routines), facilitating easy portability to other compilers. It operates in a continuous loop, collecting ADC samples and displaying them on the LCD. The only complexity arises from the use of fixed-point mathematics, which avoids floating-point variables, thereby conserving memory space. Long variables are employed to scale the output results.
Note: The circuit does not supply an accurate voltage to Vref+, meaning the reading accuracy is contingent on the power supply voltage regulator (not depicted in the circuit diagram), typically a 7805 standard 5V regulator with a 5% accuracy. Consequently, the displayed output may be inaccurate by 5%. To calibrate the output for a more realistic reading, the software's scale factor can be adjusted to correspond with the 7805 output voltage value. A multimeter can be used to measure the power supply voltage (e.g., 4.91V), and instead of the 'ideal' scale factor of 50000L, it can be modified to reflect the multimeter reading, such as using the statement lng = (ADC_ip * 49100L) >> 10. This adjustment scales the maximum ADC output to 4.91V (the maximum reference value), aligning the displayed readings with the multimeter measurements. For production applications, it is advisable to incorporate a voltage reference instead of relying on the regulator for accuracy.
The circuit design involves a PIC microcontroller with an integrated ADC, which continuously samples an input voltage and displays the result on an LCD. The microcontroller is programmed to toggle an LED after each ADC reading, serving as a visual indicator of the system's operational status. The ADC is configured for direct control, bypassing built-in functions to enhance portability across different compiler environments. The fixed-point arithmetic approach is employed to manage memory constraints, particularly beneficial in applications with limited resources.
Calibration is critical for accurate voltage readings. The 7805 voltage regulator's inherent tolerance can lead to discrepancies in the displayed voltage. To achieve precise measurements, the software allows for the adjustment of the scale factor based on actual power supply readings. This ensures that the output displayed on the LCD corresponds accurately to the measured voltage, thus enhancing the reliability of the circuit in practical applications. For enhanced precision in production scenarios, the integration of a dedicated voltage reference is recommended to mitigate the effects of power supply variations.You can use any PIC microcontroller that has an ADC and enough memory to hold the program. The LED is pulsed after every ADC acquisition to indicate that the processor is alive - so you can tell if the software is active. You can recompile the lcd volt meter files if you want examine code operation (using the built in simulator) or change the source code.
Note the hex file is contained in the download. The code is simple showing how to set up the ADC using direct control (it does not use built in routines) so that the code can easily be ported to other compilers. It enters a continuous loop collecting ADC samples and displaying them on the LCD. The only complexity is that the code uses fixed point maths so that it avoids using floating point variables (saving memory space).
Long variables are used to scale the output result. Note: The circuit does not feed in an accurate voltage to Vref+ so the accuracy of the reading is only as good as the power supply voltage regulator (not shown on circuit diagram) - this will usually be a 7805 standard 5V regulator. This has an accuracy of 5% so the displayed output will be wrong by 5%. If you want to calibrate the output to get a more realistic a reading you can set the scale factor in the software to match the 7805 output voltage value.
All you do is use a multimeter to measure the power supply (mine read 4.91V) then instead of the 'ideal' scale factor of 50000L change it to match the multimeter reading e.g. for 4.91V use the statement lng = (ADC_ip * 49100L) >> 10 This scales the maximum ADC output to 4.91 (The maximum reference value) and displayed readings will now match the multimeter readings.
For production use this is not a good idea and you would be better off adding a voltage reference.
A buzzer circuit utilizes a PIC microcontroller to drive a piezo buzzer. The microcontroller is a low-power processor that is ideal for portable and compact devices where battery conservation is essential.
The buzzer circuit employs a PIC microcontroller, which serves as...
The schematic for controlling the motors is divided into three main sections, each serving a distinct function. The primary components featured in the schematic include the PIC 18F252 microcontroller, the SN754410 motor driver, and 2N2222 transistors. At the top of...
Check the following ICs: 7400, 7402, 7404, 7408, 7432, 7486. A Visual Basic program is utilized to display the results on the PC. The microcontroller AT89S52 receives the IC number from the PC, verifies the logic gates with the truth...
The display interface utilizes the ICM7218A/B in conjunction with an 8048 family microcontroller. An 8-bit data bus (DBO/DB7-IDO/ID7) facilitates the transfer of control and data information to the 7218 display interface during successive WRITE pulses. The mode input pins on...
The circuit consists of a small PIC microcontroller, assembly program, and a few other parts to detect a switch closure from an open door, window, or manual push button and then dial the cell phone number, and transmit a steady...
A PIC-based inverter circuit is being developed that utilizes two P-channel MOSFETs (F9540N) along with a center-tapped 12-0-12/230V transformer.
The proposed circuit design incorporates a microcontroller from the PIC family, which serves as the main control unit for the inverter operation....
The Skeyeball project is an ongoing initiative within the Indiana University System Design Methods Laboratory, aimed at providing graduate and undergraduate students with opportunities to engage in embedded system design and implement various projects. The downlink segment of the project...
A method for measuring static electricity for a science project was sought. An old copy of "Getting Started in Electronics" by Forrest M. Mims III was referenced for guidance.
To create a static electricity measurement circuit, a simple design can be...
The Common Mode Rejection Ratio (CMRR) facilitates the rejection of high-frequency common-mode voltages, leading to the attenuation of elevated ambient noise levels from utility lines, industrial machinery, and other sources of radiation. The circuit diagram presented illustrates the advantages of...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more