Embedded Systems B.Tech/B.E Beginner

Who needs a multimeter

[Fall 2023] Resistors are one of the most fundamental components in electrical engineering. Whether working with them in intro to circuits laboratory, or designing PCBs in industry, resistors are a critical component of any electrical design. From the surface, most resistors look the same physically, regardless of the actual resistance value. Taking a closer look, it can be seen that there are a number of parallel color bands on the resistors, together depicting the value of the resistance and a

  • Suitable forB.Tech/B.E Embedded Systems students
  • Build time4-6 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

ECE 4760 Final Project - Who needs a Multimeter?


Introduction
Resistors are one of the most fundamental components in electrical engineering. Whether working with them in intro to circuits laboratory, or designing PCBs in industry, resistors are a critical component of any electrical design. From the surface, most resistors look the same physically, regardless of the actual resistance value. Taking a closer look, it can be seen that there are a number of parallel color bands on the resistors, together depicting the value of the resistance and also potentially revealing the tolerance of the resistor.
For our final project, we built our own ohmmeter capable of giving the user information about the resistor’s resistance value through various forms of delivery. Resistors come in different band series, the most common being 3, 4, and 5 band resistors. We made an adjustable resistor LED lamp that will display the color bands of any resistor with the selected series. There is a set of buttons that can be used to switch between different band series and also to toggle audio for the system. When the audio is toggled, the instantaneous value of the resistance when the button is pressed will be output through the speaker. Finally, there is a visual display that shows the instantaneous resistance over time, the band series selected, and whether or not the audio is toggled.
High Level Design
Project Inspiration
The concept of our project is simple: to depict the properties of a resistor in various forms. We were inspired by a project by Jason Oeve called “The Great Resistor”. In his project, he uses an Arduino to create a project with a LED resistor lamp and a display for the resistance value. In order to add more complexity to our project, we added the ability to choose different resistor band series and also included an audio component. We wanted to explore the outputting of audio using DMA channels because it was a component of the RP2040 that we have not previously experimented with in the other labs this semester. We used Jason’s project as a guide for how to create the hardware of the lamp. Otherwise, the hardware and software aspects of the project were entirely created by us from scratch.
Resistor Color Coding
An important concept we explored was color coding theory used in manufacturing to recognize a resistor value. By just following the image on the right, one can notice that the color coding is based on the series at which the resistor belongs to. Depending on which series the resistor belongs to, each color band reveals certain information about the resistor with different sensibility. The main series we analyzed were three, four and five bands, as they are the most common and feasible to implement without the use of external sensors.
Series 3: the first two bands represent the first two digits of the resistance, the third band is the order of magnitude
Series 4: the first two bands represent the first two digits of the resistance, the third band is the order of magnitude, the fourth band represents the tolerance
Series 5: the first three bands represent the first three digits of the resistance, the fourth band is the order of magnitude, the fifth band represents the tolerance
For our project, we didn't implement the six band series. The 6th band in the series depicts temperature coefficient, which would be very difficult to determine empirically. This series is also not very common compared to the others. We therefore decided that for this project, it would be impractical to implement the six series option, and that could be a further implementation.
Hardware and Software Design
Hardware Design
From a hardware perspective, the project was very involved. All electronic components revolve around the RP2040, used to analyze user inputs and various data and to send commands to both LEDs and audio speakers as response to such data. The whole project can be divided into sections, which we will cover independently, each covering a specific functionality of the whole machine. One fundamental feature of our project is that it is almost entirely autonomous and independent. It is in fact powered by batteries so it can be transported anywhere without the necessity to be connected to a computer, with the only exception being the speakers which need to be powered to an outlet to function. Our system, although big in size, can be treated as a portable self-sustained machine.
Resistor Lamp and Physical Setup
The entire system is housed on a large rectangular wooden board. There are three “legs” on the bottom side of the board so that the breadboard that is hidden underneath would be suspended in the air. The frame of the resistor lamp is made out of two plastic water bottles joined together. There is a strip of 15 LEDs inside the bottle, and it is separated into sections using cut outs of circular black foam. We turned on different LEDs based on the number of bands that were selected. For example, if the user selected Series 3, the colored bands would appear on LEDs 4, 7, and 10. A large paper was wrapped around the inside of the bottles so that the light bands were easier to see. Components like the display, buttons, and lamp were secured to the wooden board using hot glue. Hot glue was a good option because it is easily removable and should not damage the components. We also included decoration LEDs around the border of the wooden board and a table with the meaning of each color of the band. Each strip of LED was connected to a GPIO on the Raspberry Pi Pico that would send the coloring data to the LEDs. The LEDs were powered with 4.5V, from the batteries. The microcontroller was also powered by the batteries using the 3V3_SYS pin.
Voltage Divider
In order to determine the resistance of the inserted resistor, the voltage divider is a critical component. We used a reference resistor with a resistance of 10kΩ. One end of this resistor is connected to 3.3V power and the other leg is connected to an alligator clip that would interface with the inputted resistor. There is another alligator clip that goes to ground. When a chosen resistor is physically clipped between the two alligator clips, in the circuit this resistor is connected between the reference resistor and ground. The node between the two resistors is the node that is probed to determine the voltage across the chosen resistor. This node is connected to a built-in ADC pin on the Pico, and this is how the microcontroller gets information about how much voltage is seen across the inputted resistor. The microcontroller takes this information and uses the following formula to calculate the approximate resistance of the chosen resistor.
$R = \frac{V_R \cdot 10 kΩ}{V_{10 kΩ}-V_R}$
where
$R$: resistance value of inputted resistor
$V_R$: voltage across resistor R
$V_{10kΩ}$: voltage across 10kΩ resistor
DAC and audio connections
Once the resistance value is calculated, software chooses the appropriate DMA channels to fire. Each DMA channel contains a unique audio file, 10 of which are the digits 0 through 9. The signals from the microcontroller are sent to the DAC using Serial Peripheral Interface (SPI). Each pin that we used on the DAC, other than the output pin, was connected to appropriate pins on the microcontroller. More specifically, SCK was connected to SCK, SDI was connected to TX, LDAC was connected to RX, CS was connected to CSn, VSS was connected to GND, and VDD was connected to 3V3_OUT. The output of the DAC is then wired to two legs of an audio jack port, which finally interfaces with the audio jack of the external speaker.
Display and Buttons
The button set was connected to four GPIO pins on the microcontroller. Pressing each button would set the pins high, which we could use that data in our code. The display is wired very similarly to the DAC, but with another set of SPI pins on the microcontroller.
Software Design
From the software perspective, the project is built upon one main file which contains all functionality of the machine. Moreover, we implemented other files that are used by our main C-file: one header and C-file for the TFT-display, one header, one C-file, and an assembly file for the LED coding, along with an assembly file used to set up the LEDs, one header file containing all the C-arrays with all the informations to reproduce the sounds. The TFT files for the display and the LED files were inspired from external sources and modified to suit our use cases. The LED assembly code was used directly from sources found on the web. The links to the original codes are reported in Appendix B.
The main C-file, named
resistor.c
, is structured as follows:
Defines, Includes and Declaration of global variables
Interrupt Service Routine (ISR)
Various Threads (buttons, LEDs, audio)
main()
Interrupt Service Routine (ISR)
In the ISR we implemented the math needed for the voltage divider explained in the hardware section. Every time it runs, we collect the voltage out from the divider. This value is originally in a certain form that is output by the ADC, but using a conversion factor we manage to store it as a voltage reading and calculate by consequence the resistance of the resistor the user inserted. From the fact that the voltage out fluctuates, the resistance calculated is also fluctuating around its nominal value. As this is done, we also release a semaphore to the display thread so that the resistance displayed is exactly the value just calculated in the ISR. When a semaphore is released, the thread which it points to gets freed and until it is called again that thread can run the code after the receiving piece of the semaphore. In this case, this semaphore allows the display thread to run the code after the receiver to completion.
Display thread
This thread displays the resistance fluctuating through time, showing the effective resistance of the user resistor at any time. In this thread we implemented t

Technologies used

RP2040Raspberry Pi PicoArduinoCAssemblySPIDMAADCDACTFTLEDBLE

Hardware components

  • RP2040
  • Raspberry Pi Pico
  • speaker
  • DAC
  • ADC

Software & tools

  • C
  • Arduino IDE

Project demo video

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.