olzlabel.blogg.se

Raspberry pi 3 model b library for proteus
Raspberry pi 3 model b library for proteus




raspberry pi 3 model b library for proteus

Since the IC has an Enable pin that controls its On/Off state, we can leave both inputs set to run and just modulate the Enable pin, and the IC will only put out power according to the duty we set in the Enable pin. That's how we'll control the direction, but what about speed? We talked about PWM right? So we'll just Pulse Width Modulate both inputs, right? We could, but it would be too complicated. If both inputs are True or both are False, the motor will not run. And if we want it to spin backwards, we'll set input 1 to 'False" or 'LOW' and input 2 to 'True' or "HIGH'. So, in our code, with the Enable pin On, if we want the motor to spin forward, we'll set input 1 to 'True' or 'HIGH', and input 2 to 'False' or 'LOW'. The L293D motor IC uses two pins referred to as inputs to sense the desired direction of the output, and another pin called Enable to sense On/Off. To see how PWM looks as an output, refer to the diagram above. The amount of time the voltage is high is called the 'duty' or 'duty cycle', and whatever percentage that is will be the percentage of power the motor runs on.

raspberry pi 3 model b library for proteus

What PWM means is just controlling the amount of time a voltage is on by flipping between high and low for a set amount of time. The way we'll control the speed of the motor is by using a python module called PWM. We'll be using very simple python commands, and no prior computer programming knowledge will be necessary. Python is a computer programming language, comparable to Javascript or C++.

raspberry pi 3 model b library for proteus

We're using them as outputs, to send signals to the L293D IC Chip, which is just a chip used to control DC motors. GPIO stands for "General Purpose Input/Output", which means these pins can either send electrical signals to drive hardware or receive them and read sensor data. In this project, we're using python scripts run on a Raspberry Pi to set GPIO outputs to an L293D motor controller IC and run a DC motor in either direction at any speed.įirst things first a Raspberry Pi is an open-source credit card sized computer with 40 open GPIO pins. If you don't care about how this is done and just want to do it without learning, skip to Step 3.**






Raspberry pi 3 model b library for proteus