Phone

    00852-6915 1330

arduino Related Articles

Stay Ahead with Expert Electronics Insights,
Industry Trends, and Innovative Tips

Amplifiers

DIY Simple Audio Player with Amplifier LM386

ⅠIntroduction This project mainly introduces how to DIY a Simple Audio Player with  Amplifier LM386 . But before this project, it is very essential to know some basics of LM386. Therefore, the first of this article is about LM386 audio amplifiers and the second part we will have a look at the practical appliance of Simple Audio Player with Amplifier LM386. Catalog ⅠIntroduction Ⅱ Amplifier LM386 Related Video: Ⅲ LM386 Basics 3.1 LM386 Datasheet 3.2 LM386 Pinout 3.3 LM386 Features Ⅳ  Project Introduction 4.1 Hardware Required 4.2 Getting Ready with Your WAV Audio Files: 4.3 Circuit 4.4 Code 4.5 Working of this Arduino Music Player: Ⅴ FAQ How to make an LM386 audio amplifier circuit Amplifier LM386 Video Description: In this Video, We will explore how to use the popular LM386 class AB audio amplifier IC to build a simple mono 1 watt audio amplifier.  Ⅲ LM386 Basics Despite the fact that LM386 audio amplifiers are quite old. They do, however, have a lot of useful information. Assume your audio player has poor sound quality. You want to boost the volume. They are a good option. Because of the low voltage supply and the fact that it works well with a battery.   3.1 LM386 Datasheet You completed an audio circuit  . However, the sound is too faint. Many people use the LM386 to boost the sound to a speaker. The LM386 is a low-power audio amplifier. Also, you should be able to work with a battery,  It has a similar shape to  IC-741  and DIP-8. So, small and simple. Even if it's small, it makes a big sound. But...better. it's If you have previously read the LM386 Datasheet.   3.2 LM386 Pinout Figure1:pinout In DIP-8, we frequently use the LM386. There are only a few pin connections. Other packets are also the same. For example, SOP-8, TSSOP-8, and so on.   3.3 LM386 Features   Ⅳ  Project Introduction Including sounds or music in our project will always make it look and sound much more appealing. If you're working with an  Arduino  and have a lot of free spins, you can easily add sound effects to your project by purchasing an extra SD card module and a standard speaker. In this article, I'll show you how to play music and add sound effects with your  Arduino board, as well as introduce the IC LM386 Amplifier  , which we'll use in this process. We will play the.wav music files stored on an SD card in this project. The Arduino will be programmed to read these.wav files and play the audio on a speak through an LM386 Audio amplifier.   Figure2: Project     4.1 Hardware Required Arduino Due Board8-ohm speaker or headphonesArduino shield with an SD card with cs CS 4 (like the Ethernet shield)Components to build an external audio amplifierLM386 (low power audio amplifier)10 kohm potentiometer10 ohm resistor2 x 10 µF capacitor0.05 µF (or 0.1 µF) capacitor250 µF capacitor   4.2 Getting Ready with Your WAV Audio Files: The audio file to be stored on the SD card must be in.wav format and have 44100 Hz, 16-bit stereo quality. We need audio files in.wav format to play sounds from an SD card using Arduino because the Arduino Board can only play audio files in a specific format, which is wav format. There are many mp3 shields available for use with Arduino to create an Arduino mp3 player. Alternatively, to play mp3 files in Arduino, there are websites that will convert any audio file on your computer into that specific WAV file.   4.3 Circuit The shield is placed on top of the Due, and a micro-SD card is inserted into the slot. The card's root directory contains a.wav file called "test.wav." For a quick test, connect a pair of headphones to the ground and DAC0 while keeping the polarity in mind. To add a speaker to the board, connect an amplification circuit between the DAC0 pin and the speaker. The amplification circuit will boost the speaker's volume,  There are numerous audio amplifiers available, with the LM386 being one of the most common. The following scheme demonstrates how to construct the circuit using the LM386 and a variety of components. You can power the LM386 by connecting the Vs pin to various voltage sources, such as the +5 V on the Arduino Due's 5V pin or an external 9V  battery,  The capacitor is connected to pins 1 and 8 of the LM386 provides the amplifier's gain. The gain is set to 200 with the 10 F capacitor, and 50 without the capacitor. The volume of the amplifier can be adjusted using the potentiometer. Caution: Do not connect the speaker directly to the Arduino Due's pins.   Figure3 : Circuit   Figure4: LM386 mounting on breadboard   4.4 Code   4.5 Working of this Arduino Music Player: Simply press the button connected to pin 2 after programming your Arduino, and your Arduino will play the first song (saved as 1.wav) for you. You can now press the button again to change your track to the next song, 2.wav. Similarly, you can listen to all four songs. You can also play/pause the song by pressing the pin 3 button. Press it once to pause the song and once more to resume it from where it left off. Watch the video below to see the entire process in action (or maybe to relax with some songs). I hope you had a good time with the project. It is now up to your imagination to incorporate them into your projects. You can create a speaking clock, voice assistant, talking robot, voice alert security system, and many other things.   Ⅴ FAQ 1. How many watts is LM386? 700mW, mono, 5- to 18-V, analog input Class-AB audio amplifier. 2. How do you calculate LM386 gain? Voltage Gain Analysis: Without any external components, it has a gain of Gv = 2x15K/(150+1350) = 20 (26 dB). With a capacitor (or shortcutting) between pins 1 and 8 , it has a gain of Gv = 2x15K/150 =200 (46dB). 3. Is LM386 any good? The LM386 is a well-designed, basic workhorse that does a decent job when its hooves are kept clean and it's well-fed. Aside from having a slow op-amp stage by today's standards, it has decent performance. It can also sound horrible if you neglect it. 4. What is an audio amplifier circuit? The circuit of the audio amplifier consists of a transistor a device to apply the input signals and a speaker at the output. The transistors are connected based on the necessity. The important factors that need to be considered while designing a audio amplifier is gain,noise, frequency response and distortion. 5. Which amplifier can be used for audio amplifier? An audio power amplifier (or power amp) is an electronic amplifier that amplifies low-power electronic audio signals such as the signal from radio receiver or electric guitar pickup to a level that is high enough for driving loudspeakers or headphones. 6. What is the need of power amplifier? The function of a power amplifier is to raise the power level of input signal. It is required to deliver a large amount of power and has to handle large current. The characteristics of a power amplifier are as follows − The base of transistor is made thicken to handle large currents.
kynix On 2021-12-24   1060
Motors, Solenoids, Driver Boards/Modules

Arduino Complete Guide for Beginners with Examples

IntroductionAs the most popular open-source hardware in the world, Arduino is not only an excellent hardware development platform, but also a trend in hardware development. Its simple development method makes developers pay more attention to creativity and realization, complete their own projects and get experiments faster, which greatly saves the cost of learning and shortens the development cycle. There are too many want to say, in short, arduino provides a lot of convenience for many electronics enthusiasts and creators, and also provides a platform for sharing their results. So what exactly is it? How does it work?CatalogIntroductionⅠ What is Arduino?Ⅱ Who Make the Arduino?Ⅲ Why Use Arduino?Ⅳ What Does Arduino Have?Ⅴ Arduino Programming LanguageⅥ Arduino Basic ArchitectureⅦ Copyright and PaymentⅧ Simple Arduino Projects8.1 Video Demonstration8.2 Examples and Programming CodesⅨ FAQⅠ What is Arduino?Arduino is a tool that can be used to sense and control the physical world more than your desktop computer. It consists of an open source-computer platform based on a simple single-chip microcomputer, and a development environment for writing programs for the Arduino board.Arduino can be used to develop interactive products. For example, it can read a large number of switches and sensor signals, and can control a variety of lights, motors, and other physical devices. The Arduino project can be a standalone project, or it can communicate with programs running on your computer (for example: Flash, Processing, MaxMSP) at runtime. You can choose to manually assemble the Arduino board yourself or buy a productthe, because open-source IDE can be downloaded for free.The Arduino programming language seems to be correspondingly connected to a physical computing platform, which is based on a programming environment that handles multimedia.Learn Arduino in 15 MinutesⅡ Who Make the Arduino?Massimo Banzi was a teacher at a high-tech design school in Ivrea, Italy. His students often complain about not being able to find cheap and easy-to-use microcontrollers. In the winter of 2005, Massimo Banzi discussed this problem with David Cuartielles. He is a Spanish chip engineer who was a visiting scholar in this school at the time. The two decided to design their own circuit boards and introduced David Mellis (Banzi student) to design a programming language for the circuit boards. Two days later, David Mellis wrote the code. After another three days, the circuit board was completed. Massimo Banzi likes to go to a bar called di Re Arduino, which was named after the Italian king Arduin 1,000 years ago. To commemorate this place, he named this circuit board Arduino.Figure 1. The Making Arduino Core Team Ⅲ Why Use Arduino?There are many single-chip microcomputers and their platforms that are suitable for the design of interactive systems. For example: Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard and others provide similar functions. With all these tools, you don't need to care about the cumbersome details of MCU programming. Arduino provides you a set of easy-to-use toolkits. Arduino also simplifies the process of working with a single-chip microcomputer, but compared with other systems, it has many advantages in many places. In fact, it is especially suitable for teachers, students and some amateurs:0️⃣Cheap1️⃣Cross-platform2️⃣Simple programming environment3️⃣The software is open-source and expandable.4️⃣Hardware is open-source and expandable. Ⅳ What Does Arduino Have?At the beginning of Arduino development, its application environment was clarified, and an open-source platform was designed to facilitate its secondary development. The main features of Arduino are as follows:1) Open-source circuit diagram design. The program development interface is free to download, or you can modify it according to your needs. Arduino carries low-priced microcontrollers (ATmega8 or ATmega128). It can be powered by a USB interface, no external power supply, and an external 9VDC input can also be used.2) Support ISP online programming, making the Bootloader firmware into the chip. The Arduino controller contains the Bootloader program, which is the first piece of code that runs after the system is powered on. It is like the program in the BIOS of the PC. It performs self-check after startup, configures the port, and so on. Of course, the microcontroller relies on programming the fuse. Set the startup from the boot area after power-on, and use this program to directly store the program sent from the serial port in the flash area. Therefore, when using the Arduino compilation environment to download the program, first reset the microcontroller and start the Boodoader program to guide the program sent from the serial port to be successfully written into the flash area. The flash can be programmed repeatedly, so it is very convenient to update the software. After having Bootloader, you can update the firmware through the serial port or USB to RS232 line.3) According to the official PCB and SCH circuit diagrams, the Arduino module can be simplified to complete independent micro-processing control.4) It can be easily connected with sensors and various electronic components, such as infrared, ultrasonic, thermistor, photoresistor, servo motor, etc.5) Support a variety of interactive programs, such as Flash, Max/MSP, VVVV, PurEDAta, C, Processin, etc.In terms of application, the use of Arduino can break through the interactive content of devices that can only use mouse, keyboard, CCD and other input devices in the past. For example, it can achieve single-player or multi-player game interaction more simply. The functional characteristics of Arduino make it more and more widely used. Ⅴ Arduino Programming LanguageUsually, the Arduino language we say refers to a collection of various application programming interfaces (APIs) provided by the Arduino core library files. Arduino uses C/C++ to write programs. Although C++ is compatible with C language, these are two languages. C language is a process-oriented programming language, and C++ is an object-oriented programming language. The early Arduino core library was written in C language, and later object-oriented ideas were introduced. At present, the latest Arduino core library is written in a mixture of C and C++.The Arduino language is a program framework that starts with setup() and loop() as the main body. setup() is used to initialize variables, pin modes, call library functions, etc. This function only runs once, and its function is similar to "main()" in C language. For the loop() function, the statements in the function are executed in a loop.Arduno language modularizes some parameter settings related to AVR microcontroller, including EEPROM, Ethernet, LED matrix, steering gear, stepping and TWI/I2C control library. It does not require the user to directly deal with the underlying system, which can improve the efficiency of application development. Ⅵ Arduino Basic ArchitectureThe Arduino system has also developed different versions based on different application environments. The "Arduino Duemilanove" version is used as an example to introduce the Arduino system. This version was developed in 2009 and is based on the atmega328 microcontroller board. During use, connect the computer with a USB cable or use a power adapter to power it.1) One 9V DC input provides external power output for the Arduino board, so that the Arduino control board has the ability to drive high-power external devices such as steering gear.2) One USB port used to connect the computer. The Arduino IDE uploads the control program written by the user to the control board, and at the same time, it can also supply power to the circuit board and drive low-power external devices through this port.3) 14 digital input/output terminals, among which ports 0 (RX) and 1 (TX) are respectively connected to the serial pins of the main control chip to receive and send TTL serial data. Among them, ports 2 and 3 can receive external signals to realize external interrupt function. Ports 3, 5, 6, 9, 10, 11 are used as PWM ports, which can be used for motor PWM speed regulation or music playback. Port 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK) can provide SPI communication mode with the support of SPI module library. Port 13 is connected with an LED indicator, which can open and close with the change of the level on pin 13.4) 6 analog input/output ports, of which port 4 (SDA) and port 5 (SCL) can realize I2C communication.5) One 5V DC output and one 3.3V DC output, which can provide 3.3V and 5V DC power supplies for other circuits.6) One reset interface.The Arduino system is developed based on a single-chip microcomputer, and a large number of common and standard electronic components are used on it. The entire design, including hardware and software, is released in an open source manner. Therefore, the cost of procurement is relatively low. In various electronic production competitions, Arduino is used as a development platform for creative design of electronic artwork.Figure  2. Arduino Board Terminals🔺Arduino Hardware✔️There are many motherboard, such as:Arduino UnoArduino NanoArduino LilyPadArduino Mega 2560Arduino EthernetArduino DueArduino LeonardoArduinoYún✔️There are many expansion boards for Arduino, such as:Arduino GSM ShieldArduino Ethernet ShieldArduino WiFi ShieldArduino Wireless SD ShieldArduino USB Host ShieldArduino Motor ShieldArduino Wireless Proto ShieldArduino Proto Shield Ⅶ Copyright and PaymentIn order to maintain the open-source concept of the design, Arduino decided to adopt the Creative Commons license, which is a license similar to GPL that appears to protect open copyright activities. Because copyright law can regulate open-source software, but it is difficult to use it on hardware. Having this license, anyone is allowed to produce copies of circuit boards, redesign, and even sell copies of the original design. You don't need to pay royalties, or even get permission from the Arduino team. However, if you republish the reference design, you must sign the original Arduino team. In addition, if you adjust or modify the circuit board, your latest design must use the same or similar license to ensure that the new version of the Arduino circuit board will be free and open. In other words, only the name Arduino is reserved, and it is a trademark now. If someone wants to sell a circuit board under this name, they must pay a small trademark fee to the Arduino core development members. Ⅷ Simple Arduino Projects8.1 Video DemonstrationBasic Projects with Arduino8.2 Examples and Programming Codes🔺Water Lamp ControlInsert 6 LED lights on the breadboard, among which the long pins are assigned to the 6, 7, 8, 9, 10, 11 ports of arduino respectively, the short pins are all connected to the blue wire of the breadboard, and then one port of the blue wire is connected to the GND port of the arduino. Figure  3. Water Lamps ConnectionCode:void setup(){ pinMode(6,output);pinMode(7,output);pinMode(8,output);pinMode(9,output);pinMode(10,output);pinMode(11,output);}void loop(){digitalWrite(6, LOW);digitalWrite(7,HIGHT);delay(200);digitalWrite(7, LOW);digitalWrite(8,HIGHT);delay(200);digitalWrite(8,LOW);digitalWrite(9,HIGHT);}🔺Using the Buzzer to Realize the AccordionThe buzzer is set according to different frequencies, so set the corresponding buzzer frequency based on the level of the switch interface.void setup(){pinMode(8,INPUT);  //switch setdigitalWrite(8, HIGH);pinMode(9,INPUT);digitalWrite(9, HIGH); piMode(10,INPUT);digitalWrite(10, HIGH); pinMode(11,OUTPUT) //light setpinMode(12, OUTPUT)pinMode(13,OUTPUT)}void loop(){if(digitalRead(8)==LOW){tone(7,2093);  //the buzzer frequency is set to 2093digitalWrite(11, HIGH);}else{notone(7);digitalWrite(11,LOW);}Repeat 2 switch values down;;; 🔺Breathing LightThe so-called breathing is relatively stable, so it cannot flicker and go off like a flashing LED. So analog output is used, and the current changes continuously.Figure  4. Breathing Light ConnectionCode:void setup(){pinMode(11,OUTPUT);  }void loop(){for(int i=0;i<30;i++){analogWrite(11,i);   //analog signal input, the range of i is [0,255];delay(10);}for(int j=29;j>0;j--){analogWrite(11,j);delay(10);}} Among them, the corresponding relationship between the analog signal voltage and the digital signal voltage:How is the analog signal realized to control the voltage within a range in a cycle?Figure  6. PWMAs shown in the figure, “on” belongs to 5V, and “off” belongs to 0V. In a time period, that is, when a pulse is sent, the duration of “on” in the previous figure is 25%, and the “off” is 75%. The voltage value calculated like this: v0=5*25%+0*75%=1.25(v). It can be simply understood like this. 🔺Breathing Water Lampvoid  setup(){pinMode(3, OUTPUT);pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT);pinMode(11, OUTPUT);}int  ports[6]=[3,5,6,9,10,11];int i=0,level=0; set loop(){ analogWrite(ports[i], level);delay(10);++level %=7;++i %=6;  i is incremented first, and then modulo 6, that is, i is always in the range of 0~5;}🔺Vibrating LEDPhotoresistor, resistor, LED are required;Connect one end of the photoresistor to 5V, the other end to the resistor, and the resistor to GND. Pull out a wire between the two and connect to analogIn;Figure  7. Vibrating LED ConnectionCode:void setup(){Setrial.begin(9600);}void loop(){Setril.printIn(analogWrite(0));  //the middle wire is connected to port 0, which is the serial output port;delay(200);} 🔺Electric BellWhen energized, electromagnetic induction produces magnetic force, the switch (oscillator) is attracted and pulled down; When the power is cut off, the coil loses its magnetism, the switch is restored, and then energized. That is, repeat the cycle. This is also the principle of crystal oscillator.Figure  8. Electric Bell DiagramCode:void setup(){pinMode(9,OUTPUT);Setrail.begin(9600);}void loop(){Setrail.printIn(analogRead(0));analogWrite(9, map(analogRead(0), 400,700,0,255);   //map(a1,b1,a2,b2), that is, the original range of values [a1,b1] is mapped to [a2,b2];delay(200);} Ⅸ FAQ1. What is an Arduino used for?Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.2. Is Arduino illegal?The hardware designs of Arduino are open source; it is allowed to copy and further develop the designs. Note that in case a copy uses the Arduino name and/or logo on it, this board is no longer a copy but a counterfeit which is illegal to manufacture and sell.3. Can Arduino run C++?First, the Arduino compiler/IDE accepts C and C++ as-is. In fact many of the libraries are written in C++. Much of the underlying system is not object oriented, but it could be. Thus, "The arduino language" is C++ or C.4. Is Arduino easy to learn?Arduino is cost-effective and easily accessible. Arduino is easier to learn as a programming language as it is a simplified version of the C++ programming language. Arduino is cross-platform which makes it easy to run on any sort of device compared to other microcontrollers which can only run on windows.5. What is the difference between Arduino and Raspberry Pi?The main difference between them is: Arduino is microcontroller board, while Raspberry Pi is a microprocessor based mini computer (SBC). The Microcontroller on the Arduino board contains the CPU, RAM and ROM. All the additional hardware on Arduino Board is for power supply, programming and IO Connectivity.6. Why is Arduino so popular?So the Arduino hardware is easy, the Arduino IDE is simple, and the code itself is much easier to comprehend (than trying to program an off-the-shelf microcontroller). ... Another reason Arduino is so popular is because there are many people using it which means there's a lot of examples out there to work with.7. Can I sell my Arduino project?Yes, with the following conditions: Physically embedding an Arduino board inside a commercial product does not require you to disclose or open-source any information about its design. ... You may manufacture and sell the resulting product.8. Do you have to use the Arduino IDE?Can I program an Arduino board without the Arduino IDE? Yes, you can use Create web editor to program your board without the need of download the classic IDE.9. Can I use Python in Arduino?Arduino uses its own programming language, which is similar to C++. However, it's possible to use Arduino with Python or another high-level programming language. In fact, platforms like Arduino work well with Python, especially for applications that require integration with sensors and other physical devices.10. What language does Arduino code in?Arduino is programmed with a c/c++ 'dialect'. Most c/c++ will work but much of the standard libraries will not work.11. Which language is best for Arduino?Any language that has a compiler that generates Arduino compatible machine code will be perfect. As of this moment , a subset of C / C++ is the only language that is supported by the Arduino IDE.12. How do I program an Arduino?1) Use your Arduino Uno on the Arduino Web IDE.2) Use your Arduino Uno on the Arduino Desktop IDE. Install the board drivers. Open your first sketch. Select your board type and port. Upload the program. Learn more on the Desktop IDE.3) Tutorials.13. Can Arduino connect to WiFi?Connect your Arduino to the internet by adding ESP8266 WiFi Module ... Adding this module to your Arduino UNO will open you to more and exciting projects.14. Can an Arduino run Linux?Arduino have a couple of boards that support running a variant of Linux called Linino: The Arduino Yún is a microcontroller board based on the ATmega32u4 and the Atheros AR9331. The Atheros processor supports a Linux distribution based on OpenWrt named Linino OS.15. What should I learn before Arduino?Before learning Arduino you need to have knowledge of basic programming. You can choose any language like C, C++ or Java. And apart from that you need to have basic idea about electronic devices like which part it is?, How it works? etc.16. Where do I program Arduino?Arduino programs are written in the Arduino Integrated Development Environment (IDE). Arduino IDE is a special software running on your system that allows you to write sketches (synonym for program in Arduino language) for different Arduino boards.17. How many types of Arduino are there?Top 6 Different Types of ArduinoArduino UNO. The development of Arduino UNO board is considered as new compared to other Arduino boards.LilyPad ArduinoArduino MegaArduino LeonardoArduino Red BoardArduino Shields18. Is Arduino good for beginners?Arduino is easily accessible - even for those who don't know much about electronics. Arduino boards are simple a type of microcontroller. They are able to read inputs from the sensors and turn those inputs into output. Arduino is the best for beginners looking to get started with electronics for the first time.19. Which is more powerful Raspberry Pi or Arduino?Given those differences you might think a Raspberry Pi is so much more powerful and capable than Arduino, so you should use that. ... Raspberry Pi has 8. Individual I/O pins in Arduino can drive 40mA while Raspberry Pi GPIO pins can each drive a maximum of 16mA.
kynix On 2021-12-22   1150
General electronic semiconductor

Arduino Inactivated Device for COVID in 2021

IntroductionNow face masks are necessary elements during the COVID. In practice, they are intended for one-time use, and to a large extent, it is environment unfriendly. Also during a shortage, repeated use is inevitable and it is necessary to have a disinfection mechanism. During the ongoing SARS-CoV-2 pandemic, hospitals, medical centers, and research institutions implemented different disinfection methods for these masks, usually involving ultraviolet germicidal exposure (UVGI) or some kind of heating methods. Nevertheless, these methods are not suitable for many ordinary people. What’s more, due to shortages, the reuse of these masks has become the only option. There is evidence that SARS-CoV-2 still exists on the surface of surgical masks even after 7 days, so the demand for feasible mask disinfection methods has further increased. Here will introduce a special device to do that.Introduction: Understanding the CoronavirusCatalogIntroductionⅠ Disinfection Device Production InstructionsⅡ Device Design Processes2.1 Device Size2.2 Thermal Test2.3 Box Lid Design2.4 UV-C System2.5 Making the Mask PlacementⅢ Set Up Arduino and Sensor3.1 Arduino Overview3.2 Material3.3 Sensors Installation3.4 Arduino Control3.5 AlarmⅣ Using GuideⅤ Temperature Cycle5.1 Heat Inactivation of Viruses5.2 Security ConsiderationsⅥ ConclusionⅠ Disinfection Device Production InstructionsThe device aims to create a low-cost portable device that can effectively use UVGI and dry heat to disinfect masks carry SARS-CoV virions, and can be easily operated by those who need it.Device Setup DiagramFigure 1. Device Setup Diagram1) The temperature must be kept within 65±5℃.2) The lamp must provide UV-C wavelength. UVC bulbs that emit very short ultraviolet wavelengths from 100 to 280 nanometers that damages the DNA of bacteria, viruses, and other pathogens. You should be careful, ultraviolet C is the most dangerous type of ultraviolet light in terms of its potential to harm life on earth.3) The duration of the disinfection cycle is at least 30 minutes. Because coronavirus is more sensitive to heat. A temperature of 56 degrees can kill the coronavirus within 30 minutes. So no more than 30 minutes to avoid potential mask degradation and function losses.Figure 2. Device Operational DisplayFigure 3. Device Physical ViewⅡ Device Design Processes2.1 Device SizeFigure 4. Device Size2.2 Thermal TestFigure 5. Thermal Test DiagramFigure 6. Test with ThermometerFigure 7. Test Boite Temperature Manufacturing of heating system:1) A frying pan with a diameter of 22cm (induction compatible) without handle.2) Cover the frying pan with aluminum foil to reflect UV-C light.3) Make a 20cm hole in the center of the bottom surface of the box.4) In order to maintain the position of the frying pan, please use four metal brackets as shown in the figure.Figure 8. Frying PanNote: The frying pan should not close to the wood of the box because it will reduce the thermal efficiency. Therefore, you must select the appropriate hole diameter and shape the metal bracket according to the following figure:Figure 9. Frying Pan Installation Diagram 2.3 Box Lid DesignFigure 10. Box Lid Design2.4 UV-C SystemFigure 11. UV-C LampFor the UV-C source in this device, it is an 11W bulb from household aquarium. As shown in the picture, the UV-C bulb is taken out and installed on the top cove. The installation method of the bulb is to make 4 holes in the top cover, and use the cable tie/cable tie and soft cushion to fix the bulb firmly. And the top surface is covered with aluminum to reflect ultraviolet radiation.You can feel free to use UV-C lamps from other sources. However, if you cannot access the crystal tube (used in this project), please do not use glass as a substitute, because glass will block ultraviolet radiation.2.5 Making the Mask PlacementThe mask will be placed on top of the metal frame. The I wire frame is made of thin copper wires, and each wire has 30mm spacing apart. The wire stand is located 120mm above the bottom surface. Next secure the wire racks together by passing the wires through the small holes on the front and back surfaces of the box.Figure 12. Mask PlacementⅢ Set Up Arduino and Sensor3.1 Arduino OverviewFigure 13. Arduino Overview3.2 MaterialArduino UNO Rev3Grove Basic Shield V2, 0Infrared temperature sensorLight SensorPush ButtonPiezo SpeakersFour-digit LED DisplayAdapter power supply DC 12V3.3 Sensors InstallationFigure 14. Sensor Introduction3.4 Arduino ControlINIT: In this state, the LED display indicates the temperature, but you have to wait for it to reach the threshold (70℃) before starting cycle counting in the COUNT state.Count: The number of minutes from 30 to 0 is displayed on the LED display next to the temperature digits. Additionally, in the case of too low temperature, or if the UV lamp is turned off, the status will change to ERR.END: This is the normal state at the end of the elapsed time. The speaker will remind. Press the button to enter INIT again.ERR: This is an error state, if the temperature is too low or the UV lamp is turned off, it will run. In terms of it, repeat the last step above.Code Download: LED Backpack Libraries and Arduino Wiring.3.5 AlarmIn fact, there are few alarm conditions. If the alarm is on, there will be a specific sequence on the speaker and a message will be displayed on the screen.Alarm condition: If the system is in ERR state (mentioned above) or the temperature is too high (over 75℃).Figure 15. Alarm System Diagram Ⅳ Using Guide1) Put the box on top of the induction (or resistance) stove.2) Turn on the power of Arduino.3) Close the box and start heating at 70~80% of the power of the induction cooker.4) Wait until the temperature reaches 60℃, and then reduce the variable power of the induction cooker to 30%.5) Now you can open the device, put the mask in and close it.7) Press the button to start, the remaining time (30 minutes) should be displayed.8) From now on, you need to wait 30 minutes, and there will be a signal on the speaker.9) If you want to restart a new cycle from the initial state, just press the button.Note: When the timer is counting the elapsed time, the dots between the Timer and Temperature displays will flash at 1 second intervals. Ⅴ Temperature CycleFigure 16. First Heat CycleFigure 17. Cycle with Opening-Closing 5.1 Heat Inactivation of VirusesSince the time of Pasteur, people have known the ability to remove microorganisms through moist heat, usually below 100℃. In this device, we implemented dry heat, which is reported to be effective in eliminating the infectivity of SARS-CoV. The analysis showed that the virus is largely inactivated within 30-90 minutes at 56℃, almost completely inactivated at 65℃ in 20-60 minutes, and at 75℃ in 30-45 minutes. In addition, a recent study showed that SARS-CoV-2 will lose all its infectivity at 56℃ after 30 minutes or at 70℃ after 5 minutes.According to these evidences and additional considerations regarding the effects of these disinfection methods on the function of the mask, we decided to set the heat exposure of the protocol used with the equipment to 65℃/30 minutes.5.2 Security Considerations• UVC radiation is harmful to human skin and eyes, so the UVC bulb should only be turned on when the box is completely closed.• Be careful with the metal parts of the box, they may be very hot after heating and may burn your skin when you touch them directly. Ⅵ ConclusionTaking into account the collected evidence and the technical details of the equipment, we decided to set the disinfection protocol to UVC irradiation for 30 minutes and 65±5℃ dry heat. In addition, the time required for the device should reach the required temperature and light intensity, which must be calculated. Using these specifications of UVC or heating alone should be sufficient to eliminate almost all SARS-CoV-2 infectivity, and the simultaneous action of the two should increase the effectiveness to reach a safer level.According to the available scientific evidence, the disinfection program may eliminate almost all SARS-CoV infectivity and will certainly make the masks safer to reuse than without any disinfection. However, it is designed in good faith and to the best of professional knowledge and ability, but the following must be stated:The use of this equipment to inactivate SARS-CoV-2 has not yet undergone proper laboratory testing, and it is impossible to confidently confirm the actual impact on the filtering capacity of the mask in advance.
kynix On 2021-12-20   819
Motors, Solenoids, Driver Boards/Modules

Project of DS1302 RTC Chip with Arduino

ⅠIntroduction RTC is an abbreviation for Real-Time Clock. RTC modules are simply TIME and DATE remembering systems with a battery setup that keeps the module running in the absence of external power. This keeps the TIME and DATE current. As a result, we can get accurate TIME and DATE from the RTC module whenever we want. Catalog ⅠIntroduction Ⅱ RTC Module Explaintion 1.1 What is RTC module? 1.2 Timing Ⅲ DS1302 RTC Module Basics 3.1 DS1302 RTC Module Pinout 3.2 DS1302 Pin Configuration 3.3 Features 3.4 Technical Specifications  3.5 Block Diagram of DS1302 RTC Chip Ⅳ DS1302 RTC Module with Arduino 4.1 Setting up the Hardware 4.2 Making the Code Ⅴ FAQ   Ⅱ RTC Module Explaintion 1.1 What is RTC module? A real-time clock (RTC) is an electronic device that measures the passage of time (typically in the form of an integrated circuit). Although the term is most commonly associated with devices found in personal computers, servers, and embedded systems, RTCs can be found in almost any electronic device that requires an accurate time of day. A real-time clock mechanism and a long-lasting battery are used by an RTC module to keep track of the time. On a small board with five pins, the module contains a 3V lithium-ion battery, a 32 kHz crystal, and a DS1302 chip. The DS1302 chip is extremely power efficient and can run for up to 5 years on a 3V lithium battery. Figure1:RTC Module     The power supply voltage  is 5 volts. The serial  I2C  communication protocol is used by the RTC module.  which makes interfacing with the microcontroller very simple. Aside from VCC and GND, only two pins (CLK and DAT) are required for interfacing with  Arduino . CLK and DAT are the required SCL and SDA pins for  I2C communication, respectively, while RST is the reset pin (optional).   1.2 Timing The majority of RTCs use a crystal oscillator,[8][9] but some can use the power line frequency.  The crystal frequency is typically 32.768 kHz, which is also the frequency used in quartz clocks and watches. It is a convenient rate to use with simple binary counter circuits because it is exactly 215 cycles per second. The low frequency saves power while remaining above the range of human hearing. The temperature has little effect on the size of these crystals' quartz tuning forks, so the temperature has little effect on their frequency. Some RTCs employ a micromechanical resonator on the RTC's silicon chip. This reduces the size and cost of an RTC by reducing the number of parts. Micromechanical resonators are much more temperature-sensitive than quartz resonators. So, using an electronic thermometer and electronic logic, compensate for temperature changes. Typical crystal RTC accuracy specifications range from 100 to 20 parts per million (8.6 to 1.7 seconds per day), but temperature-compensated RTC ICs are available with accuracy as low as 5 parts per million. In practice, this is adequate for celestial navigation, the traditional function of a chronometer. Chip-scale atomic clocks became available in 2011. Despite being significantly more expensive and power-hungry (120 mW vs. 1 W), they keep time to within 50 parts per trillion.   Ⅱ RTC Module Related Video: What is RTC and how it is working || real time clock|| diyproject || graspelectronics RTC Module Video Description: what is rtc ? and how it is working ? RTC stands for real tme clock. RTC module code  is ds3231 the code is given in the datasheet for all components  . it is work in 3.3v  5v may kill the module. it is used to maintain accurate time keeping when main power to the device is interrupted. The rtc maintan maintains second,hours, day,date, month and year information. Real time clockThe date at end of the month is automatically adjusted for month with fewer then 31 days including corrections for leap years.   Ⅲ DS1302 RTC Module Basics Before we start this project, we will have a look at basics of DS1302 RTC Module. 3.1 DS1302 RTC Module Pinout Figure2: Pinout   3.2 DS1302 Pin Configuration Pin No. Pin Name Description 1 Vcc2 Second supply input, when Vcc2 is greater than Vcc1 + 0.2V, DS1302 powers through this pin 2,3 X1 and X2 For connecting external crystal oscillator of 32.768kHz 4 GND Ground 5 CE This pin set to HIGH during a Read or a Write 6 I/O (Data Line) This is the bi-directional data pin to 3-wire interface 7 SCLK(Serial Clock) Used to synchronize data movement on the serial interface 8 Vcc1 Rechargeable energy source connected to this pin   3.3 Features Minutes, seconds, date, hours, month, day of the week, year, and leap-year compensation up to 2100 are all counted in real-time.Single and multiple (Burst mode) data transfers for Clock or RAM data read and write31*8 general-purpose battery-powered RAMSimple interface based on three TTL-compatible wiresFull operation from 2V to 5.5VSmall sizepin DIP and 8-pin SO packages are available. 3.4 Technical Specifications 3.3V is the typical supply voltage.Voltage range (concerning ground) on any pin: -0.5V to 7.0°CTemperature range (commercial): 0°C to +70°CTemperature range (Industrial): -40°C to +85°CTemperature range for storage: -55°C to +125°CTemperature for Soldering: 260°C Note: The DS1302 Datasheet, which is linked at the bottom of this page, contains all of the technical information.  3.5 Block Diagram of DS1302 RTC Chip Figure3:Diagram   3.6 How to Use a DS1302 Chip? A typical DS1302 operating circuit is shown below. The DS1302 has two power inputs, one from the cell and one from the controller. To generate the required frequency, a crystal oscillator with a frequency of 32.768 kHz is used. The data line, reset pin, and serial-clock pins of the DS1302 are connected to the microcontroller for interfacing. Figure4:Example   Ⅳ DS1302 RTC Module with Arduino 4.1 Setting up the Hardware Pins A4 and  A5  on the  Arduino are dedicated to I2C communication. However, with the assistance of software code, any pin can be used to serve the purpose. This is known as a software I2C bus. For our purpose, we will use the "Rtc by Makuna" library, which can be found in the Arduino IDE's Tools -> Manage Libraries... menu. Following installation, the examples provided with the library can be used to learn more about the functions and initialization methods. Figure5:Library Manager Arduino  To use the following code, connect the RTC module's DAT, CLK, and RST pins to Arduino's digital pins 6, 7, and 8. 4.2 Making the Code Now we must write the C code to set the current date and time in the RTC module, read from the module, and write to the serial monitor every second.   Figure6 :Code for connection with RTC Module The line ThreeWire DatClkRst (6,7,8); creates a bundle of three wires that will be used to initialize the object Rtc from the RtcDS1302 class using the command RtcDS1302ThreeWire> Rtc(DatClkRst); The function SetDateTime resets the DS1302 chip's date and time. The date and time at the time of Arduino's C code compilation are saved in the RtcDateTime object "compiled." The loop() method has a one-second delay. Date and time are read from the RTC module and displayed on the serial monitor in each iteration. To learn how to use this RTC module, remove the line and flash the Arduino with the updated code again. Even if the Arduino's power is turned off or the RTC module is disconnected and reattached, the Arduino will be able to read and display the correct real-time.   Ⅴ FAQ 1. Which RTC module is best? Choosing The Right RTC For Your Project The DS-1307 is often the default choice for an RTC. ...The DS3234 has the distinction of using an SPI interface instead of I2C. ...The RV-1805 draws so little power that this Sparkfun module gets by without a backup battery at all. 2. What is RTC module DS3231? The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature- compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. 3. What is RTC in mobile phone? A real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit) that measures the passage of time. 4. What is RTC in laptop? The real-time clock, or RTC, maintains the internal clock … in real time. That is how the laptop knows the time as well as the date whenever you turn it on. ... Or you can keep the laptop plugged into an AC source. 5. Does RTC work without battery? The RTC module accurately keeps time with a precise oscillator and is maintained with a small battery (not included). 6. How does RTC module work? An RTC maintains its clock by counting the cycles of an oscillator – usually an external 32.768kHz crystal oscillator circuit, an internal capacitor based oscillator, or even an embedded quartz crystal. Some can detect transitions and count the periodicity of an input that may be connected. 7. What is the difference between DS1307 and DS3231? The main difference between the DS3231 and DS1370 is the accuracy of time-keeping. DS1307 comes with an external 32kHz crystal for time-keeping whose oscillation frequency is easily affected by external temperature. This usually results with the clock being off by around five or so minutes per month.  
kynix On 2021-12-18   1629
Resistors

Pull Up and Pull Down Resistor Use Explained

Introduction As we all know, Resistors play a important role in limiting current in the circuit. Among then, pull-up resistors and pull-down resistors are often mentioned and frequently used in electronics. The pull-up is to clamp the uncertain signal to a high logical level through a resistor, which acts as a current limiter; while the pull-down resistor clamps the uncertain signal to a low logical level. Because there are only two states of high level and low level in digital circuits, it is uncertain at the initial stage of digital signals. Pull-up/ Pull-down Resistor - Explained ( with calculation ) Catalog Introduction Ⅰ Why Pull-down and Pull-up Resistor? Ⅱ Pull-up & Pull-down Resistor Circuits Ⅲ What the Role of Pull-up and Pull-down Resistor? Ⅳ Pull-up & Pull-down Resistor Applications Ⅴ How to Select Pull-up & Pull-down Resistors? Ⅵ FAQ Ⅰ Why Pull-down and Pull-up Resistor? Pull-up and pull-down resistors are often applied when interfacing a switch or some other input with a microcontroller or other digital gates. That is, in the initial stage of digital circuit power-on, because the high logical level and low level of the output state are uncertain, in order to make the circuit state normally, a pull-up resistor or pull-down resistor is needed to stabilize the uncertain circuit state. The low logical level is connected to GND inside the IC, and the high level is connected to the super resistance inside the IC.The pull-up resistor connects with the status port of the power supply. Simply put, the high voltage is applied to this point, where the potential will increase. The pull-down resistor means that the resistor is connected to the negative pole, and there is also the case of digital grounding. When the input port signal changes due to different circuit forms, the change will be fed back to the output port, so that the output port acquires a state that should have been completed, but the input port has no signal at this time and keep the original state.According to the above understanding, many people may feel awkward. Take an example from daily life, when you use the key to open the door, people enter but the door is not closed, at this time, you can add a switch to make the door close automatically. Figure 1. Schematic of Pull-up Resistor at Positive Input The above schematic diagram explains why the positive pole and the input terminal resistor can high the level. The two resistances of the port are assumed to be equivalent. We can get that the voltage of the port is 2.5V according to Ohm's law. By connecting the pull-up resistor (red part), the voltage of the port rises at this time, calculate the port voltage. Among them, 10K is connected in parallel with the later connected 1K, and the resistance must be greater than or equal to 1K, which is equivalent to the series relationship between 1K and the 10K resistor below, but the passing current is actually the same. Finally, the voltage of the two 10K resistors increases, and the terminal voltage also increases.The pin connected to the IC and power (or ground) is not necessarily a pull-down resistor. When this happens, many people may think that the red part of the figure is also a pull-down resistor. However, it is not connected in series with any pin or ground. In fact, it is used for circuit startup resistor, not pull-up/pull-down resistor. For the pull-up/pull-down resistors, it is only for the input port and the output port. Although some circuits will connect the pull-up and pull-down resistors to the redundant ports for stability, not all the resistors are connected to one pin of the IC all the time, and the other pin is connected to power or ground to represent the pull-up and pull-down resistors.   Ⅱ Pull-up & Pull-down Resistor Circuits Look at the following analyses to figure out what are pull-up resistor and pull-down resistor in circuits. Pull-up resistors are used to ensure that a wire is pulled to a high logical level in the absence of an input, while pull-down resistors ensure the voltage between VCC and a microcontroller pin is actively controlled. Just check the details below. Figure 2. OC(TTL) Circuit,OD(COMS) Circuit When the I/O port of the IC is in high level, the impedance between the node and GND is very large, which can be understood as infinite. At this time, it is connected to VCC through a pull-up resistor (such as 4.7K ohm, 10K ohm resistor), and the voltage divider of the pull-up resistor is almost negligible. When the I/O port node is in low level, it can be directly connected to GND. At this time, VCC and GND are connected through the pull-up resistor, and the current passing through is very small, which can be ignored.The level value are relative to the ground level, so you should refer to the ground level value. See if those pins are connected to the ground, it has nothing to do with whether they are connected to peripheral devices.Connect a 10K ohm or 4.7K ohm pull-up resistor between the node and +5V to pull up the potential of this node. Often this node requires a single-chip microcomputer or other controller to control it (and this node is connected to I/O). If you simply want to make this node a high level, and the output impedance is very large, you can directly connect the power supply, but if the microcontroller wants to make this node low, that is, the node is grounded inside the microcontroller, so that the 5V power supply and the ground are short-circuited.In addition, when this node is required to be at a high level, the impedance between this node and the ground is generally very large. For example, with an impedance of 100K ohms, when connect a 10K ohm pull-up resistor, the voltage at this point is 100KΩ/(100K +10K)*5V=4.5V, so it can also get a high level.When the node is required to be low level, just connect it to the ground, and there is a 10K resistor between the power supply and the ground, so that it will not be short-circuited. When it is low, there is a loop formed by a load between the power supply and the ground. Sometimes this node will be connected with a resistor in series. Because the current flows to the place with low impedance, the current will flow to the ground through the resistor connected to the power supply instead of Flow to this resistance connected to the node, because the resistor connected to this node has a high impedance, so the potential at this point is in low level.It can be considered that, for the I/O port of the IC, controlling the high and low levels inside the IC is equivalent to controlling the O/O port to be connected to its internal GND or a very large resistor, such as 100K ohms. When the I/O port is the low level (0V), inside the IC, the pin that controls the O/O port of the IC chip is connected to GND.When the I/O port is at a high level, such as 5V, the I/O port pin is connected to a very large resistor in the chip, such as 100K ohms, and sometimes another one is connected in series at the I/O node. A resistor with a small resistance value, such as 68 ohms, because the current flows to a place with low impedance, when the I/O port and GND inside the chip are connected to a low level, the pull-up resistor and the GND inside the chip form a loop.At this time, the current at the I/O port node will flow to the GND inside the chip, because a small resistance resistor is connected in series at the node, which is high resistance relative to GND, so the current will not flow through this series resistor.Using a pull-down resistor, when the I/O port is in a high-impedance state, the pull-up resistor can keep it in a high-level state. That is, when the I/O port is in the high-impedance state, using a pull-down resistor to connect this port to GND. The high-impedance state has a large resistance value, which can be understood as disconnection, in fact, it is actually a large resistor inside the chip. The resistors are connected and pulled to the ground, so there is no current and the level value is 0. It can only work unless a high level value is given to this pin. Figure 3. Pull-up and Pull-down Resistor in MCU   Ⅲ What the Role of Pull-up and Pull-down Resistor? As for the purpose of pull-up & pull-down resistors, generally speaking, the pull-up resistor increases the current, and the pull-down resistor is used to absorb the current.1) Increase the voltage level.When the TTL circuit drives the CMOS circuit, if the output high level of the TTL circuit is lower than the lowest high level of the CMOS circuit, then it is necessary to connect a pull-up resistor to the output terminal of the TTL to increase the value of the output high level. The OC gate circuit must add a pull-up resistor to increase the high-level value of the output.2) Increase the drive capability of the output pin.In order to enhance the drive capability of the output pins, pull-up resistors are often used on some single-chip pins.3) The N/A pin (the pin not connected) should be anti-static and anti-interference.On the CMOS chip, in order to prevent damage caused by static electricity, the unused pins cannot be left floating. Generally, a pull-up resistor is connected to reduce the input impedance, provide a leakage path, and improve the anti-electromagnetic interference ability of the bus. Because the pin is left floating, it is easier to receive electromagnetic interference from the outside world.4) Resistance matchIn the long-line transmission, the resistance mismatch can easily cause the reflected wave interference. In addition, the pull-down resistor makes the resistance match, which can effectively suppress the reflected wave interference.5) Preset space state/default potentialPull-up or pull-down resistors are connected to some CMOS input terminals to preset the default potential. When these pins are not used, these input terminals are pulled down to low level or pulled up to high level. The state when idle on the bus such as I2C is obtained by the pull-up and pull-down resistors.6) Improve the noise tolerance of the chip input signal.If the input terminal is in a high-impedance state, or in a floating state, a pull-down or pull-down resistor needs to be added at this time, so as to avoid the random level. Similarly, if the output terminal is in a passive state, a pull-down or pull-down resistor needs to be added. For example, the output terminal is only the collector of a transistor, thereby improving the noise tolerance of the chip input signal and enhancing the anti-interference ability through a pull-up resistor or pull-down resistor. Figure 4. Pull-up/ Pull-down Resistor   Ⅳ Pull-up & Pull-down Resistor Applications When to use pull-up or pull-down resistors? Look at the following cases explained.1) If a pull-up & pull-down resistor is used for the input signal pin, the usual function is clamping the signal to a certain level to prevent the signal line from appearing in an uncertain state. In practical applications, the 10K ohm resistor is the most used pull-up resistor. Whether to use a pull-up resistor or a pull-down resistor depends mainly on the needs of the circuit system itself. For example, for a highly effective enable control signal, we hope that the circuit system be in an invalid state after power-on, and then a pull-down resistor will be used.Assuming that the enable signal is used to control the motor, if it is left floating, the signal line may be triggered falsely to a high level by other noise interference after power-on (or during operation), resulting in undesired rotation of the motor, and a pull-down resistor can be added at this time. Correspondingly, for the active-low reset control signal (RST#), if we want to be in an inactive state after power-on reset, a pull-up resistor should be used.2) Most chips with logic control functions (such as single-chip microcomputers, FPGAs, etc.) will integrate pull-up or pull-down resistors. Users can choose whether to turn on or not according to their needs. STM32 microcontroller GPIO mode includes pull-up or pull-down.3) According to the resistance value of the pull-up resistor, we can also divide it into strong or weak pull-up/down. The pull-up resistors integrated in the chip are usually weak pull-up (larger resistance), the smaller the pull-up resistance, the stronger the level capability (strong pull), and the stronger the ability to resist external noise (that is, if the unwanted interference noise is to change the strong pull signal level, the required energy must be strengthened accordingly ), but the smaller the pull-up resistance, the greater the corresponding power consumption, because the normal signal requires more energy to change the state of the signal line. In terms of energy consumption, both pull-up /down resistors are the same.4) There is no strict definition of how many ohms are the boundary between strong pull and weak pull. Generally, the pull-up resistors we use are weak pulls, so we can still use external control signals to pull up/down the signal lines as needed.The extreme of the strong pull resistance is the zero, that is, the signal line can directly connected to the power supply or ground.5) There are more knowledge points involved when the pull-up resistor is used as an output (or input and output), but the essential function is also to clamp the level. The most common output pull-up resistor appears in the open collector (OC) Or open drain (OD) structure pin.6) The current sink capability and current source capability are also called the drive capability of the chip pins. For any given chip, the pin drive capability is limited. If the load driven by the pin is large, it may cause the output level to be incorrect (the predetermined level cannot be output).7) OC (OD) pin output structure is different (OC structure exists in the transistor, and OD structure exists in the field effect transistor FET). The output of most comparator chips is an OD/OC output structure, and the signal pins of many chips or modules that feed back the system status are also in this structure, so that users can pull up the level to the corresponding level according to the actual needs of the circuit system. With the power supply voltage VCC, the level conversion can be omitted. Figure 5. Pull up Resistor with Example   Ⅴ How to Select Pull-up & Pull-down Resistor? When select pull-up & pull-down resistors, you can consider the following three aspects:1) Considering power saving, sink current capability of the chip should be large enough, the resistance is large and the current is small.2) It is necessary to ensure sufficient drive current, so the resistance is small and the current is large.3) For high-speed circuits, excessive pull-up resistors may have smooth edges.Considering the above three points comprehensively, the resistance value is usually selected between 1K and 10K. The same principle applies to pull-down resistors.   Ⅵ FAQ 1. What is pull-down and pull-up resistor?A pull-up resistor connects unused input pins (AND and NAND gates) to the dc supply voltage, (Vcc) to keep the given input HIGH. A pull-down resistor connects unused input pins (OR and NOR gates) to ground, (0V) to keep the given input LOW.   2. What is difference between pull up and pull-down resistor?A pull-up resistor connects unused input pins (AND and NAND gates) to the dc supply voltage, (Vcc) to keep the given input HIGH. A pull-down resistor connects unused input pins (OR and NOR gates) to ground, (0V) to keep the given input LOW.   3. When to use pull-up or pull-down resistors?Pull-up and pull-down resistors are often used when interfacing a switch or some other input with a microcontroller or other digital gates. Most microcontrollers have built-in programmable pull-up and/or pull-down resistors, so fewer external components are needed.   4. What is the function of a pull-up resistor?In electronic logic circuits, a pull-up resistor or pull-down resistor is a resistor used to ensure a known state for a signal. It is typically used in combination with components such as switches and transistors, which physically interrupt the connection of subsequent components to ground or to VCC.   5. What is the purpose of pull-down resistor?What is Pull-down Resistors. Similarly to pull-up resistors, pull-down resistors ensure the voltage between VCC and a microcontroller pin is actively controlled when the switch is open. However, instead of pulling a pin to a high value, such resistors pull the pin to a low valued instead.   6. How do you calculate pull-down resistors?To calculate the pull-down resistor value, it's slightly different from the pull-up resistor value. Knowing that current is 100uA, we'll take 0.5v as our pull-down voltage since the input is 0.8v. Thus, applying our R = V/I once again, but this time we don't have to minus, so our formula remains constant.   7. Why does I2C need pull-up resistor?As discussed in the I2C Basics module, the resistors that are commonly seen on I2C circuits sitting between the SCL and SDA lines and the voltage source are called pull up resistors. ... A pull up resistor is used to provide a default state for a signal line or general purpose input/ouput (GPIO) pin.   8. Which port has no built in pull-up resistor?Input/Output (I/O) pin − All the circuits within the microcontroller must be connected to one of its pins except P0 port because it does not have pull-up resistors built-in.   9. What is pull up and pull down in Arduino?Introduction: Understanding the Pull-up/Pull-down Resistors With Arduino. ... With a pull-up resistor and with the button unpressed you make a logic state ON and with the button pressed you make a logic OFF. With a pull - down resistor and a pressed button you make an ON logic state and OFF logic state when its unpressed.   10. What happens if the pull up resistor for an I2C signal is too small?Too small of a value will once again prevent the output drivers from sinking enough current to pull the pin all the way down to 0.
kynix On 2021-10-07   3665
Resistors

What is an Ultrasonic Sensor?

IntroductionDue to their ruggedness and low cost, ultrasonic sensors are widely used in various consumer and industrial areas as an advanced and well-known technology. When adding a measuring distance or detection function to a product, an ultrasonic sensor is the ideal option. Furthermore, it has a broader applicability and improved dependability in hardware upgrades and software adaptations.Video:the Introduction of Ultrasonic SensorsCatalogIntroductionⅠ What is an Ultrasonic Sensor?Ⅱ Operating Principle of Ultrasonic SensorsⅢ Where are Ultrasonic Sensors Typically Used?Ⅳ Advantages and Disadvantages of Ultrasonic Sensors4.1 Advantages of Ultrasonic Sensors4.2 Disadvantages of Ultrasonic SensorsⅤ Limitation of Ultrasonic SensorsⅥ FAQs about Ultrasonic Sensors Ⅰ What is an Ultrasonic Sensor?An ultrasonic sensor is a type of electronic equipment that emits ultrasonic sound waves and converts the reflected sound into an electrical signal to determine the distance of a target item. Ultrasonic waves travel quicker than audible sound (i.e. the sound that humans can hear). The transmitter, which generates sound using piezoelectric crystals and the receiver, which encounters the sound after it has traveled to and from the target, are the two primary components of ultrasonic sensors.Figure:Ultrasonic Sensors Ultrasonic sensors are mostly utilized as proximity sensors. They can be found in self-parking technology and anti-collision safety systems in automobiles. In addition to robotic obstacle detection systems, ultrasonic sensors are used in manufacturing technology. Ultrasonic sensors are less susceptible to interference from smoke, gas, and other airborne particles than infrared (IR) sensors in proximity detection applications (though the physical components are still affected by variables such as heat).Ultrasonic sensors are also utilized as level sensors in closed containers to detect, monitor, and manage liquid levels such as vats in chemical factories.Most notably, ultrasonic technology has allowed the medical profession to create images of interior organs, spot malignancies, and monitor the health of newborns in the womb.Ⅱ Operating Principle of Ultrasonic SensorsUltrasonic sensors operate by emitting a sound wave at a frequency that is above the range of human hearing. To receive and transmit ultrasonic sound, the sensor's transducer functions as a microphone. Like many others, our ultrasonic sensors use a single transducer to send a pulse and receive the echo. The sensor calculates the distance to a target by measuring the time elapsed between delivering and receiving the ultrasonic pulse. This module's operation is straightforward. It emits a 40kHz ultrasonic pulse that travels through the air and, if it encounters an obstruction or object, bounces back to the sensor.The distance can be estimated by multiplying the travel time by the speed of sound.Figure:Operating Principle of Ultrasonic Sensors Ultrasonic sensors are an excellent solution for detecting clear objects. Because of target translucence, applications that use infrared sensors, for example, struggle with this particular use case for liquid level measurement.Ultrasonic sensors detect things independent of color, surface, or material for presence detection (unless the material is very soft like wool, as it would absorb sound.)Ultrasonic sensors are a trustworthy solution for detecting translucent and other things where optical methods may fail.Ⅲ Where are Ultrasonic Sensors Typically Used?Liquid level sensing is the first of the two most frequent ultrasonic sensor applications, as they can detect liquids of any hue or opacity while remaining non-contact. The second is universal object detection, which is advantageous because of its low cost and simplicity. Anti-collision detection for vehicles, person identification, presence detection, box sorting, pallet detection with forklifts, bottle counting on drink filling machines, and many other applications are examples of object detection applications.Figure:Where are Ultrasonic Sensors Typically UsedⅣ Advantages and Disadvantages of Ultrasonic Sensors4.1 Advantages of Ultrasonic Sensors1.Not affected by the color or transparency of the object Because the ultrasonic sensor reflects the sound out of the item, the color or transparency of the object does not affect the sensor's reading. 2.Can it be used in low-light conditions?Dark settings have little effect on the detecting capability of ultrasonic sensors, unlike proximity sensors that use light or cameras. 3.Unaffected by dust, filth, or high humidity levelsAlthough many sensors perform well in these situations, others generate inaccurate readings, particularly in extreme conditions when substantial volumes of dust or water build. 4.High precision in some applicationsWhen measuring the thickness and distance between parallel surfaces, ultrasonic sensors have a high degree of precision. 5.PenetrationThe ultrasonic sensor's high sensitivity and penetrating capability make it easier to detect the outside environment as well as deep things. 6.Strong anti-environmental interference:It is very resistant to environmental influence and may be used in any lighting environment. Reliable performance in a wide range of illumination settings, including indoor, outdoor, and complicated ambient light. Because ultrasonic sensors are not affected by smoke or black matter and can detect light, smoke, dust, colors, materials, and so on, they are superior to infrared sensors in various applications. 7.Wide range of applications: Ultrasonic sensors may be utilized for a variety of applications such as water level detection, drone applications, automatic obstacle avoidance applications, distance detection applications, and so on. 8.Multi-purpose: Detection of presence or absence, detection of level, detection of location, detection of distance, and so on. It can suit the needs of the majority of non-contact detecting applications. 4.2 Disadvantages of Ultrasonic Sensors• Unable to work in a vacuum.Because ultrasonic sensors rely on sound to function, they simply cannot function in a vacuum because there is no air to disperse the sound. • Unsuitable for use underwater • Soft materials will have an impact on sensing accuracy. Objects wrapped in a soft fabric absorb more sound waves, making it difficult for the sensor to see the target. • A temperature change of 5-10 degrees Celsius or higher will influence sensor accuracy.However, many manufacturers' devices now include temperature correction, and these sensors can be calibrated at starting or before each range reading based on any changes in temperature, voltage, and so on. • Small objects have a tough time reflecting sound waves.The object may be too small to reflect enough sound waves to the sensor to be detected. • It is difficult to capture the reflected wave in some shapes. Ⅴ Limitation of Ultrasonic SensorsUltrasonic sensors, such as the HC-SR04, can measure distances of up to 400 cm with a 3 mm tolerance. However, if a target object is placed in such a way that the ultrasonic signal is deflected away rather than reflected by the ultrasonic sensor, the measured distance may be wrong. In some circumstances, the target object is so small that the reflected ultrasonic signal is insufficient to identify it and the distance cannot be accurately determined.Figure:HC-SR04 Moreover, things such as fabric and carpet can absorb auditory impulses. If the signal is absorbed at the end of the target item, it cannot be reflected the sensor, and so the distance cannot be recorded. The high sensitivity of ultrasonic sensors makes them efficient, but it can also present issues. Ultrasonic sensors, for example, can identify spurious signals from airwaves disrupted by an air conditioning system and a pulse from a ceiling fan. Ultrasonic sensors can detect items within their range, but they can't tell the difference between different forms and sizes. However, by employing two sensors instead of simply one, this constraint can be circumvented. Both sensors can be installed at a distance from each other or next to each other. The shape and size of the target item can be determined by examining the overlapped shaded zone. Ⅵ FAQs about Ultrasonic SensorsHow many types of ultrasonic sensors are there?Four types.All together there are four types of ultrasonic sensors, classified by frequency and shape: the drip-proof type, high-frequency type, and open structure type (lead type and SMD type). Which ultrasonic sensor is best?First,5Pcs Ultrasonic Sensor Module Kit HC-SR04 Distance Sensor with 3pcs Mounting Bracket Compatible with Arduino UNO Mega R3 Mega2560 Duemilanove Nano Rapsberry Pi 3 Robot XBee ZigBee. Sencond,waterproof Ultrasonic Module JSN-SR04T Water Proof Integrated Distance Measuring Transducer Sensor for Arduino. How can we protect ultrasonic sensor from water?Speaker grill cloth, wire mesh, and an open-celled foam are ways to conceal ultrasonic sensors for your application.For proper operation, moisture, temperature, and acoustic return must be taken into consideration when attempting to conceal the sensor. Do ultrasonic sensors interfere with each other?A basic ultrasonic sensor will have interference in the reported range when more than one sensor is operating in the same general space.Since the sensors are not synchronized, the sensors will range at slightly different intervals. These frequency drifts cause interference between sensors for most applications. How accurate are ultrasonic sensors?The more accurate ultrasonic sensors can achieve 0.1-0.2% of the detected range under perfectly controlled conditions, and most good ultrasonic sensors can generally achieve between 1% and 3% accuracy. How far can ultrasonic sensor work?Ultrasonic sensors are suitable for close range detection up to ten meters and provide multiple range measurements per second. What is the principle of an ultrasonic sensor?Outline and detection principle. As the name indicates, ultrasonic sensors measure distance by using ultrasonic waves. The sensor head emits an ultrasonic wave and receives the wave reflected back from the target. Ultrasonic Sensors measure the distance to the target by measuring the time between the emission and reception. What is the range of ultrasonic sensors?Ultrasonic sensors are suitable for close range detection up to ten meters and provide multiple range measurements per second. What are the advantages of ultrasonic smoke detectors?Ultrasonic sensors are suitable for close range detection up to ten meters and provide multiple range measurements per second. Low power consumption – can be powered by battery, inexpensively. It can operate in many environmental conditions – ultrasonic sensors work in smoke-filled environments, where other sensors would fail. What is ultrasonic sensor in IoT?IoT ultrasonic sensors are designed for non-contact detection of solid and liquid objects. These sensors are used for a wide variety of functions from monitoring the level of water in a tank to fluid identification/concentration, to detecting object proximity. 
kynix On 2021-08-18   7995

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Follow us

Join our mailing list!

Be the first to know about new products, special offers, and more.

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserve.