BLOG 4| PWM & Sensors


Pulse Width Modulation (PWM)


What is PWM? 

This is a technique used to control the average power delivered to a device by switchin a digital signal ON and OFF rapidly. By adjusting how long the signal is high (on) or low (off), this is known a the duty cycle, this simulates varying voltage levels to control i.e. motor speeds. 



Discovering PWM

These  2 weeks we were tasked to discover the PWM channles within the PIC microcontrolller board, the were different states at 1.25ms for stop, 2ms full foward and 1ms which was full reverse. 

Below are the screenshots of the channels which corresponds to the given outputs PW1 and PW2, upon the PIC board. 


Channel 1 at 1.25ms, at PW1



Channel 2 at 1ms, at PW1



Channel 1 at 2ms, at PW1


Channel 2 at 1ms, at PW2


Channel 2 at 2ms, at PW2





Sensors

The Sharp2Y0A02 below is an infred sensor, this week we commenced a stress test on the sensor, in regards to how an object can be detected at certain distances, and  based on that certain distance the sensor operates at a set voltage. 
Sharp2Y0A02






Distance test 

Below are the screenshot of the infered sensor at two diffrent distances. 


The Infered sensor at 60cm 




The Infered sensor at 120cm 


Voltage Graphs
From the graphs below we can see at 120cm we can see that the voltage is at ~0.4V. 
and at 60cm we can see that the voltage is at ~1.05V which corolates with what the graphs show. 


Voltage Output Graph 1 


Inverse Voltage Output Graph 2






Comments

Popular posts from this blog

Blog 1 - Igor Kapusniak