0

Can I control a bipolar stepper motor with an L293d motor driver shield using HC-SRO4 ultrasonic distance sensor on arduino?

  • Yes. There are countless examples all over the internet. Just do a basic search. – Delta_G May 25 at 15:37
  • you do not control a stepping motor with a sensor ... you control a stepping motor with an arduino that is running a program ... the sensor data is read by the arduino ... ths program in the arduino decides what to do with the motor depending on the sensor data ... there is no direct connection between the sensor and the motor – jsotola May 25 at 15:50
  • Thank you very much for the help, i appreciate it @Delta_G – Thomas Raymond Santos May 25 at 16:23
  • @jsotola thank you for making me understand!!! – Thomas Raymond Santos May 25 at 16:26
1

Yes, you can, they are completely independent, but that does not mean you can use e.g. an Arduino Uno to do the following:

  • Read the sensor
  • Based on the sensor values, control the L293D

In case you have doubt how to start, I suggest the following:

  1. First, only use the HC-SR04 sensor (build the circuit, use an example program, check that it works)
  2. Start over (remove the sensor), only use the L293D motor driver shield (with a motor), use an example program, check that it works)
  3. Now combine both circuits and programs or if you feel confident enough, start making your entirely new program.
| improve this answer | |
  • 1
    Thank you very much for answering and suggesting! I'll consider your suggestion, I could really use it. – Thomas Raymond Santos May 25 at 16:30
  • Just take small steps, and verify everything (even trivial things like a wire) in case of a problem. – Michel Keijzers May 25 at 16:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.