Pan and Tilt Servos control?

If you need technical help with anything you've bought from Dawn Robotics, please post here.

Pan and Tilt Servos control?

Postby Miltos » Mon Jan 19, 2015 10:30 pm

I've just downloaded the latest image for the Pi camera Robot from here: http://downloads.dawnrobotics.co.uk/sd_card_images/ (latest image). The Pi boots as expected, the light of the Dagu Driver is on, the connection between the robot and the tablet is established (I've got a camera video), but I can't controller the pin and the Tilt servos. The servos are connected on D6and D11 pins. I've also moved them to D3 and D4 without results... All jumpers (5 of them) are in place but I can't figure out why the motors are not responding. I didn't connect the motors yet on the Dagu driver board. Any help?
Miltos
 
Posts: 14
Joined: Mon Jan 19, 2015 10:16 pm

Re: Pan and Tilt Servos control?

Postby Alan » Tue Jan 20, 2015 10:56 am

Hi there,

Welcome to the forums. :)

Can you please power on the robot, let it boot for about 5 to 10 minutes and then post the logs from 192.168.42.1/logs.html?

Cheers

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Pan and Tilt Servos control?

Postby Miltos » Tue Jan 20, 2015 1:50 pm

Here it is:

Main Log
DEBUG:tornado.general:sockjs.tornado will use json module
INFO:root:Starting web server...
INFO:root:Read 0XACED 0.38
INFO:root:Expected 0XACED 0.38
INFO:tornado.access:200 GET /robot_control/info (192.168.42.15) 14.84ms
WARNING:tornado.access:404 GET /favicon.ico (192.168.42.15) 13.92ms
INFO:tornado.access:304 GET / (192.168.42.15) 99.52ms
INFO:root:SockJS connection closed
INFO:tornado.access:304 GET /css/style.css (192.168.42.15) 151.58ms
INFO:tornado.access:304 GET /css/modal.css (192.168.42.15) 17.43ms
INFO:tornado.access:304 GET /js/sockjs-0.3.min.js (192.168.42.15) 22.93ms
INFO:tornado.access:304 GET /js/jquery.js (192.168.42.15) 39.48ms
INFO:tornado.access:304 GET /js/jquery.joystick.js (192.168.42.15) 17.38ms
INFO:tornado.access:304 GET /images/ajax-loader.gif (192.168.42.15) 34.90ms
INFO:tornado.access:200 GET /robot_control/info (192.168.42.15) 10.56ms
INFO:tornado.access:304 GET /logs.html (192.168.42.15) 23.31ms
INFO:root:SockJS connection closed
INFO:tornado.access:304 GET /js/sockjs-0.3.min.js (192.168.42.15) 33.14ms
INFO:tornado.access:304 GET /js/jquery.js (192.168.42.15) 15.32ms
INFO:tornado.access:200 GET /robot_control/info (192.168.42.15) 16.91ms
Miltos
 
Posts: 14
Joined: Mon Jan 19, 2015 10:16 pm

Re: Pan and Tilt Servos control?

Postby Alan » Wed Jan 21, 2015 3:15 am

Hi there,

It looks like your software is there.

Can you double check that your servo connections are correct and that the ground (brown) wire is towards the edge of the board? (Sorry just want to check everything).

Does it look like the servos are getting power? i.e. do they 'twitch' when power is turned on?

I know that you'd like to get this working first, but it might be worth connecting up one of your wheel motors just to see if some commands can go through to the mini driver.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Pan and Tilt Servos control?

Postby Miltos » Wed Jan 21, 2015 6:17 am

The servo connections are correct and the ground brown wire is indeed looking towards the edge of the board. The servos get power as I switch the board\, turning a bit and make a quick noise...
I didn't connect the motors yet because I plan to subtitute those with servos too (for a better response and accurate steering), so those two are off...
It's okey for givingme directions about checking everything before making this "clever" robot works, besides that's all the fun to it!!!
Thanks for your help and I remain...
Miltos
 
Posts: 14
Joined: Mon Jan 19, 2015 10:16 pm

Re: Pan and Tilt Servos control?

Postby Alan » Thu Jan 22, 2015 11:19 am

Hi there,

Thank you for your patience on this. I'm glad you're having fun, although it's even more fun when it works. ;)

Continuing with checking everything, can you please confirm that it's the joystick on the right hand side in the web interface that you're trying to use to move the neck? The reason I ask is because there are 2 joysticks, but some people occasionaly report a bug when using an iPad that they can only see the left (motor control) joystick.

Also, could you please connect at least one of the motors and tell me if it works? This way we can confirm that control messages are getting from the Pi to the mini driver.

If neither of those things work, then are you familiar with programming Arduinos? It's just that the mini driver is an Arduino so you could load on one of the servo example programs to make sure that they work.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Pan and Tilt Servos control?

Postby Miltos » Thu Jan 22, 2015 5:16 pm

Hi there,

I've checked that the RIGHT joystick is not working, even with only ONE motor of the two connected on the Dagu ARduino Mini Driver. I am not so familiar with the Arduino programming but I've got and Arduino Uno and I am ready to "dive into deep" if you can give me some clear instructions on how I can do it. The fun is going on :D
Miltos
 
Posts: 14
Joined: Mon Jan 19, 2015 10:16 pm

Re: Pan and Tilt Servos control?

Postby Alan » Fri Jan 23, 2015 9:57 am

Hi there,

Sorry, I wasn't clear. Could you please check to see if the left joystick works with one of the wheel motors attached?

To use the Arduino IDE with the mini driver

1. If your computer runs Windows then you first need to install the drivers linked from the product webpage.
2. Connect the mini driver to your PC using the USB cable
3. Open up the Arduino IDE
4. Open up File > Examples > Servo > Sweep
5. Attach a servo motor to pin D9. It's also probably a good idea to attach some AA batteries to the +/- pins of the mini driver and turn the switch on.
6. Select the board type by selecting Tools > Board > Arduino NG or older w/ ATmega8
7. Select the correct serial port with Tools > Serial Port
8. Hit 'upload'

After about 30 seconds (for some reason it takes quite a while for the mini driver to start up) you should hopefully see the servo motor start to move back and forth.

Depending upon whether that works or not you might also want to try uploading the program given in this blog post. One of the cool things about the mini driver is you can actually use it to build a robot on its own. Although of course, it's much better if you can get it to work with the Pi, as then you get camera and WiFi as well.

Best of luck. :)

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: Pan and Tilt Servos control?

Postby Miltos » Sat Jan 24, 2015 11:13 am

Thanks Alan for your prompt reply and guidance!

First of all my effort to re-programme the Dagu Arduino Mini driver didn't succeed... I've got the same error again and again whenever I try to upload the "Sweep" program from the ready made examples of Arduino IDE.
This is the message I've got:
////////
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino NG or older w/ ATmega8"
Binary size sketch: 2.416 bytes (from 7.168 byte)

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync
////////

Secondly, a few things I want to draw your attention to...
The drivers of my Dagu Arduino Mini Drivers are installed correctly and Windows 7 (my OS) communicate with this driver on (COM4). So, no problems there... I've benn also very carefull to choose the correct board as per your instructions "Arduino NG or older w/ ATmega8". The program loads "I see the green bar progressing" but at the end the error message appears...

Thirdly, I've followed the given procedure by attached the AA batteries to the mini driver board and turned the switch on just in case... same results.

Last, I didn't find and D9 pin to attached the servo motor...my Dagu mini driver has the following pins D2,D3,D4,D5,D6, D11,D12.D13. The D9 pins are occupied by a jumper with D10,D8, and D7 as well.

That's all! any help will be much appreciated...

Regards,
Miltos
 
Posts: 14
Joined: Mon Jan 19, 2015 10:16 pm

Re: Pan and Tilt Servos control?

Postby Alan » Mon Jan 26, 2015 1:01 pm

Hi there,

Unfortunately it sounds as if you might have a corrupt bootloader on the Mini Driver. :P Do you have access to another Arduino and some wires that you could use to connect the Mini Driver to the Arduino? If you do then we can use it to fix the mini driver. Otherwise, please email your order number to sales@dawnrobotics.co.uk and I'll organise a replacement.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Next

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 0 guests