Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

General information

Moderators: lily.li, violet

Post Reply
lidong769019122
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Wed May 08, 2019 7:31 am

Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by lidong769019122 » Wed May 08, 2019 7:51 am

Hi, everyone! I bought a Hercules Dual 15A 6-20V Motor Controller a few days ago. When I try to upload the code to the board via Arduino, it always shows the following message:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x2e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x2e

I am sure that the board type Arduino Duemilanove w/Atmega328 and the port are chosen correctly. I have tried the following different methods, but it still does not work.
1. Try different versions of Arduino;
2. Try different usb cables;

Is there anyone who can help me solve this problem? Thanks!

bill.yu
Junior-7
Junior-7
Posts: 733
Joined: Mon Apr 02, 2018 11:05 am

Re: Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by bill.yu » Wed May 08, 2019 11:22 am

Hi there,

Do you connect the DTR signal to your usb to ttl adapter? thanks.

Image

lidong769019122
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Wed May 08, 2019 7:31 am

Re: Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by lidong769019122 » Wed May 08, 2019 10:19 pm

Hi,

I connected all the devices as shown in your picture. It still has the same problem. Do you have other suggestions?

johntkennedy
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Mon Feb 04, 2019 10:42 am

Re: Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by johntkennedy » Thu Sep 19, 2019 12:20 pm

I have the same issue. I can't send any code to the Hercules board.

* In the Arduino editor, I've set the port to the UARTSbee, Board to Duemilanove, Processor to ATMega328P
* I have then connected the UARTSBee to the Hercules board. The board is not powered by the battery back.
* When I connect the UARTSBee to the computer (Mac or PC, tried both) it lights up, and the Hercules power also lights up.
* Any time I try to update a sketch I get

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00


And I get exactly the same if the UARTSBee is disconnected from the Hercules.

Q. What am I missing?
Q. Should the UARTSBee be set to 3v or 5v?
Q. Why can't the UARTSBee communicate with the Hercules?

Any help gratefully received!

-John

johntkennedy
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Mon Feb 04, 2019 10:42 am

Re: Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by johntkennedy » Fri Sep 20, 2019 11:02 am

I solved my version of this problem.

First, I checked that the UARTSBee was working by using a terminal emulation app, and connecting the RX/TX to check for an echo.

Second, I realised that it was possible the ATMega on the controller board didn't have any boot loader code, or if it did, it was corrupt.
So I flashed it using another Arduino Uno (remember the capacitor across reset and ground).

https://learn.sparkfun.com/tutorials/in ... loader/all

Finally I made sure to the use the latest library from GitHub. I'd been using an older one which didn't work.

https://github.com/Seeed-Studio/Hercules_Motor_Driver

Of course. all this would have been unnecessary if there had been proper documentation!

bill.yu
Junior-7
Junior-7
Posts: 733
Joined: Mon Apr 02, 2018 11:05 am

Re: Cannot upload the code to Hercules Dual 15A 6-20V Motor Controller

Post by bill.yu » Fri Sep 20, 2019 11:30 am

Hi there~

The bootloader on the board is quite old. You have to update the bootloader first and then you can program the arduino code from serial directly. 

I use the arduino uno to burn the controller bootloader by following below instructions.
https://www.arduino.cc/en/Tutorial/ArduinoISP  

Then you can select arduino uno in board manager to burn the program to controller. Hope it helps. thanks.

Post Reply