susarlas
Posts: 2
Joined: Mon Jul 08, 2013 8:07 pm

Help with connecting sensor and motors

Mon Jul 08, 2013 8:19 pm

Hi ,

Can you please provide me detailed diagram on how to connect sensors and motors to PI ?
I want to connect a temperature sensor, distance sensor, motion sensor and IR module and also want to drive a couple of servo motors.

I also want to know how to connect them using PiFace.

Can do software stuff but understanding circuits been difficult. Need easy Diagrams ...

ScottyMacDev
Posts: 3
Joined: Wed Jul 10, 2013 7:48 pm

Re: Help with connecting sensor and motors

Wed Jul 10, 2013 8:36 pm

There are numerous examples of this on youtube but one thing I might suggest is to think about getting a Gertboard for your Pi:

http://www.google.com/search?q=Gertboa ... =0CDkQsxg

A Gertboard has all kinds of inputs and outputs and has open collectors, buttons, leds and relay connections to accomplish everything you are referring to. Additionally the Gertboard has the same chip as an Arduino microcontroller so you could even write easy to understand Sketch programs to run your experiments. Here are some specific links you may want to check out!

Great stuff on how to get the Gertboard up and running on your Pi and also how to get the example programs to run!
https://projects.drogon.net/raspberry-pi/gertboard/

This youtube link will show you a bunch of videos on the Gertboard as well:
http://www.youtube.com/results?search_q ... JiD033mDWw

If you buy a Gertboard DO NOT buy a KIT unless you want to learn how to solder!

Hope that helps!

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Help with connecting sensor and motors

Wed Jul 10, 2013 8:51 pm

You can connect RC servos direct to the Pi. You should use a separate power source for the motors.
Wire negative servo wire (brown or black) to Pi 0V and negative terminal of your motor power supply.
Wire the positive servo wire to the positive terminal of the motor power supply.
Wire the servo control wire (white or orange) to a PiGPIO pin.

Install PIGPIO and configure the GPIO pins you have connected to Output Servo mode.


For the sensors, it depends what sort of signals they output.

ScottyMacDev
Posts: 3
Joined: Wed Jul 10, 2013 7:48 pm

Re: Help with connecting sensor and motors

Wed Jul 10, 2013 9:52 pm

Yeah but the gertboard is COOL. LOL! :P

Return to “Advanced users”