Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Sep 20, 2015, 10:31 PM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

Another SimonK flash


The decision was made to convert the lunchbox to brushless. None of the flying ESC's in the apartment could support reverse, so it was time for a SimonK flashing of a Supersimple 30A. None of the blog posts about Arduino programming contained the pinout used to program the last ESC, so here it is:

black - ground
- sck pin 13
- miso pin 12
- mosi pin 11
- SS pin 10

The key parameter for reverse mode was RC_PULS_REVERSE in tgy.asm

Then came make tp_8khz.hex to generate a high efficiency 8khz target. Then came running arduino to install the Arduino ISP sketch. Then finally came the avrdude command:

/root/arduino-1.6.0/hardware/tools/avr/bin/avrdude -C/root/arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -e -patmega8 -cstk500v1 -P/dev/ttyACM0 -b19200 -Uflash:w:tp_8khz.hex:i -Ulock:w:0x0F:m

Then came the dreaded stk500_recv(): programmer is not responding

It erased successfully, read the device ID, but wouldn't take the program. There was no evidence of the chip being fried besides reset being 3.8V instead of 5V. A power test showed it was indeed erased. It was a brick. Fortunately, no-one buys just 1 Hobbyking ESC. It may have to be run without reverse.


According to the range test, it takes 2.5A at 12V to go 6mph. It was a major investment to make the TBLE-02s precise enough. Another stock ESC probably won't be precise enough.


A useful command to erase the mega8:

/root/arduino-1.6.0/hardware/tools/avr/bin/avrdude -C/root/arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -pm8 -cstk500v1 -P/dev/ttyACM0 -b19200 -e -Ulock:w:0x3F:m

Then program it without erasing it:

/root/arduino-1.6.0/hardware/tools/avr/bin/avrdude -C/root/arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -vvvv -D -patmega8 -cstk500v1 -P/dev/ttyACM0 -b19200 -Uflash:w:tp_8khz.hex:i -Ulock:w:0x0F:m

The fuses showed

hfuse: 0xc1
lfuse: 0xbf

so reset & SPI programming were still enabled. Then with verbosity enabled:


avrdude: writing flash (8192 bytes):

Writing | | 0% 0.00
savrdude: Send: U [55] . [00] . [00] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: d [64] . [00] @ [40] F [46] . [d9] . [c4] ] [5d] . [c0] . [18] . [95] . [18] . [95] . [09] . [94] Y [59] . [c0] 6 [36] . [c0] . [18] . [95] > [3e] . [c0] . [18] . [95] . [18] . [95] s [73] . [c0] . [18] . [95] . [18] . [95] . [18] . [95] . [18] . [95] . [18] . [95] m [6d] . [c0] . [18] . [95] i [69] z [7a] @ [40] t [74] @ [40] B [42] @ [40] [ [5b] . [9f] . [b6] . [8a] . [94] . [09] . [f4] . [e1] . [e2] . [9f] . [be] . [18] . [95] . [9f] . [b6] . [8a] . [94] . [9f] . [be] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

After 2 days of fighting, reprogrammed Arduino ISP using the copy of the Arduino IDE on /amazon/root/arduino.heroine & it finally took. The IDE in /root/arduino-1.6.0 seemed to be broken to support PWM experiments. The test motor finally beeped but would still not turn.

Plugged in a full range PWM tester instead of the 1/4 range used for the travel fan & the motor came to life. It had to be at 50% during powerup to arm. Then fwd & rev worked as expected, with no braking. A major expense was averted. The hardest step towards a brushless lunchbox was complete.
Last edited by Jack Crossfire; Sep 22, 2015 at 10:47 PM.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools