Thread Tools
Jun 12, 2010, 07:40 PM
Registered User

PWM update rates restricted


Quote:
Originally Posted by dcraig
...
My question is at what speed can PWM run on controllers with no oscillator?


This is the "test rcpulse interval" from the 18a_tpro_ppm_r05, which looks to me like it will work on 40Hz to 66Hz PWM signal. Arthur, you reported getting the Plush 30 to work at 400Hz with this code though. How?

Code:
; test rcpulse interval
		cbr	flags2, (1<<RC_INTERVAL_OK) ; preset to not ok
		lds	i_temp3, stop_rcpuls_l
		sub	i_temp1, i_temp3
		lds	i_temp3, stop_rcpuls_h
		sbc	i_temp2, i_temp3
		cpi	i_temp1, low (25000)
		ldi	i_temp3, high(25000)	; test range high
		cpc	i_temp2, i_temp3
		brsh	extint1_fail		; through away
		cpi	i_temp1, low (15000)
		ldi	i_temp3, high(15000)	; test range low
		cpc	i_temp2, i_temp3
		...

I tried setting the low test range to 2500 (400 Hz i think) and sending the controller 200Hz PWM. Worked ok until about half throttle, then started making the startup beeps again. Any advice?

Thanks,
Dave
I too found the same thing as Dave. The above test range will only accept PWM update rates ~ 60Hz. I tried setting the low test range to 200 instead of 15000 and much higher update rates are now accepted. A value of 200 should allow up to 450Hz. I am flying at 400Hz now with no problems. I'd suggest that this change be made to the gold copy as the whole point of this firmware is to allow higher update rates:

Code:
; test rcpulse interval
                cbr     flags2, (1<<RC_INTERVAL_OK) ; preset to not ok
                lds     i_temp3, stop_rcpuls_l
                sub     i_temp1, i_temp3
                lds     i_temp3, stop_rcpuls_h
                sbc     i_temp2, i_temp3
                cpi     i_temp1, low (25000)
                ldi     i_temp3, high(25000)    ; test range high
                cpc     i_temp2, i_temp3
                brsh    extint1_fail            ; through away
                cpi     i_temp1, low (200)      ; NEZ: was 15000
                ldi     i_temp3, high(200)      ; test range low
                cpc     i_temp2, i_temp3
                brlo    extint1_fail            ; through away
                sbr     flags2, (1<<RC_INTERVAL_OK) ; set to rc impuls value is ok !
                rjmp    extint1_exit
...
- BN
Sign up now
to remove ads between posts
Jun 18, 2010, 01:55 AM
Registered User

first running version for fast pwm for tp30a 2009 HH30A V1.1


In attach you can find my first try for fast ppm. I can fly with this (quadrocontrol II XS); sometimes after landing one or more esc's
make an reset; but after this you can start again. During flight
there are no problems (after 2 h flight till now).
It wasn't possible for me to change filenames of the results (hex, lst,map)
inside winavr; so please ignore filenames. You can use included hex file.
Don't change the fuse bits; the original settings are correct.

my config: QC Control II XS, TP30A 2009 Type 3, Emax CF2822
weight is 850 g with rhino 3s1p 2250mah;
no problems with temperature; after 10 min the battery and
brushless motors are a little warm.

For all: please "review" my code; sorry, that I don't contacted the
owners of the source; it was a quick hack over weekend for me! Thanks to agrresiva, quax and bn999!!!

good luck
Fritz


Quote:
Originally Posted by doorhead
I wish to run high-speed(~400Hz) PPM with my TP25A 2009(type3)[Li_0850 / HH30A V1.1].

There are many variant flash files, and I'm ready to flash.
But I can't find type3's PPM version.

On Arthur P.'s thread TowerPro-type2(=TurnigyPlush=SuperSimple) and TowerPro Type3's flash is different.
TGYPxxA2007v0100TwiNoCal.zip[https://www.rcgroups.com/forums/show...&postcount=792]
TPROxxA2009v0100TwiNoCal.zip[https://www.rcgroups.com/forums/show...&postcount=793]

1) So I don't know TGYPxxA2007v0100PpmNoCal.zip or Quax's 18a_tpro_ppm_r05.zip is right flash for my HH30A V1.1 esc.
anybody has typ3 highspeed PPM version???


2) I have STK500V2, Can I dump my original firm in HEX?

Please help me.
Jun 18, 2010, 02:11 AM
Flying at Sochi 2014 Olympics
bob.titus's Avatar
Hey jp,

thanks for asking, it seems my FC was faulty so I haven't really been able to test them, but it seems I got 3 our of 4 working, for some reason one remains silent...
I will go on with this MK project as soon as I find some time.

Bob
Quote:
Originally Posted by jpheli
Bob how is it going?? you getting them working?

--jp
Jun 30, 2010, 05:01 PM
Registered User
coco77300's Avatar
Hello,

I just spend all my time to read the 58 pages of this topic. => very interesting !!!

My story is that a freind made for me 4 ESC's and one of them broke yeterday, and i can't have any contact with my freind ...

So i think that I would made it by myself, but with all this pages, i can't really how to know for soldering and wich .HEX files to use.

So, is it possible to make a new topic which is will be closed just to explain how to mod a TowerPro or a Turnigy PLUSH ???

Thanks a lot, and i will begin to by a USB programmer and some ESC's to test but i don't know wich one TP or TG ...

Thanks,
Conan
Jul 07, 2010, 12:59 PM
Registered User
Hi, I just did my first ever i2c conversion on a w25A 2009 and its mostly working except for bad stuttering at startup.

Heres a video of whats happening. It eventually spins up and runs fine once its spinning, its just the start-up thats shaky.

I'm using a PIC micro to send the i2c commands. Ive tried starting up with low throttle. Less than 20 seems to do nothing (same as 0), but 25 for example still results in shaky start-up and then spins fine.

Im using the firmware from this post (https://www.rcgroups.com/forums/show...&postcount=308) and used the included ponyprog script.

Can anyone suggest what to try?

Video:
w25A (2009) i2c conversion problem (0 min 14 sec)
Jul 07, 2010, 01:25 PM
Eduardo

start-up


What i2c command are you sending to start-up motor ?
i think you are starting with high value.

try startup sending low valeu as 12 or 14 ...


Quote:
Originally Posted by St3venAU
Hi, I just did my first ever i2c conversion on a w25A 2009 and its mostly working except for bad stuttering at startup.

Heres a video of whats happening. It eventually spins up and runs fine once its spinning, its just the start-up thats shaky.

I'm using a PIC micro to send the i2c commands. Ive tried starting up with low throttle. Less than 20 seems to do nothing (same as 0), but 25 for example still results in shaky start-up and then spins fine.

Im using the firmware from this post (https://www.rcgroups.com/forums/show...&postcount=308) and used the included ponyprog script.

Can anyone suggest what to try?

Video: http://www.youtube.com/watch?v=3I8xuwfZXgg
Jul 07, 2010, 01:29 PM
Registered User
if i try 12 or 14 it does not move at all (no stuttering, no spinning, nothing)

the min that it will actually do anything is about 20.

but even if i use 20 it still stutters just as much before spinning up.
Jul 07, 2010, 01:52 PM
Eduardo
HUmmm this an old version !
the last version start with 12;

do you know how modify and recompile ESC code ?



Quote:
Originally Posted by St3venAU
if i try 12 or 14 it does not move at all (no stuttering, no spinning, nothing)

the min that it will actually do anything is about 20.

but even if i use 20 it still stutters just as much before spinning up.
Jul 07, 2010, 01:58 PM
Registered User
Quote:
Originally Posted by agressiva
HUmmm this an old version !
the last version start with 12;

do you know how modify and recompile ESC code ?
Could you post a link to the latest version?

I havn't compiled code for the atmea8 before, but im sure i could work it out. Ive done lots of coding for PIC micros, but not atmel.
Jul 07, 2010, 02:14 PM
Registered User
The only compiled versions i can find are the same as the one im using (file dated 20/04/2009).

I'm downloading AvrStudio now so I can edit and compile myself.

What would you suggest I should change in this code to try to fix the stuttering startup problem?

Code:
.equ	I2C_ADR		= 0x50
.equ	MOTOR_ID	= 1		; 1, 2, 3 or 4


.equ MOT_BRAKE    = 0
.equ UART_CONTROL = 0

.include "tp-18a.inc"

.equ	CHANGE_TIMEOUT	= 0x01
.equ	CHANGE_TOT_LOW	= 0x01

.equ	POWER_RANGE	= 100			; full range of tcnt0 setting
.equ	MIN_DUTY	= 8			; no power
.equ	NO_POWER	= 256-MIN_DUTY		; (POWER_OFF)
.equ	MAX_POWER	= 256-POWER_RANGE	; (FULL_POWER)

.equ	PWR_MAX_RPM1	= POWER_RANGE/4
.equ	PWR_MAX_RPM2	= POWER_RANGE/2

.equ	PWR_STARTUP	= 20
.equ	PWR_MAX_STARTUP	= PWR_STARTUP+15

.equ	timeoutSTART	= 48000
.equ	timeoutMIN	= 36000

.equ	T1STOP	= 0x00
.equ	T1CK8	= 0x02

.equ	OCT1_RANGE1	= 16	; ( ~2400 RPM )
.equ	OCT1_RANGE2	= 8	; ( ~4800 RPM )

.equ	PWR_RANGE1	= 0x40	; ( ~2400 RPM )
.equ	PWR_RANGE2	= 0x20	; ( ~4800 RPM )

.equ	ENOUGH_GOODIES	= 60
Jul 07, 2010, 08:58 PM
Registered User
ST3venAU,

I have 5 25a esc's I modified with the same files you are referencing and they all stutter a little but once up and running they do fine. I have many hours on them with no problems.

Mine seem to start about 18 to 20 simular to yours.

None of mine hold the clock line low for the ack bit and I would be interested if anyway knows if this is normal with these mods. They control the speed very smoothly all the way up to 255 so the performance is fine, it just gives me I2C errors because on the lack of the clock line not being held low by the esc.

I send start address pw stop.

I would greatly appreciate any information.

Thanks

Kisssys
Jul 07, 2010, 11:19 PM
Registered User
How long do yours take to start properly? Because i've been seeing up to 30 seconds of stuttering before it starts properly. It varies from starting straight away, to taking 30 seconds with no apparent pattern.


Quote:
Originally Posted by Kisssys
ST3venAU,

I have 5 25a esc's I modified with the same files you are referencing and they all stutter a little but once up and running they do fine. I have many hours on them with no problems.

Mine seem to start about 18 to 20 simular to yours.

None of mine hold the clock line low for the ack bit and I would be interested if anyway knows if this is normal with these mods. They control the speed very smoothly all the way up to 255 so the performance is fine, it just gives me I2C errors because on the lack of the clock line not being held low by the esc.

I send start address pw stop.

I would greatly appreciate any information.

Thanks

Kisssys
Jul 07, 2010, 11:44 PM
Eduardo

mod


Change this line
.equ PWR_STARTUP = 20

put some value like 10 ... 12 and try it.



Quote:
Originally Posted by St3venAU
The only compiled versions i can find are the same as the one im using (file dated 20/04/2009).

I'm downloading AvrStudio now so I can edit and compile myself.

What would you suggest I should change in this code to try to fix the stuttering startup problem?

Code:
.equ	I2C_ADR		= 0x50
.equ	MOTOR_ID	= 1		; 1, 2, 3 or 4


.equ MOT_BRAKE    = 0
.equ UART_CONTROL = 0

.include "tp-18a.inc"

.equ	CHANGE_TIMEOUT	= 0x01
.equ	CHANGE_TOT_LOW	= 0x01

.equ	POWER_RANGE	= 100			; full range of tcnt0 setting
.equ	MIN_DUTY	= 8			; no power
.equ	NO_POWER	= 256-MIN_DUTY		; (POWER_OFF)
.equ	MAX_POWER	= 256-POWER_RANGE	; (FULL_POWER)

.equ	PWR_MAX_RPM1	= POWER_RANGE/4
.equ	PWR_MAX_RPM2	= POWER_RANGE/2

.equ	PWR_STARTUP	= 20
.equ	PWR_MAX_STARTUP	= PWR_STARTUP+15

.equ	timeoutSTART	= 48000
.equ	timeoutMIN	= 36000

.equ	T1STOP	= 0x00
.equ	T1CK8	= 0x02

.equ	OCT1_RANGE1	= 16	; ( ~2400 RPM )
.equ	OCT1_RANGE2	= 8	; ( ~4800 RPM )

.equ	PWR_RANGE1	= 0x40	; ( ~2400 RPM )
.equ	PWR_RANGE2	= 0x20	; ( ~4800 RPM )

.equ	ENOUGH_GOODIES	= 60
Jul 08, 2010, 07:34 AM
Registered User
Quote:
Originally Posted by St3venAU
How long do yours take to start properly? Because i've been seeing up to 30 seconds of stuttering before it starts properly. It varies from starting straight away, to taking 30 seconds with no apparent pattern.
If you wiggle the throttle slightly around the point they first start to stutter you'll find a point that they start the best. It only takes a couple of seconds to get all four running on my quad.

Kisssys
Jul 08, 2010, 02:46 PM
Registered User
Quote:
Originally Posted by agressiva
Change this line
.equ PWR_STARTUP = 20

put some value like 10 ... 12 and try it.
Thanks agressiva.

After many hours of testing, then somehow breaking things, killing an atmega8, de-soldering and re-soldering a replacement atmega8, finding a dead resistor and replacing it I finally got it back to where i was a day ago (stuttering).

I then tried all kind of different settings in the asm file. Eventually the best I could do was this:

.equ PWR_STARTUP = 20
.equ PWR_MAX_STARTUP = PWR_STARTUP+0

That started and stopped a bit, but didnt stutter so much, so I now have it starting at 20 and then as soon as its started, speeding it up to 25.

Below is the result. It still stutters sometimes but is much better than it was.

w25A (2009) i2c conversion update (0 min 31 sec)


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
2 Electro Fusion Motors & CC esc's from Coronas for sale mthomson Aircraft - Electric - Airplanes (FS/W) 7 Mar 18, 2004 07:13 AM
FS- FMA M5 dual conv Rx and 2 esc's- all NIB Etonic Aircraft - Electric - Airplanes (FS/W) 3 Nov 17, 2003 02:27 PM
How do I hook 2 esc's into 1 receiver ? Al P Power Systems 2 Aug 30, 2002 05:38 PM
EBAY Brushless Motor & 2 ESC's S Anastasio Aircraft - Electric - Airplanes (FS/W) 0 Aug 12, 2002 06:41 AM
WTB: 2 Hitec Feather Recievers and 2 ESC's Ryan Nau Aircraft - Electric - Airplanes (FS/W) 6 Jul 03, 2002 07:13 PM