DSC Rpi Dynamixel board and USBasp can't upload to DSC

I’ve tried Windows 10, Mac OSX and Ubuntu 16.04 but I’m getting the same error when I try to upload to the DSC board using the USBasp programmer.

avrdude: error: program enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Error while burning bootloader.

First I was having issues just seeing the board in Ubuntu because the permissions were wrong. and I found instructions for changing that here: https://andreasrohner.at/posts/Electronics/How-to-fix-device-permissions-for-the-USBasp-programmer/

Now however I can’t even upload the DSC_blink file. I keep getting the same error.

Dear Tom,

I’m very sorry for having trouble.

Please check the following details:

  1. Do you have integrated the DSC files (hardware & libraries) to your Arduino IDE?
  2. Please use another USB Port / USB2.0
  3. Check if you have installed the correct Driver (Zadig)
  4. Upload the Bootloader again

Don’t worry, we will find a solution for sure :robot:

Yes I’ve done all those things I’ve done them 3 times because I tried on both Mac OSX, Windows 10 and Linux.

Now I am trying to re-upload the firmware to the USBasp
download: https://fischl.de/usbasp/

instructions:

however it I’m still getting some errors. I’m forcing the write and also slowing down the speed, but even then I still get errors. I think there is something wrong with the device you sent me.

SepeMacBookPro-7:~ thomassepe$ avrdude -cusbasp -pm8 -F

avrdude: error: program enable: target doesn't answer. 1 

avrdude: initialization failed, rc=-1

avrdude: AVR device initialized and ready to accept instructions

avrdude: Device signature = 0x000000 (retrying)

avrdude: Device signature = 0x000000 (retrying)

avrdude: Device signature = 0x000000

avrdude: Yikes! Invalid device signature.

avrdude: Expected signature for ATmega8 is 1E 93 07

avrdude done. Thank you.

Dear Tom,

we are flashing on every DSC the bootloader and ROS Node, so a few checks to be sure everything was done correctly:

  1. Do you’ve set the jumper to “POWER” on the USBasp?
  2. Both jumpers on the DSC are set?
  3. Is the Green LED shining and the red one flashing on the DSC?
  4. Please set the second jumper to “SLOW” at the USBasp and burn the bootloader again to the DSC. - Open the Arduino IDE - Tools - Burn Bootloader

Could you please post a picture of your DSC and USBasp how they are connected and which LEDs are shining? Furthermore a screenshot of your Arduino IDE would be very helpful, e.g. which port is used, which board was chosen and so on.

Thanks in advance. :robot:

I did not have the power jumper set. That is not in your instructions anywhere. You should add that! I couldn’t find any information about the USBasp on your website. Perhaps creating a page that is specific to the USBasp would be helpful?

There is an error in your english instructions for the ROS Node regarding installing the arduino IDE:

sudo apt-get install arduino arduino core

E: Unable to locatate package core

Well, here are better instructions for downloading the latest Arduino software for Ubuntu 16.04 running on Raspberry Pi 3 B+

Download Arduino IDE Linux Arm 32bit for Raspberry pi

Don’t use “sudo apt install arduino” because it will install arduino v1.0.5 which does not allow for custom hardware. (If you are installing on a desktop or laptop you will probably want to select the 64bit Arduino version. Also FWI I had issues with 1.8.9 on a dell laptop running Ubuntu 16.04 so I downloaded a previous build 1.6.13 of the Arduino IDE and that worked fine.)

wget https://www.arduino.cc/download_handler.php?f=/arduino-1.8.9-linuxarm.tar.xz
tar -xf arduino-1.8.9-linuxarm.tar.xz
sudo mv arduino-1.8.9 /opt

Download MyBotShop DSC Arduino files and install:

wget http://www.mybotshop.de/download/Arduino_DSC.zip
unzip Arduino_DSC.zip
cd libraries/
sudo mv DSCserial/ /opt/arduino-1.8.9/libraries/
cd ../hardware/
sudo mv DSC /opt/arduino-1.89/hardware/

Start Arduino IDE:

cd /opt/arduino-1.8.9 && ./arduino

You can try running the install script in the Arduino folder with the instructions below, however I have had limited success. Mostly this script just creates a desktop shortcut. But I had issues with it working.

cd /opt/arduino-1.8.9/
./install.sh

Well unfortunately I still can’t upload to the DSC board, even when directly connected to the Raspberry PI.

I ran:

usermod -ag tty [username]
usermod -ag dialout [username]

and

sudo chmod a+rw /dev/ttyAMA0

to make sure I had write permission.

here is a screenshot:

Dear Tom,

thank you very much for sharing your experiences and tips how you are using the DSC. :+1:

Do you’ve installed the following packages to use the GPIOs as programmer?

sudo apt-get install -y python-dev python-rpi.gpio

yes both of those packages are already installed and are the newest versions

I got an 5V FTDI programmer and I get the same error (see screen shot) when trying to upload to the board from Mac OSX.

so it has nothing to do with the RPI or its libraries. there seems to be something wrong with the DSC board.

Here is a photo of the board with the FTDI programmer

Dear Tom,

in my opinion you have some driver problems, because the Green and Red LED is shining. That indicates that the previous code, which we’ve burned on the uC before shipped the DSC, is still on the board.
Please check your second post concerning catkin_make fail, I have an idea how to test something.

Kind regards
MYBOTSHOP_Support :robot:

I don’t think it is the driver. I am getting the same error on Mac OSX, Ubuntu 16.04, and Windows 10 and on the RaspberryPi. that’s four different computer systems that are all unable to communicate with the board.

On the Mac I just installed the new FTDI drivers

Hi Tom,

usually I would agree to your opinion but on the other hand you are not able to programm the DSC via USBasp adapter, too and the ISP Bus is working for sure because we are using it, too, to programm the bootloader and upload the ROS file.

Ok well I finally got the catkin_ws to build but I still can’t communicate with the board.

here is how I set things up:

Download & unzip files:

wget http://www.mybotshop.de/download/DSC-master.zip
unzip DSC-master.zip

Move files and rename:

cp -r DSC-master/Arduino/Arduino\ IDE/hardware/DSC/ ~/Arduino/hardware/
cp -r DSC-Master/Arduino/Arduino\ IDE/libraries/DSCserial/ ~/Arduino/libraries/ 
cp -r DSC-master/ROS\ Node/ ~/catkin_ws/src/
mv ~/catkin_ws/src/ROS\ Node/ ~/catkin_ws/src/servo_board

Build libraries:

cd ~/Arduino/libraries/
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .

Build Catkin Workspace:

cd ~/catkin_ws
catkin_make

Build is succesful. :slight_smile:
then I wrote my own con.yaml file.

use_lib: "false"

joints: {
j1:{id:[1]},
j2:{id:[2]},
j3:{id:[3]},
}

then:

roslaunch servo_board dsc.launch

output:

ubuntu@ubiquityrobot:~/catkin_ws$ roslaunch servo_board dsc.launch
... logging to /home/ubuntu/.ros/log/79cd1d2a-d0dc-11e5-81b6-b827eb932e96/roslaunch-ubiquityrobot-5714.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubiquityrobot.local:37945/

SUMMARY
========

PARAMETERS
 * /joints/j1/id: [1]
 * /joints/j2/id: [2]
 * /joints/j3/id: [3]
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_lib: false

NODES
  /
    servo_test (servo_board/servo_board_node)

ROS_MASTER_URI=http://ubiquityrobot.local:11311

process[servo_test-1]: started with pid [5731]

then I tried running:

rosrun rosserial_python serial_node.py /dev/ttyAMA0

but I am still getting an error:

ubuntu@ubiquityrobot:~$ rosrun rosserial_python serial_node.py /dev/ttyAMA0
[INFO] [1554317878.179003]: ROS Serial Python Node
[INFO] [1554317878.225621]: Connecting to /dev/ttyAMA0 at 57600 baud
[ERROR] [1554317895.340240]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
[ERROR] [1554317910.342652]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
[ERROR] [1554317925.345236]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
[ERROR] [1554317940.348141]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

any help appreciated. Thanks!

also I checked to make sure I have write access to the port:

ubuntu@ubiquityrobot:~$ ls -l /dev/ttyAMA0 
crw-rw-rw- 1 root dialout 204, 64 Apr  3 19:00 /dev/ttyAMA0

and made sure I am added to the dialout group:

sudo usermod -aG dialout ubuntu

but it makes no difference.

Ok I purchased a new USBasp from amazon and now I can upload the DSC_Blink sketch!

However, now I can’t upload the DSC_ROS arduino sketch.

I tried on my laptop running Ubuntu, the Raspberry Pi and also my Mac OSX Arduino IDE. they all report the same error:

#include _servo_board/Dynoservo.h>
servo_board/Dynoservo.h no such file or directory

Ok I went through and deleted all the DSC related files and then went through and recopied and rebuilt the Arduino libraries and now i was finally able to upload the DSC_ROS,ino sketch!

I also deleted a “Rosserial_Arduino_lirbary” folder that may have been installed by previous software. But it seemed like rebuilding the libraries again is what did it.

So there was something wrong with my first USBasp programmer, or I did something wrong using it… I don’t know.

PHEW!

Hi Tom,

you can only compile your DSC ROS Node on the device where you have completed the following steps: http://www.forum.mybotshop.de/t/ros-dsc-rpi-dynamixel-controller-catkin-make-fail/115/9?u=mybotshop_support

Concerning the fault USBasp I’m very sorry about it, I will tell my colleague he should send you a new one :slight_smile:

Kind regards
MYBOTSHOP Support :robot:

Ok I understand.

thanks for the offer for the replacement , but I already purchased another USBasp and I don’t really need two. but thank you. :slightly_smiling_face:

also i realized that for my project I want to use the dynamixel pros as well as some of the x-series. which means I need something that can do RS485.

But I have a handful of AX servos and also some x-series TTL servos so maybe i’ll use the DSC for another project later.

I should also reiterate that you should include some instructions for the USBasp on your site that explains the jumper pins, either as part of the DSC page or on a seperate page. that would have saved me a LOT of headache and confusion.

Thanks for the support!

Hi Tom,

Oh, our DSC has unfortunately only a Half Duplex TTL interface, so I would recommend a ROBOTIS OpenCR1.0 if you would like to control DYNAMIXEL Pros.

Thanks a lot for your feedback. We will definitely improve our ROS Guide and will add a short section about the USBasp Programmer, too :slight_smile:

I would be happy to read some further posts about your project, and if you need any assistance please feel free to contact us any time!

Have a nice Sunday!

Kind regards
MYBOTSHOP Support :robot: