Page 1 of 1

pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 5:03 am
by pageauc
Checked some of the other forum entries.
I have an older pi-bot and the sd card failed on me. I installed latest raspbian and did the install procedure per the web site. Got motors working OK and camera works OK through web interface. Pan tilt moves slightly when powered but the servo's did not work. Found that the dagu mini driver pins for pan tilt were moved from 3-4 to 6-11 and changed the connections. wiring is per diagram with browns to outside of board. Thought this would solve the problem but still no joy. No sure if the older driver board is compatible with the new mini driver. I am in the process of downloading the dawn SD card image and will try it but don't think that will solve the problem. Not sure if the dagu arduino board firmware is compatible with the latest driver. I have not run the robot for a while but it did work OK on the previous setup. The log file does not seem to indicate any problem but the camera pan/tilt still does not work. Can you please let me know further trouble shooting to try to resolve this issue. Thanks Claude ...

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 / (192.168.1.250) 101.58ms
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 11.39ms
INFO:tornado.access:200 GET /config.html (192.168.1.250) 193.41ms
INFO:tornado.access:200 GET /css/config.css (192.168.1.250) 27.09ms
INFO:root:SockJS connection closed
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 16.49ms
INFO:root:SockJS connection closed
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 11.37ms
INFO:root:SockJS connection closed
INFO:tornado.access:304 GET / (192.168.1.250) 14.52ms
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 8.58ms
WARNING:tornado.access:404 GET /log.html (192.168.1.250) 37.54ms
INFO:root:SockJS connection closed
INFO:tornado.access:200 GET /logs.html (192.168.1.250) 21.50ms
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 10.89ms
INFO:tornado.access:304 GET / (192.168.1.250) 17.00ms
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 10.28ms
INFO:tornado.access:304 GET /logs.html (192.168.1.250) 27.63ms
INFO:tornado.access:304 GET /js/jquery.js (192.168.1.250) 48.50ms
INFO:tornado.access:304 GET /js/sockjs-0.3.min.js (192.168.1.250) 24.61ms
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 14.14ms
INFO:root:SockJS connection closed
INFO:tornado.access:304 GET /logs.html (192.168.1.250) 30.49ms
INFO:tornado.access:304 GET /js/jquery.js (192.168.1.250) 14.89ms
INFO:tornado.access:304 GET /js/sockjs-0.3.min.js (192.168.1.250) 20.06ms
INFO:root:SockJS connection closed
INFO:tornado.access:200 GET /robot_control/info (192.168.1.250) 18.02ms

Re: pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 2:54 pm
by pageauc
I tried plugging in the Dawn pan/tilt into my openelec pan/tilt setup and the Dawn pan/tilt works fine when connected to the openelec board. It would appear the older dawn dagu mini driver board from the original dawn robots like mine are incompatible with the newer driver that is probably configured for a newer dagu mini driver board. Can you verify that this is the case. If so the easiest way would be to upgrade the dagu mini driver board so the software is compatible. Let me know what the cost would be if that is the case.

I also have another person who contacted me about my opencv python script complaining about a similar problem. He even sent me a video. Looks like he is having a similar issue base on the information he has given me.
Claude ....

Here is the putty console messages when the web server is started.

Starting web server...
Read 0XACED 0.38
Expected 0XACED 0.38
304 GET / (192.168.1.250) 98.97ms
304 GET /css/style.css (192.168.1.250) 139.69ms
304 GET /css/modal.css (192.168.1.250) 16.82ms
304 GET /js/jquery.js (192.168.1.250) 40.08ms
304 GET /js/jquery.joystick.js (192.168.1.250) 17.96ms
304 GET /js/sockjs-0.3.min.js (192.168.1.250) 19.30ms
304 GET /images/ajax-loader.gif (192.168.1.250) 16.84ms
200 GET /robot_control/info (192.168.1.250) 11.28ms
Image encoder buffer num 3, buffer size 81920
Image encoder buffer num 3, buffer size 81920
SockJS connection closed

Re: pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 7:12 pm
by pageauc
I am thinking this is a firmware issue and that the older boards have firmware that is not 100% compatible with the newer dawn software. I have tried the arduino example servo sweep with attach(11). Not sure what board it was so set to arduino pro or pro mini (5v, 16MH) with ATMega328. Also tried the UNO and several other boards without luck. The com port was com5 and the sketch downloaded OK but the camera pan/tilt still did not work with the dagu board even though I verified the servo's work with my openelec arduino compatible driver board. Not sure how to proceed from here? If it is dagu arduino firmware issue then would need instructions for burning new firmware from the arduino application and what file to use. There are Tool options for Programmer and burn bootloader but not sure if this is for arduino firmware or something else.
Claude ...

Re: pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 7:25 pm
by pageauc
After a bit more research I set the arduino IDE to Tools, Board
Arduino NG or older w/ ATMega8

The servo sweep sketch works and the camera pan and tilt works fine for attach(6) and attach(11)

Looks like it is some issue with the downloaded sketch file. Wondering if I can recompile your code

Claude .

Re: pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 7:59 pm
by pageauc
Tried to compile the
mini_driver_firmware.ino
but got message sketch tool big

Looks like your latest mini driver is too big for the older dagu board. Can you suggest how this problem can be corrected. Hope early adopters will not be penalized.

Thanks
Claude ...

Re: pi-bot pan/tilt not working

PostPosted: Thu Feb 05, 2015 8:51 pm
by pageauc
Well I removed encoder and sensor code from ~/raspberry_pi_camera_bot/mini_driver_firmware/mini_driver_firmware.ino
and also in the
~/raspberry_pi_camera_bot/robot_controller.py file.

I now have the robot working with the web server interface and my opencv face tracking demo since I do not have encoders or sensors this is not an issue for me right now. If I decide to add these it will be a problem. Looks like problem was lack of memory on older dagu mini driver board or possibly firmware taking more room on an older version. If anyone wants the gutted code above let me know. It is working for me now but still not happy about dagu mini driver board capability not being sufficient to run the newer dawn software.

Alan Please comment and advise
Thanks
Claude ...

Re: pi-bot pan/tilt not working

PostPosted: Fri Feb 06, 2015 9:22 am
by Alan
Hi Claude,

Sorry for the delayed reply. Out of the office in Hungary at the moment.

First up, to the best of my knowledge there has been no change in the hardware of the Mini Driver, the one you have should be the same as the one we're currently selling.

With regards to the problem you're seeing, did you compile the mini_driver_firmware.ino sketch using the Raspberry Pi Arduino IDE, or an IDE on another PC?

The mini driver sketch will fail to compile on newer versions of the Arduino IDE (i.e. 1.0.5) as it looks like the Arduino libraries have bloated a bit. However it will compile in Arduino IDE version 1.0.1 which is (or perhaps was) the version in Raspbian. What is the version on your Pi?

I think that there may be a subtle bug somewhere as I've had a couple of people tell me that the logs look fine (i.e. expected and read firmware version match) but that the servo motors don't work, but the wheel motors work? Perhaps there's some bug in the sketch where in certain situations the servo pins won't be set to output properly? :? The usual fix has been to manually load up the Arduino servo sweep example to check that the servo pins 6 and 11 work, and then the next time the mini driver firmware is flashed the servo motors seem to work.

To get your robot working, I would advise that you flash an SD card with our latest SD card image. Upload the servo sweep sketch to your Mini Driver to check that the servo pins work, and then connect the mini driver up to your Pi and boot as normal. Hopefully once boot up is complete, everything should be working correctly.

Going back to the out of memory problem, I did think that I'd have to deal with it eventually when the Raspbian version of the Arduino IDE was upgraded, and it looks as if that time might be now. I'm hopefully going to have a Raspberry Pi 2 waiting for me when I get back to the office on Monday so I'll try to kill two birds with one stone and sort this out when I create a new SD card image for the new Pi.

Regards

Alan