Pages: [1]   Go Down
Author Topic: New to world of Robotics need help with motor sheild and HC-SR04 sensor  (Read 1560 times)
0 Members and 1 Guest are viewing this topic.
Birmingham
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Love building basic stuff , love Robotics and the so call 3 LAWs for the machine.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys

I am really stuck with my very first robotic project , I brought a Motor shield from ebay  got it to work with arduino UNO and really enjoy the basic stuff,  decided to expand my skills and I brought HC-SR04 module from ebay  got this too to work with arduino  no problems there.

My only problem is how do I link my sensor to the motor shield as all the pins are fitted onto the arduino board  can someone help me please

I want to make a robot that when it detect object it avoid it.


* Photo 22-10-2013 19 14 41.jpg (2199.99 KB, 3264x2448 - viewed 67 times.)

* Photo 22-10-2013 19 14 45.jpg (1732.9 KB, 3264x2448 - viewed 45 times.)
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 688
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are going to have to do some hacking.  You need to find the pins that the motor shield  are not using and hook up the sensor to those pins and program accordingly.
Logged

//LiNK

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My only problem is how do I link my sensor to the motor shield as all the pins are fitted onto the arduino board  can someone help me please
The motor shield does not USE all the pins, though. As codlink ways, you need to determine which ones it does use, or post a link to it, and we'll help.
Logged

Sw Iowa
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Time is a commodity best not wasted
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the same motorshield and the same dilemma. my plan is I ordered the stacking pin kit from Adafruit and am going to change out the pins on the motor board to hookup other pins/sensors to.. The board is basically the same as the Adafruit version 1 motorshield, just a Sainsmart clone.  i f you look really close on the shield you will find that their is a small breakout board area on the board you can hook up to for pins A0-A5. but they are really small.

Go here for some pretty good info.  http://learn.adafruit.com/adafruit-motor-shield
Here is a really good pdf for the shield too. http://learn.adafruit.com/downloads/pdf/adafruit-motor-shield.pdf

Also make sure you use the AdAFRUIT motor libraries they are the best ones for that shield.

Logged


Sw Iowa
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Time is a commodity best not wasted
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just for your info, I just used the pin A0 on the little breakout board on the Motorshield using code I got in another post here to use a manual start button and it works flawlessly. I just soldered a couple of female jumper wires in the hole and connected to my switch. I confirmed with the docs that A0-A5 are NOT used by the Shield

So they should be able to be used for your sensor as well
Logged


laval, france
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
grand débutant sur arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

free pins are 0, 1, 2, 9, 13 and A0 to A5.

Look here: http://yourduino.com/docs/Multi-MotorShieldSchematic.jpg
Logged

il n'y a pas d'âge pour apprendre

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1866
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not exactly, but here's a working example of a separately-wired motor driver and the SR04 ultrasonic sensor (and a servo) to do collision avoidance.  Page HERE:

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

0
Offline Offline
Sr. Member
****
Karma: 8
Posts: 394
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not be adventurous and use breakout boards rather than shields.  You will do a bit more soldering but gain much more flexibility.  For example I've recently been using the Pololu DRV8833- tiny, inexpensive and better than many shields.
Logged

Pages: [1]   Go Up
Jump to: