Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Logic Analyzer Usage

A logic analyzer is a type of electronic test instrument that is used to capture and display signals in a digital circuit. It allows the user to see the timing and value of the signals on the circuit, which can help debug and troubleshoot the circuit. Logic analyzers are often used in conjunction with other test equipment, such as oscilloscopes and multimeters, to provide a complete picture of the behavior of a digital circuit


A logic analyzer typically connects to a PC through a USB or Ethernet interface, and the PC software reads the data from the logic analyzer by communicating with the analyzer over this interface. The software sends commands to the analyzer to configure it for the particular circuit being tested, and the analyzer sends the captured data back to the software for display and analysis. The specifics of how the software communicates with the logic analyzer will depend on the specific model of the analyzer and the software being used.


Here I will show how I have used a low cost LHT00SU1 logic Analyzer and setup it in Ubuntu



We will use PulseView as the graphical software 


PulseView is a free, open-source software application for viewing and analyzing signals from electronic circuits. It is often used in conjunction with a logic analyzer, oscilloscope, or other types of test equipment to visualize and analyze the signals in a digital circuit. PulseView is developed by Sigrok, a free and open-source project for signal analysis, and is available for Windows, Linux, and MacOS. It provides a graphical user interface for viewing and analyzing signals, and supports a wide range of devices from various manufacturers.


Sigrok and PulseView are two separate but related software projects. Sigrok is a collection of software libraries and utilities for signal analysis, and provides the underlying infrastructure for connecting to and communicating with electronic test and measurement equipment. PulseView is a graphical user interface built on top of the Sigrok libraries, and provides a convenient way for users to visualize and analyze signals from their circuits.


In order to use PulseView, you will need to have the Sigrok libraries installed, because PulseView relies on the Sigrok libraries to communicate with the test equipment and acquire the signals. Installing both PulseView and Sigrok will ensure that you have all the necessary components to use PulseView to view and analyze signals from your circuits.


To install PulseView and Sigrok in Ubuntu, you can follow these steps:


  1. Open a terminal window on your Ubuntu system.

  2. Install the Sigrok package by running the following command:

$ udo apt-get install sigrok*


  1. Install the PulseView package by running the following command:

$ sudo apt-get install pulseview


  1. Once the installation is complete, you can launch PulseView by running the following command:

$ pulseview



  1. PulseView should open and you can start using it to view and analyze signals from your electronic circuits 


You can check the connection of the Device using the following command 

Or like


To use PulseView, you will need to connect your logic analyzer or other test equipment to your computer and install the necessary drivers. Once the hardware is set up and the software is installed, you can launch PulseView and follow these steps:


  1. In PulseView, select the type of device you are using from the list of supported devices.

  2. Configure the device settings, such as the sample rate and the channels you want to capture, using the options in the Device Settings panel.

  3. Click the Start button to begin capturing signals from the circuit.

  4. Use the controls in the Signal View panel to view and analyze the captured signals. You can zoom in and out, scroll through the captured data, and apply filters and measurements to the signals.

  5. Use the controls in the Device Control panel to control the operation of the device, such as triggering the capture of a signal or setting the voltage levels on the device's outputs.

  6. Use the File menu to save the captured data or export it to another format for further analysis or sharing.


PulseView provides a number of other features and options, and you can explore the application and experiment with its capabilities to learn more about how to use it effectively. An Example Screenshot is given below 


Sigrok software Example Snippet


Surges and Spikes

Air conditioners, Refrigerators, and Elevators are high-powered equipment. This equipment has motors and compressors and they require a lot of energy to switch on and off. 

The sudden switching causes surges and spikes on the power line & if not properly handled then these can damage the device or machine. 

Power-line surges can easily reach 6,000 volts. A power surge or a spike is an increase in voltage significantly above the standard voltage of 230 volts.

A Surge lasts 3ns or more. 
A Spike lasts 1-2 ns.


Surge


Spike

In order to protect our devices from the above cases, we need to build a Surge Protector. We make it by combining 2 electronics components named Varistor & Fuse 

Varistor

A varistor is a special type of resistor that is used to protect circuits against high transient voltages. A varistor is also known as VDR ( Voltage Dependent Resistor ) 


                   



                                    
Under normal conditions the resistance of the varistor is very high. When the connected voltage gets higher than the specification of the varistor known as the Clamping voltage, the resistance immediately gets extremely low thus current starts to flow through it 

Fuse

When High current flow through a fuse it melts and makes the circuit open 


Combining the above 2 components we make a surge protector. Fuse is in series and VDR in parallel. 

surge protector

The varistor is simply connected between line and neutral but after the fuse. If the voltage across varistor exceeds it's threshold then it acts as a short circuit thereby making high current flow through the fuse which in turn gets melted and open resulting disconnection of the Appliance from the mains supply 


For 230 V mains a varistor of 275 V clamping voltage is a good choice.












                                                 








Coupling vs Decoupling

The capacitor is a basic electronic component capable of storing electric charges. It is made of an insulator attached by 2 metal plates on both sides. Today we will know about 2 important use cases of capacitors. But first a reminder, do not get confused by bringing on the concept of AC capacitor (non-polar) here. Just think that we are talking about DC capacitor (polar) only. 

Decoupling capacitors: 



Until Capacitor is fully charged Direct Current can flow through the capacitor for a short period of time. 
The idea is to use the capacitor in such a way that it shunts/is connected in parallel. 
  • They oppose quick change of voltage.
  • They are used to filter out the AC component  
  • Decoupling capacitors added to the circuit in order to smooth out the power supply voltage.
  • An alternative name is bypass capacitor. 

Coupling capacitors:

Alternating current switches it's direction with a certain interval thus making the capacitor charged and discharged. So if the capacitor is connected in Series AC will flow through the capacitor. 
  • Used to filter out the DC component of the signal
  • In analog circuits, coupling capacitors are extensively used in amplifiers. 
  • The voltage bias of a transistor is crucial for the normal operation of the amplifier. ac signal is fed to the base of a transistor where the capacitor is in series (this mode is called coupling ). 
  • The role of coupling capacitors is to prevent the incoming AC signal from interfering with the bias voltage applied to the base of a transistor.

Categories

Pages

Firmware Engineer

My photo
Works on Firmware, Embedded Linux, Smart Metering, RTOS, IoT backend

Contact Form

Name

Email *

Message *

Copyrighted by Hassin. Powered by Blogger.