Electronics Design

The assignments for this week:

Group assignment:

Electronics Design



Exploring Electronic world

This week is something quite new for me. If you are like me, who uses electronic gadgets comfortably and have no idea of how it works, come join me....lets explore this new world together.
The first day of the week, our instructior, Saheen started by introducing us to different test machines.In the world of electronics, there are several indispensable tools that every beginner should acquaint themselves with. Whether you're just starting out on your electronic journey or looking to deepen your understanding, getting to know tools like multimeters, logic analyzers, clamp meters, and oscilloscopes is crucial. Let's delve into each one, breaking down their purpose and functionality.

Multimeter:

Think of a multimeter as your all-in-one tool for measuring various electrical parameters. It's like having a Swiss Army knife in your toolbox. With a multimeter, you can measure voltage, current, resistance, and sometimes even more. It's perfect for troubleshooting circuits, checking battery voltages, and testing components like resistors and diodes. Multimeters come in analog and digital variants, with digital ones being more common due to their ease of use and accuracy.

DC Lab Bench Power Supply:
  • A DC lab bench power supply allows you to adjust the output voltage to suit your needs. You can dial it in with precision.
  • Many lab bench power supplies also offer current limiting capabilities. This means you can set a maximum current limit to protect your circuits from accidental damage due to overcurrent.
  • Some lab bench power supplies come with multiple output channels, allowing you to power multiple circuits simultaneously. This is particularly useful when working on complex projects with multiple components.
  • A lab bench power supply provides a regulated output voltage, ensuring that the voltage remains stable even as the load changes. This stability is crucial for testing and troubleshooting electronic circuits.

    Function Generator: A function generator is used to generate various types of electrical waveforms.
  • Waveform Generation: A function generator can produce a wide range of waveforms, including sine waves, square waves, triangular waves, and more. Each waveform has its unique characteristics and is used for different purposes in electronic circuits.
  • Frequency Control: Just like the lab bench power supply allows you to control voltage, a function generator allows you to control the frequency of the output waveform. This flexibility is essential for testing the frequency response of circuits and components.
  • Amplitude Adjustment: In addition to frequency control, many function generators also allow you to adjust the amplitude (voltage) of the output waveform. This enables you to simulate different signal levels and test the performance of your circuits under varying conditions.
  • Modulation Capabilities: Some function generators offer modulation capabilities, allowing you to modulate the amplitude, frequency, or phase of the output waveform. This is useful for simulating modulation techniques used in communication systems.

  • Logic Analyzer:

    In the digital realm of electronics, understanding how signals behave is crucial. This is where a logic analyzer comes into play. Imagine it as a detective that helps you unravel the mysteries of digital signals. A logic analyzer captures and analyzes digital signals, allowing you to visualize their behavior over time. It's invaluable for debugging digital circuits, decoding communication protocols and ensuring that your digital systems are working as intended.

    Clamp Meter:

    Measuring current in a circuit used to be a tricky affair, requiring you to break the circuit and insert a meter in series. Enter the clamp meter, a game-changer for current measurement. Its unique design allows you to measure current without breaking the circuit. Simply clamp it around a wire, and voila! You can measure AC or DC current flowing through that wire. Clamp meters are indispensable for electricians, technicians, and hobbyists working with electrical systems.

    Oscilloscope:

    Ever wanted to see how electrical signals look like in real-time? That's where an oscilloscope comes in handy. Think of it as a window into the world of electrical signals. An oscilloscope displays voltage signals as waveforms on a screen, allowing you to visualize their amplitude, frequency, and shape. It's like watching the heartbeat of your circuit in action. Oscilloscopes are essential for troubleshooting circuits, analyzing waveforms, and designing electronic circuits.

    Whether you're measuring voltages with a multimeter, decoding digital signals with a logic analyzer, measuring current with a clamp meter, or visualizing waveforms with an oscilloscope, each tool plays a vital role in understanding and working with electronics.

    Ohm's Law

    Ohm's Law is a fundamental principle in electronics that describes the relationship between voltage, current, and resistance in an electrical circuit.
    Voltage (V): Voltage is the measure of electrical potential difference between two points in a circuit. It's like the "push" that moves electrical charge through a circuit. Voltage is measured in volts (V).
    Current (I): Current is the flow of electrical charge through a conductor. It's like the "flow" of water through a pipe. Current is measured in amperes (amps, A).
    Resistance (R): Resistance is the property of a material that opposes the flow of electrical current. It's like the "narrowness" of a pipe, which makes it harder for water to flow through. Resistance is measured in ohms (Ω).
    To understand this better, Saheen showed us an image:


    Ohm's Law tells us that the voltage across a component in a circuit (V) is equal to the product of the current flowing through the component (I) and the resistance of the component (R). In other words:

    PCB milling

    Using the traces mentioned above, I milled the PCB in the Modela using the same procedures mentioned in Week 4 - Electronics Production week

    Soldering

    I collected the required components from the fablab inventory.

    Here again, soldering was done using the same procedures followed in Week 4 - Electronics Production week

    Programming the board

    We should update the firmware on the electronics board to enable it to function as a programmer. For this, the documentation from Quentorres
  • Firstly, I download the firmware file, referred to as a uf2 file, from the provided link. This file contains the necessary instructions to enable the board to perform its intended function.
  • Using a USB cable, I connect the electronics board to my computer. This establishes a connection that allows me to transfer the firmware file onto the board.
  • To prepare the board for the firmware update, I press the "boot" and "reset" buttons simultaneously. This action initiates a reset mode, akin to rebooting a computer, making the board ready to receive new instructions.
  • With the board in reset mode, it appears as a removable hard drive on my computer. I simply drag and drop the downloaded uf2 firmware file onto this virtual drive, effectively transferring the firmware onto the board.
  • Following the firmware transfer, the board automatically resets itself. This step ensures that the newly installed firmware is activated and ready for use.
  • After the reset, I confirm that the board is functioning correctly by checking that it appears as a connected USB device on my computer. This verification step ensures that the firmware update was successful and the board is ready to be utilized as a programmer.




  • Problems faced during this

  • I had not provided a pin for 5V and so I soldered a pin on the Proshplay as indicated below:


  • The port was not being detected in the Arduino IDE.
  • During debugging, it was found that one of the connections was shorted due to a soldering mistake.
  • Corrected the shorted connection and tried again, but the issue persisted.
  • Discovered that the DP (Data Positive) and DM (Data Negative) lines were interchanged in the PCB design, despite the schematic being correct. The issue was traced back to a problem with the library of the USB Type-C connector used in the design.
  • Since the PCB milling had already been completed, a redesign was not possible. To resolve the issue, the connections were cut and jumper wires were added to correctly route the DP and DM lines
  • The corrected board:

    To check the LED blink

          void setup() {
            // initialize digital pin LED_BUILTIN as an output.
            pinMode(2, OUTPUT);
        
          }
          
          // the loop function runs over and over again forever
          void loop() {
            digitalWrite(2, HIGH);  // turn the LED on (HIGH is the voltage level)
            delay(1000);             // wait for a second
            digitalWrite(2, LOW);   // turn the LED off by making the voltage LOW
            delay(1000);             // wait for a second
           
          }
        


    To check whether the LED blinks when you push the button

        const int buttonPin = 9;  // the number of the pushbutton pin
        const int ledPin_1 = 2;   // the number of the LED pin 1
        
        int buttonState = 0;  // variable for reading the pushbutton status
        bool pressed = false;
        void setup() {
          pinMode(ledPin_1, OUTPUT);  // initialize the LED pin1 as an output:
        
          pinMode(buttonPin, INPUT);  // initialize the button pin as an input:
        }
        void loop() {
          buttonState = digitalRead(buttonPin);  // read the state of the pushbutton value:
          if (buttonState == HIGH)               // check if the pushbutton is pressed. If it is, the button state is HIGH:
          {
            if (pressed == false) {
              pressed = true;
              if (digitalRead(ledPin_1) == LOW)  // check whether the led1 is off, if it is then the LEDs will be HIGH
              {
                digitalWrite(ledPin_1, HIGH);
        
        
              } else {  // if led1 is on then it will turn off all the LEDs
                digitalWrite(ledPin_1, LOW);
              }
            }
          } else {
            pressed = false;
            delay(50);
          }
        }
    

    3D printing a case for the PCB

    I exported the .SVG file from KiCad into Fusion and I designed a case and 3d printed it. Unfortunately, it was slightly smaller than the PCB. But atleast I can use it as a platform for my PCB.





    Design files

    kiCad files
    PNG file1
    PNG file2
    Arduino files