Simple way to control 12V DC Motor using Raspberry Pi’s GPIO port and NPN transistor

I needed to control a DC motor from my Raspberry Pi’s GPIO port as part of my time-lapse dolly project. I had to be able to turn the motor on for approximately 150ms which would in turn move the dolly along by 3mm. Parts 12VDC Mini High Torque Motor – Max 50mA at full load – Buy on Amazon PN2222 NPN Transistor – Buy on Amazon 270Ω Resistor – Buy on Amazon 10kΩ Resistor – Buy on Amazon 1N4003 Diode – Buy on ...

Read more

Servo Motor with Raspberry Pi and PWM

After my dad and I got an LED to dim using Pulse Width Modulation on my Raspberry Pi, we decided to try to spin a servo motor.  We had a bunch of old servo motors on my robotics team at school so I used one of those, but I didn’t have any information on the pulses that they use.  It was a HiTec HS-485SB.  So, we started off following this YouTube video to modify the code from the LED to operate the servo.   ...

Read more

Controlling DC Motors Using Python With a Raspberry Pi

Objective What we plan to do is safely connect one or two motors to the Raspberry Pi with as few components as possible. Once we have the electronics put together on the breadboard, I will show you how to control them easily using Python to first make the motor spin, and then add some control to change the motor direction so we can go backwards. This guide will require a careful eye to catch any mistakes, a ...

Read more

Control Stepper Motors With Raspberry Pi: Tutorials and Resources

The title of the article can be as well as ‘Let’s build robots using stepper motors and the Raspberry Pi,’ because everything you need is a good example of where you can learn how to control the spin direction, speed, and the rotation of a stepper motor using a fruit-named single board computer, a controller board, and one or more stepper motors. Having played with LEDs, switches, or any other components th ...

Read more

LEGO MINDSTORMS Motors with Raspberry Pi (BrickPi 0.1)

Since we first got the Raspberry Pi, we have wanted to make a robot out of it.  There aren’t many kits out there yet that let you do that (yet).  This HowTo Raspberry Pi Project shows you how we hacked together a motor controller from the Raspberry Pi and used it to control LEGO MINDSTORMS Motors. The LEGO MINDSTORMS system comes with 3 motors that are run at 9V.  The LEGO MINDSTORMS motors run by applying ...

Read more

raspberry-pi-home-automation

A node.js based home automation system based around the Raspberry Pi. For background around this project: Installation To get started, clone the repository and install the required dependencies. git clone https://github.com/anders94/raspberry-pi-home-automation.git cd raspberry-pi-home-automation npm install Hardware The Raspberr Pi needs a little bit of circuitry to protect and amplify its GPIO ports. Here ...

Read more

Use Raspberry Pi to Create Obstacle Avoiding Robot Chassis

Raspberry Pi is quite suitable for robot creation.  Its GPIO pins could be used to control the motors and sensors, and itself could work as a server, and get controlled via Internet. The Plan I am going to create a robot chassis, which could automatically avoid obstacle on the ground. Here is my plan: Hardware Assembling I bought a 4WD chassis kit from Internet.  After assembling the kit, I got a 295mm x 15 ...

Read more

Raspberry PI L298N Dual H Bridge DC Motor

There are not any examples that I could find that properly show how to get a simple DC motor working with RaspberryPI. This is a simple tutorial for "How to make a motor turn." Robots, wheels, conveyors, and all sorts of stuff can be made to move using simple Raspberry Code and really inexpensive RC-racer like motors. The parts for this can be purchased on eBay for about $10 (certainly under $20). This proj ...

Read more

Raspberry Pi – Stepper Motor Control & Breakout Board

Overview Many of the previous Raspberry Pi projects I had been working on were based on fairly simple GPIO logic to turn things on and off.  Today I wanted a little more of a challenge so I started working to control a stepper motor from my Raspberry Pi using Java.  Fortunately I had previously obtained one of John Jay's Stepper Motor Breakout Board kits which includes all the necessary components (includin ...

Read more

Pulse Width Motor Control

My last project had me digging through old robotics parts to find an H-Bridge Motor Controller.  I found one that had several TTL chips on the circuit as well and it reminded me of a trick some of you may find useful. First, lets define pulse width modulation (PWM.)  It refers to the duty cycle (how long the line is high vs how long it is low) of a pulse stream. What use is this for controlling motors?  If ...

Read more

© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top