Main Site Documentation

Connecting Motor Driver L298 Module with FEZ SPIDER


#1

hello guys… i’m working on a distance detecting system using fez spider and HC-sr04 sensor,now i’m planing to add some vibration motor to drive when the obstacle is identified but i have no idea to how to pass the signal through from sensor to the motor, i mean when it detect some obstacle the vibrator must start and vibrate for while think 5 sec, can anyone help me on this?


#2

Check this link:

http://gizmolab.pbworks.com/w/page/5686102/Arduino%20Tutorial%203%3A%20Motors

You will need resistor, transistor and a diode to hook up the vibrator motor.


#3

thnx architect , any other suggestion… i’ll connect my motors in that way… anyone try any same thing using FEZ
spider?


#4

There are basically two challenges. First, how do recognize an obstacle. Second, how do cause
the motor to vibrate. There is no real “passing of the sensor data”.

Attack each part separately, and then putting them together will be obvious.


#5

hello… i have connect a HC-SR04 sensor with my FEZ SPider and now i can read the distance to the obstacles, now what i want to do is i want to run motor when the distance is less than 25 inches does anyone have an idea to how to do this?


#6

@ Niyomal - Architech pointed you at an URL earlier which answers your question.

Do you have a question about the referenced information?


#7

hey guys … does any one have a sample code for working with motor controller and distance sensor… i have done the distance sensor connectivity and now i can read the distance from it… now what i want to do is i need to run the motor when the distance is less than 25 inches, but the problem is i cannot imagine how to start the mortor connectivity does anyone try or have any sample code please let me know this is for school project…help me…


#8

What have you done so far?


#9

i have connect the HC-SR04 sensor to the board and now i can read the distance using it ( i did this with ur help architect thank you again :slight_smile: ), and i have made the circuit to connect the vibrator to the motor controlling module as mention in the above link u post , now what i want to do is i need to run the motor when the distance read by the sensor is less than 25 inches what i have to do?


#10

You have to check the distance and if it is less then 25 inches turn on the pin that controls the motor.


#11

@ Architect - hi i have made the circuit as in the link you provide, do you have any sample code on driving motor… if you have can you post it for me than you…!!


#12

Start with a simple program that turns motor for 5seconds and then turns it off to test you circuit.