Home Profile Junkbot Projects  Materials Gallery

PYTHON PROGRAM

Objective

Python is a powerful general-purpose programming language. It is used in web development, data science, creating software prototypes, and so on. Fortunately for beginners, Python has simple easy-to-use syntax. This makes Python an excellent language to learn to program for beginners.

 

The best way to learn Python is by practicing projects below. The page contains project on basic concepts of Python. You are advised to take the references from these project and try them on your own.

All the programs on this page are tested and should work on all platforms try opening at Python online complier

 

 

Project List

 

 

 

 

NO VIDEO TUTORIAL

 

Using ultrasonic sound wave to be tested on an oscilloscope

What is Oscilloscope?

An oscilloscope is a machine that shows the wave shape of an electrical signal. When connected to a ultrasonic module they can show the wave signal.

 

The Arduino ultrasonic module includes transmitters, a receiver and control circuit. This distance sensor works by sending out an ultrasonic wave from the trigger terminal and detecting whether there is a pulse signal back through the echo. If there is a returning pulse signal, it is measured, and the length of time the pulse remains at a peak corresponds to the distance an object is from the sensor.

 

The longer the returning pulse is, the further the object is away. A short pulse of at least 10 micro sec is supplied to the trigger input to start the ranging, and the module sends out an 8 cycle burst of ultrasound at 40kilohurts, and the echo is raised. 

 

 

 

Here is how to calibrate an Oscilloscope:

With the use of Probe
put the ground then the test calibration and setup the settings.

 

Oscilloscopes principally measure voltage and time. Measuring another physical property such as temperature, pressure, flow, velocity, or displacement on an oscilloscope requires use of a transducer or sensor to convert the measured quantity into voltage. Using the oscilloscope's function you can scale the input voltages into units that match the transducer's input. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Procedure

The 5V DC supply was connected to the VCC pin on the sensor.

The function output was connected to the Trig pin.

All the grounds were connected together

Chanel2 of the oscilloscope was connected to measure the input pulse (Trig).

Chanel4 of the oscilloscope was connected to the Echo pin to measure the returning pulse, if any.

Without any object positioned in front of the sensor, the following was obtained on the screen of the oscilloscope:

The function output was set to produce a low frequency pulse.

The distance was measured, and the waveforms displayed on the oscilloscope were recorded. The waveforms displayed were used to calculate the actual distance the sensor measured from the object.

An object was then positioned in front of the sensor:

And the oscilloscope displayed the following. Here the peak of the returning signal was of a duration of roughly 1.5milli second, the distance measured with the calculated distance of approximately 25cm

The object was then moved closer to and further from the sensor. One such position

The angle of the object to the sensor was also varied to test the sensor’s ability in detecting objects that aren’t straight in front of it.

 

Here the peak of the returning signal was of a duration of roughly 0.333milli second, and thereby measured a distance of approximately 5.5cm when calculated, which is close to the distance.

The angle of the object to the sensor was also varied to test the sensor’s ability in detecting objects that aren’t straight in front of it. One such position

The waveform displayed on CH4 of the oscilloscope indicates that the object was approximately 25cm from the sensor, thereby showing that the sensor can quite accurately detect the distance it is from an object that is an acute angle. This maximum angle at which the sensor detected the object during testing was approximately 20°.

 

One negative about this sensor is that it’s blind for the first 2cm, but more importantly, careful mounting must be adhered to, as if it’s positioned too high it won’t detect other robots and if it’s positioned too far back on the robot, it will detect itself and presume it’s an opposition robot

 

Brenn PYTHON