Problem controling two CD motors with a ultrasocin sensor

Hello all

I am trying to control two DC motors with a L9110 brige and a ultrasonic sensor.
When I run my code using tha USB as power suply all goes well. When I use an external power suply (9V battery). I does not work. It seems that it does not "close the loop" repeating the same condition all the time ...
Can some one help me?

Thanks

One power source works, the other does not. What I would guess the issue is, that the 9V battery does not have enough oomph to run your project.

Thanks for the quick reply!
But I tried a new battery and still I have a problem

1975Elias:
Thanks for the quick reply!
But I tried a new battery and still I have a problem

The 9V battery will not do the thing.

Try a more useful battery like 6 x alkaline AA cells.

Steve

Thanks alot
I will try it!!

I have noticed that the volt reading of the sensor when connected with USB is 5,05 to 4,95. When connected with battery is 4,05 to 4,75 ...
Is it possible this to be problem?
The sonar works with 5V is that strict? or an average?
Can I connect the sonar onlywith 6 V and the DC bridge with 3,5 volts of arduino?

slipstick:
Try a more useful battery like 6 x alkaline AA cells.

Steve

Thank Steve
It works fine now!

1975Elias:
Thank Steve
It works fine now!

Do you know why they work and not a 9V smoke detector battery?
Tom... :slight_smile: