본문 바로가기

Eelektronika

Grid line follower working concept

반응형
In this blog, the author will share experiences about How to make grid line follower Using Arduino Uno from scratch for free members as well as detailed explanations so you can understand how line follower It's better for you to do soS or software. On this blog And this time there was a pendulum pen that was practically sent to the public tent grid line follower because the purpose of creating this blog is to make you understand and comprehend when designing line follower so you can grow grid line follower Here's what happened next.

This page explains in general about the equipment or components and how some of the components used work grid line follower. This is probably the first thing to do with your bag grid line follower You This may be the cause of the loss of sites and blog content whose books are filled with mud bags and holes. It is necessary to use a general explanation of the components that will be used in development grid line follower.

General Explanation of Devices or Components Used by the Grid Line follower

This blog provides information on how to build grid line follower If you want to download the video, please click the link below to download the program.

Videos grid line follower

Arduino Uno
Arduino Uno can be used to control devices puck ATmega328P, has 14 digital pins input output (6 pins can be used as PWM output6 pins are used as analog inputs), 16 MHz crystal oscillatora USB port, electric plugs, Reset button. The operating voltage of the Arduino Uno is 5 Volts. Here's why resource which is connected to electric plugs It also works with 7-12 Volts. It also works on USB ports, and also uses 5 Volt ports.

Arduino Uno board
Figure 1. Arduino Uno board


Line sensors (line)
The line sensor is built from two main components, namely IR LEDs (Infrared LED) And photodiode. Photodiode and IR LED installed on line follower This position also includes a 2-inch seat with an IR LED screen. infrared Or the light is hot and the light hits the surface line or lines that can reflect light, then the light is reflected and then received by photodiode. By receiving light infrared on. on photodiode so photodiode Flows electric current to both terminals photodiode there is tension. Placement of IR LEDs and photodiode as line The sensors have different sensitivity options. The author prefers a position like Figure 2 because the light is more easily reflected by the jack compared to installing an IR LED and photodiode perpendicular to line or line.

White line sensor (line sensor)
Figure 2. Sensors used (line sensor)



What is an IR LED (Infrared LED)?
It is an LED where if given a forward voltage the LED will emit hot light or light infrared. This light is invisible to the eye. How to use IR LEDs is the same as other LEDs or diodes.

What's that Photodiode ?
Photodiode It is a diode component which when exposed to hot light (infrared)

This photodiode can be downloaded from the list. Do not know what to do
photodiode
Will work only if the surface is exposed to light infrared. Keep that in mind photodiode Does not convert light energy into electricity as such solar cells. This is what makes me happy photodiode Must be installed upside down or in condition come back There are many separate pads for 3 dirhams, but there are also some photodiode Will function as a regular diode.

Infrared light receiver circuit
Figure 3. Light receiver circuit infrared


It doesn't matter infrared,
photodiode
There are a lot of people who are in love, but also what people talk about when they are there, but they are in the same place. photodiode separate conditions
come back on diodes or other LEDs. It doesn't matter infrared Regarding the surface photodiodecurrent will flow from the Cathode to the Anode despite conditions photodiode in a state of come back Or inversely relative to voltage. The amount of current flowing at the terminal photodiode depending on the light intensity infrared which is about photodiode.

In Figure 3, if photodiode Exposed to hot light or infraredthe voltage Vout will be small because of the current flowing or discharged through it photodiode.


Op-amp as a comparison
The op-amp as a comparator works if the op-amp does not have a feedback circuit with the following conditions:
  1. Von+ Read more Vin the- (Von+ > Vin the-) so output op-amp will tall. Tall here it means voltage output op-amp approaches the source voltage.
  2. If tense Vin+ smaller in comparison Vin the- (Vin+ in the-)or Vin+ together with Vin the- (Vin+ =Vin the-) then the voltage output (Vgo out) become low (0 volts).
    Figure 4. Op-amp

Op-amp as a comparator in a circuit grid line follower serves to adjust the sensitivity level of the sensor range infrared
No need to replace DC pad photodiode with a dc voltage source whose voltage can be changed via a potentiometer. To get a complete sensor circuit then enter The comparator circuit is combined with the circuit photodiode.

Photodiode sensitivity setting circuit
Figure 5. Circuit for adjusting photodiode sensitivity



In Figure 5, when photodiode receive light infrared, output become low (close to 0 Volts or 0 Volts) Where the LED indicator lights up because current flows from the source to terminal number 1 of the op-amp. This circuit is intended for active programmed Arduino low where the voltage is low (low) will be trigger Or Arduino trigger to end program command. Potentiometers are used to adjust the sensitivity of light reception infrared on. on photodiode.


PWM (Pulse Width Modulation)
PWM bearing function grid line follower used to regulate the speed of a DC motor so that line follower Available everywhere line or track where the speed of a dc motor can be increased or decreased gradually just by setting it cycle PWM pulse. A general overview of how PWM works can be seen in how a comparator works where a triangular or sawtooth wave is compared to dc voltage. In this case the DC signal whose voltage is varied causes cycle or comparison tall And low PWM signal changes.

PWM signal
Figure 6. PWM signal

Figure 6 Caption:
The yellow signal in Figure 6 above is a PWM signal and is produced from a dc voltage (green) with a sawtooth wave voltage (pink).

Please choose:
The sawtooth wave is input to the (+) terminal of the op-amp, dc voltage is input to the (-) terminal via a potentiometer so that the dc voltage can be changed. By changing the dc voltage as a result of changing the potentiometer value, the square wave (PWM) will change cycleit or changes in comparison tall And low-his. No need to worry about the position of the potentiometer which can also be used cycle PWM wave
.

Duty cycle settings
Figure 7. Setting settings cycle


Why can PWM change the speed of a DC motor?
To simplify the analogy of why PWM can regulate the speed of a DC motor, it is logically when turning on and turning on an incandescent lamp (bulb) with a manual switch. It is also possible to read this post on And dead There are many different types of items that can be removed from a site on longer in comparison deadwhat incandescent light looks brighter than when the switch is in position dead Longer than on.

This may be difficult tall The wave is longer than the positioni low So the dc motor rotates faster compared to positioning low Longer or longer than positioni tall. The dc motor rotates at maximum speed at the PWM wave position always tall or position lowit's very short.

Illustration of how PWM works on the ATmega328P microcontroller
Figure 8. Illustration of how PWM works on the ATmega328P microcontroller



The internal PWM in a microcontroller works similarly to PWM in an analog circuit, namely by comparing values ward off TCNTn with the OCRnx register value, the resulting PWM signal is output at harbor

Or the OCnx terminal which can be seen in the Arduino Uno specifications. For a detailed explanation regarding PWM, discuss the Arduino Uno PWM chapter.


Driver L239D DC motor

To drive a DC motor, a separate circuit is needed so as not to disrupt the Arduino's performance because each Arduino terminal or pin is only capable of producing a current of around 20 mA. This circuit is often called gan DC motor drive which generally uses transistor components. In designer grid line follower This uses a small dc motor so it can use the IC L239D with output Maximum about 600mA each channelHis, still here driver's motorbike The dc L239D is very easy to design compared to having to assemble several transistors.

L293D DC motor driver circuit
Figure 9. Circuit driver L293D DC motor



The description of the IC L293D image above is as follows:
  1. Terminal No. 1 available possible or disabled M2 motor rotation. At terminal no 1 tall This M2 motorbike can be used without problems.
  2. Terminals no.2 and no.7 are used to control the rotation of the M2 motor to rotate cw (clockwise) or cw (counterclockwise)
    Or simply to set whether the M2 motor rotates to the right or left. Voltage enter This terminal is obtained from the terminal or pin on the Arduino Uno.
  3. Terminals no.3 and no.6 are connected directly to the dc motor M2 so that they can be used.
  4. Terminal No. 8 has a large number of L239D ICs powered by a large terminal pad with a maximum capacity of +5 Volts.
  5. Terminal No. 9 is for possible or disabled M1 motor rotation. At terminal no.9 tall The M1 motor can be installed without using it.
  6. Terminals no. 10 and 15 are connected directly to the dc motor M1 so that they can be used.
  7. Terminal 16 Is the terminal enter voltage used to run a DC motor. Maximum recommendation is 12 Volts.
  8. Terminals no. 3 and 6 are connected directly to the dc motor.
  9. Terminals 5, 6, 13, 12 are connected to grounding or 0 Volt voltage.
Project Materials Grid Line Follower :
  1. Grid Line Follower Working Concept
  2. How Arduino Uno's PWM works for regulating dc motor speed
  3. Interrupt timer For line sensor reading
  4. Line Sensor Reading Program Code
  5. Mechanics and movement Grid Line Follower
  6. Complete Code Grid Line Follower
  7. PCB and Grid Line Follower Circuit
EOF
반응형

'Eelektronika' 카테고리의 다른 글

Timer interrupt with line sensor  (0) 2024.04.26
Timer interrupt with line sensor  (4) 2024.04.26
Kode program pembacaan sensor garis grid counter  (0) 2024.04.26
MOSFET  (3) 2024.04.26
Fast Fourier Transform  (0) 2024.04.26