<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yash Raj Ghosh on Medium]]></title>
        <description><![CDATA[Stories by Yash Raj Ghosh on Medium]]></description>
        <link>https://medium.com/@yashrajghosh1323?source=rss-99fd4b87686c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*f5mhbIw__YVJzh9Y</url>
            <title>Stories by Yash Raj Ghosh on Medium</title>
            <link>https://medium.com/@yashrajghosh1323?source=rss-99fd4b87686c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 21:34:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yashrajghosh1323/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Out of Balance of a Stationary Disc]]></title>
            <link>https://medium.com/@yashrajghosh1323/static-unbalance-measurement-of-a-disc-using-three-load-cells-6d5f0a2c77fd?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d5f0a2c77fd</guid>
            <category><![CDATA[machine]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 18:02:18 GMT</pubDate>
            <atom:updated>2026-09-04T17:52:47.987Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*hjioBvAQHQS_tR_OshKFMw.png" /></figure><h3>1. Introduction</h3><p>When a disc is perfectly balanced, its center of gravity lies exactly on its rotational axis. In a real disc, however, the material may not be distributed uniformly. One region may contain slightly more material than another, causing the center of gravity to shift away from the axis of rotation.</p><p>This condition is known as <strong>static unbalance</strong>.</p><p>A simple way to detect this unbalance is to place the disc on three load cells arranged at equal angular positions. In this arrangement, the load cells do more than measure the total weight of the disc. They also provide information about how the weight is distributed around the disc.</p><p>The measured load distribution can then be used to determine:</p><ul><li>The position of the heavy side</li><li>The amount by which the center of gravity has shifted</li><li>The static unbalance of the disc</li><li>The correction weight required to balance the disc</li><li>The angular position where the correction should be applied</li></ul><h3>2. Three-Load-Cell Arrangement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tvG2jcM7BRrS6w-O" /></figure><p>Consider three load cells positioned 120° apart around the disc.</p><p>The positions can be defined as:</p><ul><li>Load Cell 1 → 0°</li><li>Load Cell 2 → 120°</li><li>Load Cell 3 → 240°</li></ul><p>When the disc is placed on the three load cells, each sensor measures a portion of the total disc weight.</p><p>Let the readings be:</p><p><strong>W1 = Load Cell 1 reading</strong></p><p><strong>W2 = Load Cell 2 reading</strong></p><p><strong>W3 = Load Cell 3 reading</strong></p><p>The total weight of the disc is:</p><p><strong>W = W1 + W2 + W3</strong></p><p>For example, if the disc weighs approximately 330 g, the three readings should add up to approximately 330 g.</p><h3>3. Why Three Load Cells Are Required</h3><p>If only one load cell is used, we can determine the total weight of the disc, but we cannot determine where the heavier portion of the disc is located.</p><p>Three load cells provide measurements at three different positions.</p><p>For example:</p><ul><li>If all three readings are nearly equal, the disc is approximately balanced.</li><li>If Load Cell 1 shows a higher value, the center of gravity is shifted toward that side.</li><li>If Load Cell 2 and Load Cell 3 have different values, the center of gravity is shifted toward one of those directions.</li></ul><p>Therefore, the three measurements can be used to determine the position of the disc’s center of gravity.</p><h3>4. Determining the Center of Gravity</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Viavi_e4uYCyyAxV" /></figure><p>Assume the three load cells are located on a circle of radius R from the center of the disc.</p><p>The coordinates of the three load cells can be defined as:</p><p><strong>Load Cell 1:</strong></p><p>X1 = R<br>Y1 = 0</p><p><strong>Load Cell 2:</strong></p><p>X2 = -R/2<br>Y2 = (√3/2) × R</p><p><strong>Load Cell 3:</strong></p><p>X3 = -R/2<br>Y3 = -(√3/2) × R</p><p>Using the measured load-cell values, the X-coordinate of the center of gravity can be calculated as:</p><p><strong>Xcg = R × [W1 — (W2/2) — (W3/2)] / W</strong></p><p>Similarly, the Y-coordinate is:</p><p><strong>Ycg = R × [(√3/2) × (W2 — W3)] / W</strong></p><p>These two values tell us how far the center of gravity has moved from the geometric center of the disc.</p><h3>5. Finding the Amount of Displacement</h3><p>Once Xcg and Ycg are known, the distance between the geometric center and the actual center of gravity can be calculated.</p><p>This distance is called the <strong>eccentricity</strong>.</p><p>In simple terms:</p><p><strong>Eccentricity = distance between the disc center and its center of gravity</strong></p><p>The calculation is:</p><p><strong>e = √(Xcg² + Ycg²)</strong></p><p>Here:</p><ul><li>e = eccentricity</li><li>Xcg = horizontal displacement of the center of gravity</li><li>Ycg = vertical displacement of the center of gravity</li></ul><p>If the value of e is zero, the center of gravity lies exactly at the center and the disc has no static unbalance.</p><h3>6. Finding the Heavy-Spot Angle</h3><p>The magnitude of the unbalance is not enough. We also need to know <strong>where the heavy portion of the disc is located</strong>.</p><p>The angle of the center of gravity can be calculated using:</p><p><strong>θ = atan2(Ycg, Xcg)</strong></p><p>The resulting angle is measured from the 0° reference position of Load Cell 1.</p><p>For example:</p><ul><li>θ = 0° means the heavy side is toward Load Cell 1.</li><li>θ = 120° means the heavy side is toward Load Cell 2.</li><li>θ = 240° means the heavy side is toward Load Cell 3.</li></ul><p>The ATAN2 function is useful because it automatically determines the correct quadrant of the angle.</p><h3>7. Calculating Static Unbalance</h3><p>The eccentricity tells us how far the center of gravity has moved, but it does not directly tell us the amount of unbalance.</p><p>For that, the total mass of the disc is also required.</p><p>Static unbalance is calculated as:</p><p><strong>U = M × e</strong></p><p>where:</p><ul><li>U = static unbalance</li><li>M = mass of the disc</li><li>e = eccentricity</li></ul><p>If the mass is expressed in grams and the eccentricity is expressed in millimetres, the resulting unit is:</p><p><strong>g·mm</strong></p><p>This is the commonly used unit for static unbalance.</p><h3>8. Example</h3><p>Suppose the disc has a total mass of approximately:</p><p><strong>M = 330 g</strong></p><p>Assume the three load cells give:</p><p><strong>W1 = 120 g</strong></p><p><strong>W2 = 105 g</strong></p><p><strong>W3 = 105 g</strong></p><p>The total is:</p><p><strong>W = 120 + 105 + 105</strong></p><p>Therefore:</p><p><strong>W = 330 g</strong></p><p>Assume the load cells are positioned at a radius of:</p><p><strong>R = 100 mm</strong></p><p>The X-coordinate of the center of gravity becomes:</p><p><strong>Xcg = 100 × [120 — (105/2) — (105/2)] / 330</strong></p><p>This gives:</p><p><strong>Xcg ≈ 4.55 mm</strong></p><p>Since W2 and W3 are equal:</p><p><strong>Ycg = 0 mm</strong></p><p>Therefore:</p><p><strong>e = √(4.5⁵² + ⁰²)</strong></p><p>So:</p><p><strong>e ≈ 4.55 mm</strong></p><p>This means that the center of gravity of the disc is approximately 4.55 mm away from the geometric center.</p><p>The static unbalance is:</p><p><strong>U = 330 × 4.55</strong></p><p>Therefore:</p><p><strong>U ≈ 1500 g·mm</strong></p><p>The heavy spot is at approximately:</p><p><strong>θ = 0°</strong></p><p>So the heavier portion of the disc is toward Load Cell 1.</p><h3>9. Calculating the Correction Weight</h3><p>Suppose the correction will be made at a radius of 100 mm.</p><p>The required correction mass can be calculated as:</p><p><strong>Correction mass = Static unbalance / Correction radius</strong></p><p>Therefore:</p><p><strong>Mc = U / Rc</strong></p><p>For the example:</p><p><strong>Mc = 1500 / 100</strong></p><p>Therefore:</p><p><strong>Mc = 15 g</strong></p><p>So approximately 15 g of material would need to be added at the correction radius.</p><p>The correction should be applied approximately <strong>180° opposite the heavy spot</strong>.</p><p>In this example:</p><p><strong>Heavy spot = 0°</strong></p><p>Therefore:</p><p><strong>Correction position = 180°</strong></p><p>This counteracts the existing unbalance.</p><h3>10. Important Point: Unbalance Is Not Simply “Extra Weight”</h3><p>One important concept should be understood when designing this system.</p><p>The load cells do not directly tell us:</p><blockquote><em>“There is 15 g of extra material at this location.”</em></blockquote><p>Instead, they tell us where the <strong>resultant center of gravity</strong> of the entire disc has moved.</p><p>The actual unbalance is a combination of:</p><p><strong>Disc mass × distance of the center of gravity from the rotational axis</strong></p><p>Therefore, a small amount of material located far from the center can create the same unbalance as a larger amount of material located closer to the center.</p><p>This is why static unbalance is normally expressed in <strong>g·mm</strong> rather than simply grams.</p><h3>11. The Complete Calculation Flow</h3><p>The complete measurement process can therefore be summarized as:</p><p><strong>Step 1:</strong> Measure W1, W2 and W3.</p><p><strong>Step 2:</strong> Calculate total weight:</p><p>W = W1 + W2 + W3</p><p><strong>Step 3:</strong> Calculate the center-of-gravity coordinates:</p><p>Xcg = R × [W1 — W2/2 — W3/2] / W</p><p>Ycg = R × (√3/2) × (W2 — W3) / W</p><p><strong>Step 4:</strong> Calculate eccentricity:</p><p>e = √(Xcg² + Ycg²)</p><p><strong>Step 5:</strong> Calculate heavy-spot angle:</p><p>θ = atan2(Ycg, Xcg)</p><p><strong>Step 6:</strong> Calculate static unbalance:</p><p>U = M × e</p><p><strong>Step 7:</strong> Calculate the required correction mass:</p><p>Mc = U / Rc</p><p><strong>Step 8:</strong> Apply the correction approximately 180° opposite the heavy-spot angle.</p><h3>12. Practical Calibration</h3><p>In a real machine, the theoretical equations alone are not enough.</p><p>Load cells have small differences in sensitivity and offset. The mechanical structure can also introduce errors.</p><p>Therefore, calibration should be performed before calculating the unbalance.</p><p>A practical calibration procedure is to place known weights at known angular positions on the disc and record the three load-cell readings.</p><p>For example, a known test weight can be placed at:</p><ul><li>0°</li><li>120°</li><li>240°</li></ul><p>The measured response can then be compared with the expected response.</p><p>This allows software corrections to be introduced for:</p><ul><li>Load-cell offset</li><li>Sensitivity differences</li><li>Mechanical asymmetry</li><li>Platform weight</li><li>Sensor drift</li><li>Mounting errors</li></ul><p>For an industrial system, calibration is essential if the goal is to obtain accurate unbalance measurements rather than simply detect whether the disc is balanced or unbalanced.</p><h3>13. Simulation Results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N674b5F_9UoJoQBA_SiOUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kSh25JX1Lp218E31J1XRmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xUF3mMcT0yivMaHO4w46Q.png" /></figure><h3>13. Static Balancing vs Dynamic Balancing</h3><p>The three-load-cell method described here is primarily a <strong>static balancing method</strong>.</p><p>It determines the displacement of the center of gravity in a plane.</p><p>This works well for discs, grinding wheels, fans, pulleys and similar components where the main concern is static unbalance.</p><p>For long rotors, shafts and rotating assemblies, however, the problem can be more complicated.</p><p>Such components can have <strong>couple unbalance</strong>, where the mass distribution creates an angular moment even when the overall center of gravity lies close to the rotational axis.</p><p>In such cases, a two-plane dynamic balancing system is normally required.</p><h3>14. Conclusion</h3><p>A three-load-cell arrangement provides a relatively simple way to measure the static unbalance of a disc.</p><p>Instead of looking only at the total weight, the system analyses how the weight is distributed between three equally spaced support points.</p><p>From these three measurements, the system can determine:</p><p><strong>Load distribution → Center-of-gravity position → Eccentricity → Heavy-spot angle → Static unbalance → Correction weight</strong></p><p>This approach can form the basis of an automated balancing system in which the load cells continuously measure the disc, a controller calculates the unbalance, and the required correction weight and angular position are displayed to the operator.</p><p>For a 330 g disc, the system can therefore go beyond simply saying <strong>“the disc is unbalanced.”</strong></p><p>It can provide a much more useful result:</p><p><strong>“The disc has approximately X g·mm of static unbalance, with the heavy spot located at θ°, and a correction mass of approximately Y g is required at the specified correction radius.”</strong></p><p>That makes the system suitable as a foundation for an automated disc inspection and balancing machine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d5f0a2c77fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AUTOMATIC WATER PUMP]]></title>
            <link>https://medium.com/@yashrajghosh1323/automatic-water-pump-6b3142fc39ff?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b3142fc39ff</guid>
            <category><![CDATA[automatic-water-pump]]></category>
            <category><![CDATA[water-pump-installation]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 06:14:49 GMT</pubDate>
            <atom:updated>2023-04-11T06:14:49.170Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h3>(Hardware)</h3><ol><li>Arduino UNO/ESP-8266(NODE MCU)</li><li>HC-SR04(Ultrasonic Sensor)</li><li>Mini water pump/BO-MOTOR</li></ol><h3>(Software)</h3><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li><li>Fritzing</li></ol><p><strong><em>PIN CONFIGURATION &amp;WORKING OF HC-SR04:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*iw3DtJPR2CP53RXQ.jpeg" /></figure><p><strong><em>Trigger Pin: </em></strong>This pin sent 5v 10us pulse</p><p><strong><em>ECHO Pin: </em></strong>This pin outputs a pulse of 150us-25ms</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/0*As6jjwrG3EoGqOoF.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/0*Yr5kyEPb8znDYXgo.png" /></figure><p><strong><em>WORKING:</em></strong></p><p>When the trigger pin sent a 5v/10us pulse, the device sends 8 ultrasonic pulses, each of them are 40KHz. As per the instruction, the ECHO pin output a pulse of 150us to 25ms. If there is no object in the range of the sensor then after 38ms it will timeout. OR if there is an object then the sensor can detect the distance of the object from the sensor by calculating the time delay of transmission of the pulse and receiving the pulse.</p><p>As the Ultrasonic sensor travel at the speed of sound the it is 343m/s at room temperature(20 degree Celsius).</p><p>HC-SR04 calculates the distance as,</p><p><strong><em>[Distance=(Duration or Time delay(in us)/2)x 0.0343]</em></strong></p><p><strong><em>EXAMPLE:</em></strong></p><p>Time delay= 500us</p><p>so,</p><p>Distance=(Duration or Time delay(in us)/2)x 0.0343</p><p>=(500/2)x 0.0343</p><p>=250x0.0343</p><p>=8.575cm</p><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q9b6c2MqviLJ38MYQpPBhQ.png" /><figcaption>USING ESP-8266(NODE MCU)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_XGz2o_FjkjPvDNyM8MkA.png" /><figcaption>USING Arduino UNO</figcaption></figure><p><strong><em>PROGRAM:</em></strong></p><p>//#define trig=D6; 6(UNO)</p><p>//#define echo=D5; 5(UNO)</p><p>float duration, distance;</p><p>void setup()</p><p>{</p><p>Serial.begin(9600);</p><p>pinMode(D8,OUTPUT); //9-&gt; UNO</p><p>pinMode(D6,OUTPUT);</p><p>pinMode(D5,INPUT);</p><p>}</p><p>void loop()</p><p>{</p><p>digitalWrite(D6,LOW);</p><p>delayMicroseconds(2);</p><p>digitalWrite(D6,HIGH);</p><p>delayMicroseconds(2);</p><p>duration=pulseIn(D5,HIGH);</p><p>distance=(duration/2)*0.0343; //For Distance in centimeter(cm)</p><p>//Serial.print(“\ndistance= “);</p><p>if(distance&gt;=20)</p><p>{</p><p>Serial.print(distance);</p><p>Serial.print(“\n”);</p><p>digitalWrite(D8,HIGH );</p><p>}</p><p>else{</p><p>Serial.print(distance);</p><p>digitalWrite(D8,LOW);</p><p>delay(500);</p><p>Serial.print(“\n”);</p><p>}</p><p>delay(500);</p><p>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b3142fc39ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SPEED-METER WITH INFRARED SENSOR]]></title>
            <link>https://medium.com/@yashrajghosh1323/speed-meter-with-infrared-sensor-84a3457753d5?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/84a3457753d5</guid>
            <category><![CDATA[ir-sensor]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[buzzer]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Wed, 29 Jun 2022 08:55:31 GMT</pubDate>
            <atom:updated>2022-06-29T08:55:31.707Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h3>(Hardware)</h3><ol><li>Arduino UNO</li><li>HW-201(IR_sensor)</li><li>Electromagnetic Buzzer Module</li></ol><h3>(Software)</h3><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li><li>TinkerCAD (<a href="http://tinkercad.com/">tinkercad.com</a>)</li></ol><p><strong><em>PIN CONFIGURATION &amp;WORKING OF </em></strong>HW-201<strong><em>:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTasFP6g_lFDBzTxAkOhEw.jpeg" /></figure><p><strong><em>WORKING:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*IKvTP6ecs12fxI4OhOzFbA.png" /></figure><p><strong>Distance adjustment variable resistor:</strong> It is to set the maximum distance that the sensor can read. By rotating the screw, we can control the sensitivity of the sensor</p><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7Yty3S4mArTkofTktMc4g.jpeg" /></figure><p><strong><em>WHAT WILL THE DEVICE DO?</em></strong></p><p>If any object passes in the range of this device, it will read the time of passing one sensor and similarly for the other sensor. After that it will calculate the difference of time that the object took to pass one sensor to other.</p><p>If the distance between two sensors is ‘L’ and time taken by the object is ‘T’, then the speed of the object will be,</p><h3><strong>[S=L/T]</strong></h3><p>now, if the speed is more than 50km/hr then the buzzer will the active.</p><p><strong><em>PROGRAM:</em></strong></p><p>int timer1;<br>int timer2;</p><p>float Time;</p><p>int flag1 = 0;<br>int flag2 = 0;</p><p>float distance = 5.0;<br>float speed;</p><p>int ir_s1 = 6;<br>int ir_s2 = 5;</p><p>void setup(){<br> pinMode(ir_s1, INPUT);<br> pinMode(ir_s2, INPUT);<br> pinMode(12, OUTPUT);<br> <br> Serial.begin(9600);<br> }</p><p>void loop() {<br>if(digitalRead (ir_s1) == LOW &amp;&amp; flag1==0)<br>{<br> timer1 = millis();<br> flag1=1;<br>}</p><p>if(digitalRead (ir_s2) == LOW &amp;&amp; flag2==0)<br>{<br> timer2 = millis();<br> flag2=1;<br>}</p><p>if (flag1==1 &amp;&amp; flag2==1){<br> if(timer1 &gt; timer2){Time = timer1 — timer2;}<br>else if(timer2 &gt; timer1){Time = timer2 — timer1;}<br> Time=Time/1000;//convert millisecond to second<br> speed=(distance/Time);//S=L/T<br> speed=speed*3600;//multiply by seconds per hr<br> speed=speed/1000;//division by meters per Km<br>}</p><p>if(speed==0)<br>{ <br> if(flag1==0 &amp;&amp; flag2==0)<br> {<br> Serial.print(“\nNo car detected\n”);<br> delay(1000);<br> }<br> else{Serial.print(“Searching… \n”);<br> delay(800);} <br>}<br>else{<br> // Serial.clear();<br> Serial.print(“Speed:”);<br> Serial.print(speed);<br> Serial.print(“Km/Hr “);<br> if(speed &gt; 50)<br> {<br> Serial.print(“ Over Speeding “);<br> digitalWrite(12, HIGH);}<br> else<br> {<br> Serial.print(“ Normal Speed “);<br> } <br> delay(3000);<br> digitalWrite(12, LOW);<br> speed = 0;<br> flag1 = 0;<br> flag2 = 0; <br> }<br>}</p><p><strong><em>OUTPUT:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*b6eNwnB4rwe2ta66efr4Tw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84a3457753d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distance measurement with respect to Time by using Ultrasonic Sensor]]></title>
            <link>https://medium.com/@yashrajghosh1323/distance-measurement-with-respect-to-time-by-using-ultrasonic-sensor-c7e0fb742c6?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7e0fb742c6</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[ultrasonic-sensor]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Sun, 05 Jun 2022 13:50:27 GMT</pubDate>
            <atom:updated>2022-06-05T13:50:27.159Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h3>(Hardware)</h3><ol><li>Arduino UNO</li><li>HC-SR04(Ultrasonic Sensor)</li></ol><h3>(Software)</h3><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li><li>TinkerCAD (<a href="http://tinkercad.com/">tinkercad.com</a>)</li></ol><p><strong><em>PIN CONFIGURATION &amp;WORKING OF HC-SR04:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*jlz5gni07n625srZehxTAw.jpeg" /></figure><p><strong><em>Trigger Pin: </em></strong>This pin sent 5v 10us pulse</p><p><strong><em>ECHO Pin: </em></strong>This pin outputs a pulse of 150us-25ms</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*ftwTIE4FgKEeSBgt6bPaYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*_TOvdNjS2oblat-LepSfJw.png" /></figure><p><strong><em>WORKING:</em></strong></p><p>When the trigger pin sent a 5v/10us pulse, the device sends 8 ultrasonic pulses, each of them are 40KHz. As per the instruction, the ECHO pin output a pulse of 150us to 25ms. If there is no object in the range of the sensor then after 38ms it will timeout. OR if there is an object then the sensor can detect the distance of the object from the sensor by calculating the time delay of transmission of the pulse and receiving the pulse.</p><p>As the Ultrasonic sensor travel at the speed of sound the it is 343m/s at room temperature(20 degree Celsius).</p><p>HC-SR04 calculates the distance as,</p><p><strong><em>[Distance=(Duration or Time delay(in us)/2)x 0.0343]</em></strong></p><p><strong><em>EXAMPLE:</em></strong></p><p>Time delay= 500us</p><p>so,</p><p>Distance=(Duration or Time delay(in us)/2)x 0.0343</p><p>=(500/2)x 0.0343</p><p>=250x0.0343</p><p>=8.575cm</p><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*rzWfvl7zIwYrXzhDqFv3BQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*xDKHrRMUuftmh-RjfBJSTA.png" /></figure><p>&gt;Connect the 5v pin of Arduino with the Vcc of the Ultrasonic Sensor</p><p>&gt;Connect the GND(ground) pin of Arduino with the GND of the Ultrasonic Sensor</p><p>&gt;Connect digital pin ~6(use any PWM in for better performance) of Arduino with the Trig(Trigger) pin of the Ultrasonic Sensor</p><p>&gt;Connect the digital pin ~5((use any PWM in for better performance) of Arduino with the ECHO pin of the Ultrasonic Sensor</p><p><strong><em>PROGRAM:</em></strong></p><p>//#define trig=6;<br>//#define echo=5;<br>float duration, distance;<br>void setup()<br>{<br> Serial.begin(9600);<br> pinMode(6,OUTPUT);<br> pinMode(5,INPUT);<br>}</p><p>void loop()<br>{<br> digitalWrite(6,LOW);<br> delayMicroseconds(2);<br> digitalWrite(6,HIGH);<br> delayMicroseconds(2);<br> <br> duration=pulseIn(5,HIGH);<br> distance=(duration/2)*0.0343; //For Distance in centimeter(cm) <br> <br> Serial.print(“\ndistance= “);<br> if(distance&gt;=400|| distance&lt;=2)<br> {<br> Serial.print(“\n*OUT OF RANGE*”);<br> }<br> else{<br> Serial.print(distance);<br> Serial.print(“cm”);<br> delay(500); <br> }<br> delay(500);<br>}</p><p><strong><em>OUTPUT:</em></strong></p><p>Lets take 3 outputs at 5cm, 10cm and 15cm</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*T05SSHtXzYltLEF74aTIpw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*eXohi3bpScoAKxawzWasCA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7e0fb742c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Arduino and Joystick control using L298N]]></title>
            <link>https://medium.com/@yashrajghosh1323/arduino-and-joystick-control-using-l298n-872449be459e?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/872449be459e</guid>
            <category><![CDATA[joystick]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[l298n]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Sun, 08 May 2022 17:12:20 GMT</pubDate>
            <atom:updated>2022-05-08T17:12:20.410Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h3>(Hardware)</h3><ol><li>Arduino UNO</li><li>Motor Driver(L298N)</li><li>Joystick module</li><li>3-6v dc motor</li><li>Toy wheel</li><li>Battery(li-po 2s)</li></ol><h3>(Software)</h3><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li></ol><p><strong><em>PIN CONFIGURATION OF Joystick Module:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*f57t7-B5bLvMowqsQ1u3lg.png" /><figcaption><strong>(X=VRX; Y=VRY)</strong></figcaption></figure><p>Connect the VRX or VRY pin with the Analog pins of Arduino.</p><p>Range of the joystick module is: 0–1023</p><p><strong><em>PIN CONFIGURATION OF L298N:</em></strong></p><p>This L298N motor driver works in H-Bridge motor control &amp; follow the logic of XOR Gate logic circuit. Always connect the ENA &amp; ENB pin with the PWM pins of Arduino.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*9UX1HlljiM8ZwVTSBOskMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*YHNosam6Yvhyu2ehtX823g.jpeg" /></figure><p><strong>· </strong>Motor A control Pin(s)- ENA, IN1, IN2</p><p><strong>· </strong>Motor B control Pin(s)- ENB, IN3, IN4</p><p>(REMOVE THE JUMPER BEFORE USING ENA &amp; ENB PIN)</p><p><strong><em>Direction Control with H-bridge setup:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*Wt4VoNmljhGajaX8czDASA.png" /></figure><p><strong><em>Direction Control with pins:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*BF5Usu2-br782fZENrGHdg.png" /><figcaption><strong>(HIGH=1 | LOW=0)</strong></figcaption></figure><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSTUtGvjfs38SfmAODlm8w.png" /></figure><p><strong><em>CODE:</em></strong></p><p>int enableAPin = 3;<br>int in1Pin = 4;<br>int in2Pin = 5;</p><p>void setup()<br>{<br> pinMode(enableAPin, OUTPUT);<br> pinMode(in1Pin, OUTPUT);<br> pinMode(in2Pin, OUTPUT);<br>}</p><p>void loop()<br>{<br> int motorPWMSpeed = 0;<br> int joystickValue = analogRead(A0); //Joystick gives values ranging from 0 to 1023. So we will consider center value as 512 and lets keep some deadband at center.</p><p>if (joystickValue &gt;= 530) //This will move motor in forward direction <br> {<br> motorPWMSpeed = map(joystickValue, 530, 1023, 0, 255);<br> digitalWrite(in1Pin, HIGH);<br> digitalWrite(in2Pin, LOW); <br> analogWrite(enableAPin, motorPWMSpeed);<br> }<br> else if (joystickValue &lt;= 490) //This will move motor in reverse direction <br> {<br> motorPWMSpeed = map(joystickValue, 490, 0, 0, 255);<br> digitalWrite(in1Pin, LOW);<br> digitalWrite(in2Pin, HIGH); <br> analogWrite(enableAPin, motorPWMSpeed);<br> } <br> else //Stop the motor<br> {<br> digitalWrite(in1Pin, LOW);<br> digitalWrite(in2Pin, LOW); <br> }<br>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=872449be459e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic operation of Buzzer module with Arduino]]></title>
            <link>https://medium.com/@yashrajghosh1323/basic-operation-of-buzzer-module-with-arduino-ad5a593d996?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad5a593d996</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[buzzer]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[arduino-uno]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Sun, 24 Apr 2022 10:18:15 GMT</pubDate>
            <atom:updated>2022-05-08T17:09:54.524Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h3>(Hardware)</h3><ol><li>Arduino UNO</li><li>Electromagnetic Buzzer Module</li></ol><h3>(Software)</h3><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li></ol><p><strong><em>PIN CONFIGURATION OF Electromagnetic Buzzer Module:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*pIt7_IVRB-cUR8VE15Renw.png" /></figure><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhXL_cfU9oiF_0w3FD7mug.png" /></figure><p>(connect the positive(+ve) pin of the buzzer with any digital pin of arduino but the PWM pins(~11,~10,~9,~6,~5,~3) are more preferable to control the audio frequency)</p><p><strong><em>PROGRAM:</em></strong></p><p>//this program is followed by the syntax of “digitalWrite”</p><p>void setup() {<br>pinMode(11,OUTPUT);<br>}<br>void loop() {<br>digitalWrite(11,HIGH);<br>delay(1000);<br>digitalWrite(11,LOW);<br>delay(500);<br>}</p><p><strong><em>PROGRAM:(2)</em></strong></p><p>//this program is followed by frequency control using PWM pins</p><p>void setup(){}<br>void loop(){<br> tone(11,450); //here 450 is the frequency of the audio output from the buzzer<br> delay(1000);<br> noTone(11);<br> delay(1000);<br>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad5a593d996" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BASIC OPERATION OF DHT11 WITH ARDUINO UNO]]></title>
            <link>https://medium.com/@yashrajghosh1323/basic-operation-of-dht11-with-arduino-uno-91d94564f47c?source=rss-99fd4b87686c------2</link>
            <guid isPermaLink="false">https://medium.com/p/91d94564f47c</guid>
            <category><![CDATA[arduino-uno]]></category>
            <category><![CDATA[arduino]]></category>
            <dc:creator><![CDATA[Yash Raj Ghosh]]></dc:creator>
            <pubDate>Thu, 14 Apr 2022 09:03:12 GMT</pubDate>
            <atom:updated>2022-04-14T09:03:12.518Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>COMPONENTS USED:</em></strong></p><h4>(Hardware)</h4><ol><li>Arduino UNO</li><li>DHT11(Temperature &amp; Humidity sensor)</li></ol><h4>(Software)</h4><ol><li>Arduino IDE (<a href="https://www.arduino.cc/en/software">https://www.arduino.cc/en/software</a>)</li></ol><p><strong><em>PIN CONFIGURATION OF DHT11:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*WE3Z09A7yu_axZTBnFR58Q.png" /></figure><p><strong><em>SCHEMATIC DIAGRAM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQhMNTpPo7-elGyguiQthQ.png" /></figure><p><strong><em>PROGRAM:</em></strong></p><p>//if DHT library function is not installed then there will be error. For that reason first compile the program once, if it shows that “library not found” or “library not included” then go to sketch-&gt;add library-&gt;manage library-&gt; search DHT11-&gt; install “DTH sensor library” and “simpleDHT”</p><p>#include”DHT.h” //#include&lt;DHT.h&gt; can also be used<br>#define temp 2<br>#define DHTTYPE DHT11<br>DHT a(temp, DHTTYPE);<br>void setup() {<br>Serial.begin(9600);<br>a.begin();<br>}</p><p>void loop() {<br>float h = a.readHumidity();<br>float t =a.readTemperature();<br>Serial.print(“Temperature in °C= “);<br>Serial.println(t);<br>Serial.print(“Humidity= “);<br>Serial.println(h);<br>delay(5000);<br>}</p><p><strong><em>OUTPUT:</em></strong></p><p>Output will be visible on “SERIAL MONITOR”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HVylupT3T3cIv6zEprQIhQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91d94564f47c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>