Summary

These notes cover mechatronics lectures 1-6, including topics on sensors, control systems, digital and analog systems, microcontrollers, and Arduino. The notes provide a basic introduction to fundamental concepts and applications.

Full Transcript

Lecture 1. - Sensor provide data to control system to make decisions - Sensors detect physical parameters - Sensors use electrical signals like voltage or current to describe signals from the physical world - Control systems use linear, time-invariant math models to repre...

Lecture 1. - Sensor provide data to control system to make decisions - Sensors detect physical parameters - Sensors use electrical signals like voltage or current to describe signals from the physical world - Control systems use linear, time-invariant math models to represent physical nonlinear varying systems with uncertainties and disturbances - Control systems should be simple, reliable and accurate by this is hard - SISO - single input single output, MIMO multiple input multi output - An actuator is a device employed by a control system to alter or adjust the environment (motors) - An actuator allows physical movement by transforming energy into mechanical force - Input -> Error Detector - > Controller -> actuator -> process -> Output -> sensor - Example of open loop (microwave, DC motor) - Example of closed-loop (person steering a car by looking at the road markings) - Disturbance rejection is often an external input in a controller diagram as external correcting is applied Lecture 2: - Digital systems are more flexible and easy to maket/mass produce - Analog systems are less complex and more reliable for applications like fail-safes - Digital systems are becoming cheaper, and smaller, consume less energy, and compute more power - these are driving forces in engineering - A microprocessor (CPU) is a single processor core that supports at least instruction fetching, and decoding data and executing commands - Needs input and output - A microprocessor is a part of a microcontroller - Microcontrollers normally has a single processor core, memory blocks, digital IOs, Analog IOS, and other basic peripherals - Microcontrollers combine all the necessary elements (such as input, output and memory) to allow the microprocessor to process it - Arduino is open source microcontroller that uses C/C++, it is low-cost and powerful - Arduino has analog pins as well as digital pins - Analog signals are like a sine wave, and digital signals are square waves - Adding shields can increase the amount of pins - Raspberry pi is a microcomputer that has an os, it uses ethernet, USB, micro HDMI and usb-c for power, it has bluetooth and wifi - Uses Raspbian (linux) - BCM (Broadcom SOC channel) - some pins are multipurpose (input/ output) - Pi can only have a limited amount of current flowing through it, motors cannot be connected directly - Pi only has limited inputs and output - Pi only uses digital signals and not analog - Pi requires a stable power source - Pi heats up quickly so heatsinks are required - SPI (Serial peripheral interface) allows a master with four bus wires to communicate with a slave, a clock wire is required. All chips share bus signals, each peripheral has its own chip select line. There is an extra slave select line - I2C (Inter-Integrated Circuit) communicates with low-speed peripherals. There are two signal lines (SCL - clock and SDA (carries clock signal) - data (for receiving data)) - The SDA acts as slave input and output on the I2C whereas on the SPI there are separate lines for that - SPI is faster than I2C, draws less power, is more expensive, more susceptible to noise, it can process larger amounts of data - LCD runs on I2C Lecture 3: - AWG stands for american wire gauge - To interact with Raspebrry Pi analog signals need to be converted to digital using ADC - Digital devices are more difficult to debug as the values are 1 and 0 - Input devices - keyboard, mouse, stylus, touchsecreen, sensors - Output devices - screen, display, printer, speaker, LED - Push button will complete a circuit will its being pushed down - Limit switch does the same thing as push buttons, they were originally used to define the limits of the range of motion of objects - LED cathode (negative) is shorter than the anode(positive) - Buzzer vibrates when voltage is applied (piezo) - LCD (16x2) - Sensor ideal case is linear, however there is noise that makes it fuzzy and needs to be filtered - Torque = F x D - PWM affects average power by shortening and lengthening the interval between high and low (Longer low means less power) - Duty cycle = time on/(time on + off) D = PW/T * 100 - DC motor works through electromagnetism, servo motors are DC motors with a feedback component (Potentiometer), Stepper motors half step and only certain coils are magnetized Lecture 4: - Chopper: DC-DC converter (Buck,boost) - Rectifier: AC-DC converter - Inverter: DC-AC convertor - Matri converter: AC-AC converter - Matrix converter = rectifier + inverter - Analog has an infinite number of increments - Digital signals are discrete (finite): there is a limited set of value through which they can be represented - Analog systems are exposed to noise and signal degradation especially over long distances - Analog signals are continuous, the prevision is limited by noise and quality of components - Small variations in Analog signals can lead to inaccuracies in measurement or control - Digital systems have delays due to signal conversion and processing - Digital systems need more energy to process and handle data - Digital systems are more complex to design and debug - Analog systems have infinite resolutions - Digital systems have limited resolution - Digital systems are easier to program and reconfigure whereas analog systems are faster and smoother real-time but harder to modify once implemented - For analog, 0.1% accuracy is good, for digital adding more circuitry increases accuracy - Analog max storage time is in minutes, digital max storage time is years - Faster circuits are analog, highest frequency circuits are analog - Analog designers need years of experience whereas digital designers can program easily - Hybrid systems use analog and digital components for example a sensor may produce analog data which is later converted to digital to be processed by a microcontroller - 1 or 0 is called bit, 4 bits is a nibble, 8 bits is a byte, a word is a group of bits that is a multiple of a byte - Binary simplifies the design of circuits, memory and data storage - Max number represented by n bits = 2^n - 1 - Min number of bits to represent a number = log2(Num + 1) (round up or down) - 1 = on/True 0 = off/false Lecture 5: - Tesla invented AC, Thomas Edison invented the light bulb - Edison brought Tesla in - Resistive load is normal, inductive load current lags by pi/2 (+pi/2), capacitive load current leads by pi/2 (-pi/2) - Active power (KW), power that powers equipment to perform useful work - Reactive power (KVAR), power that a magnetic equipment (transformer, motors, relay) needs to produce he magnetizing flux (not useful) - Apparent Power (KVA) is the vector summation of KW and KVAR (Coffee + Froth) - ADC converts continuous analog signal to discrete digital values - ADC allows digital systems to process real-world analog data (temp, voltage, pressure) - Signal conversion is done by sampling the analog signal at regular intervals and quantizing the sampled values into a finite set of data codes - Digitization is done by dividing the analog signal into discrete steps based on resolution. The more bits the ADC has, the finer the resolution and more accurate the representation of the original signal - Resolution is commonly 8-bit, 10-bit, 12-bit or 16-bit - Sampling rate is how frequently the ADC samples the analog signal in samples per second, the higher the more accurate - Input range is the voltage range of the ADC that defines the min and max voltages that the ADC can measure. Any voltage outside this results in inaccurate conversion - ADCs are sensitive to noise - ADCs, especially at high speeds, consume a lot of power - High speed ADCs may have less precision, so you need to choose the in between - ADC applications: sensors, gather and process data, communication systems, control systems, audio and music - Quantizing the sampled signal is approximated to the nearest value within a range - Old ADC models used to have less bits than newer - New models can do GHZ processing for radar and video - New models are more power efficient - Higher performance ADC cost more - ADC converts analog signals to binary (encoding) - If the amplitude of the analog signal is above a certain value, it is considered a 1 - Step size (Q) = Voltagemax - Voltagemin / Nstates (Smaller is better) - Increasing resolution and sample rate improve accuracy - ADC voltage reading = Nstates/Voltage range X (Voltage - Voltage minimum) - ADC voltage reading = 1/Q X (Voltage - Voltageminimum) - To convert voltage to binary, get the reading value, round it, then divide by 2 - Nstates is 2^Nbits - Nyquist rule: Use a sampling frequency at least twice as high as the maximum frequency to avoid aliasing (effect that cause different signals to become indistinguishable when sampled, happens when input signal changes much faster than sampling rate) - Camera FPM vs RPM - Aliasing - Minimum sampling frequency >= 2 x frequency max Lecture 6: - Or gate with inverted inputs = and gate with inverted output - And gate with inverted input = or gate with inverted output - Or gate with inverted input and output = and gate - And gate with inverted input and output = or gate - Double not = yes - Kmaps are graphical method to simplify algebra expressions, they reduce number of logic gates required and optimize the circuit - Kmaps are useful for up to 4-6 variables - - Each group should be as large as possible - Group 1s in straight lines up or down or on ends - Groups can overlap - Parity checker checks for possible error- can be even or odd checker - Parity checker counts if the total number of ones is odd or even to verify no errors

Use Quizgecko on...
Browser
Browser