Monday, April 11, 2011

Learning the ropes

Today I did some testing with arduino diecimila board. I tried to make a gadget which would control a servo with signals received from an ultrasonic sensor. Of course, I started with hello world :)

After I saw that the board, computer and compiler was working great, I started to test single components to make sure everything worked. It did, but when I connected the servo and the ultrasonic sensor to my arduino at the same time, it started acting strange. I finally found that the power supply of the board was insufficient for servo and sensor at the same time. My solution was to use an external power supply to power the servo.

That seemed to be the solution to my problem, but things got even worse. My servo was out of control when I connected it to my arduino. It reacted to commands somehow, but was still completely useless as it was having severe problems with controlling itself. My problem was lacking common ground.

If you have problems with connecting servo to an external power AND arduino, make sure they have common ground. Otherwise the servo will act strange.


No comments:

Post a Comment