9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Cant get your radio to work? General Hardware issues?
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Thanks Gohst. Have a look at page 333 where it gives the current consumption of the chip vs frequency that Mike has given.

From what I can see. Our old M64 under the same conditions is around 19mA

I'm getting a little confused here. Is the 128A the same beast as the 128-16AU ? I will answer that.. No it isn't ----> http://www.atmel.com/Images/doc8166.pdf

In fact the M128A looks a lot better from the current consumption front and it is cheaper than the 128-16AU at CPC Farnell ----> http://cpc.farnell.com/jsp/search/produ ... tt=SC09729

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

No, there is a ATmega128A-AU.

Someone else posted this:
doc8166.pdf
(77.48 KiB) Downloaded 480 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Same document Mike.. It does leave the question as to would it be better to fit the 128A-AU than the 128-16AU or is there a problem with that?
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

I can't see any problem, the higher VOL figures should not be a problem as they are the same as the M64A figures.

Atmel in general are trying to push people towards newer products. The Xmega devices are cheaper too. Unfortunately, they are not pin compatible, and are 3.3V as well.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Noted Mike.. The current levels seem to be the same for the 128A as the M64 that was fitted originally which has to be good news.

I have one M128A on order as a standby as the broken TX has the larger regulator on board. When that TX is working I will probably change the m128 in the other TX for the m128A

User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

Sorry to butt into this topic so late but it seems a good possibility that the 128 processor has a slightly different architecture to the 64 and hence the software needs a small rewrite to correct the issue.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Kilrah »

No, they are identical in all aspects that can be related to that.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

It still leaves the question as to why most of us that have the M128 - 16AU fitted should have had this problem, yet the standard M64's seem unaffected. Not sure of the situation for those that have fitted the lower current M128A's.

I do see that Kilrah has fitted a M128A and no problems found.

I would have thought that with the design flaw that most of the 9X's would have suffered resets., regardless of what processor was in use.
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

It may simply be a memory write to the EEPROM that has a different address or offset, a slight difference in memory organisation is indicated.
I have noted that code that should work on similar processors may not because of the shift in locations where variables are stored.
This is because the designers have wanted those addresses for other features and have shifted the memory slightly.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by jhsa »

I have 2 m128 16AU on both my radios and have had no problems with the trims and rebooting at all..

It makes me believe that something changed on the radio itself..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Kilrah »

These are the only differences between both versions (+ EEPROM being 4k on 128, they forgot that).

http://www.atmel.com/images/doc2539.pdf
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

Possibly the batch of m128 16AU's is suspect then, what are the batch numbers on the ones that work and the ones that don't, perhaps there's a clue there.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by jhsa »

If it is a batch problem how could you explain people having also the same problem with the atmega 2561??

I have 2 of these atmegas to replace the 128's I have on my radios now.. but don't want to do it during the flying season :(
the person who sent me the chips is the one having problems.. If i don't have problems using the same chips then it will prove that could be the radio.. But as I said that will have to wait a couple more months.. ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

It is not really possible to understand/predict what happens as something is being driven out of spec.
When you use a horizontal trim, it switches the trim signal to ANALOG ground. There is a 0.1 uF capacitor between DIGITAL ground and the switch. This capacitor is charged to 5V, and discharges through the switch to ANALOG ground. There is a small inductor between digital ground and analog ground. As a result, I would expect there to be a significant positive voltage spike on ANALOG ground.
Now there is a capacitor between ANALOG ground and ANALOG_VCC. Any positive voltage spike on ANALOG ground will therefore be coupled to ANALOG_VCC. Again there is an inductor between ANALOG_VCC and DIGITAL_VCC.
Overall I therefore expect a positive voltage spike on ANALOG_VCC, but the chips are specified that ANALOG_VCC MUST be within 0.3V of DIGITAL_VCC. These spikes could easily exceed this requirement, probably causing a latchup of the AVCC pin leading to a reboot.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by gohsthb »

I simulated this circuit in ltspice, the capacitor and inductor cause a ringing. Or voltage swinging between a high and low voltage. Adding a resistor in line will dampen this ringing and keep the device from resetting. What doesn't make sense is the m64 not rebooting, I just have to chalk this one up to differences in how the 2 devices are made.
-Gohst

Sent from my LG-P999 using Tapatalk 2
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by jhsa »

but both my 128's also don't reboot :o
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Kilrah »

My M128A radio is also rock solid - but that's typical of out of spec operation.
Each chip is a bit different due to manufacturing tolerances, and will behave a bit differently. The manufacturer specs guarantee that within the given conditions they all behave the same, but when you get out of that anything can happen.
User avatar
mhotar
Posts: 198
Joined: Wed May 16, 2012 9:57 pm
Country: -
Location: Jemnice, Vysocina

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by mhotar »

I can confirm these problems with M128A fitted in 9XR (up/down/left/right buttons replaced with microswitches), and also can confirm this with M2561 in 9X (horiz. trims).
I measured it with oscilloscope and there are really spikes several volts (negative and positive) during switching on the AGND.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Ermmm... Do you mean that any 9XR fitted with the M128 -16AU as standard is susceptible to random resets? :shock: Or is the 9XR fitted with the 'safe' M128A
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Kilrah »

Probably not, because the originally fitted "rubber contacts" have a certain resistance and don't make a firm and instantaneous contact like a real switch does. Problem is that quite a few people don't like them and install real switches instead.

And no, there have been issues reported with both the 128 and 128A (he actually just did above), so that doesn't seem to be relevant to the issue.
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

mhotar wrote:I can confirm these problems with M128A fitted in 9XR (up/down/left/right buttons replaced with microswitches), and also can confirm this with M2561 in 9X (horiz. trims).
I measured it with oscilloscope and there are really spikes several volts (negative and positive) during switching on the AGND.
What happens if you connect the switches to digital ground, the D port pins are digital and should be referenced to the digital ground anyway?!
I can see no pullups on the lines in (I assume the software is using the internal pullup activated) the result of connecting to ground through a 200 ohm resistor ought to be a fairly spike free process. This referencing to analogue ground may be a mistake that the original designers made, that they got away with it with the 64, but it shows a problem with the 128.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Bill wrote:What happens if you connect the switches to digital ground,
That will work. The problem is a physical one in isolating the ground switch contacts on the trim board so that you can reroute them to digital ground.
jhsa wrote:but both my 128's also don't reboot :o
And you are happy not to do the simple modification that would give some peace of mind while you are flying your killer model around the sky? :roll:
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

Studying the pinout for the 128 I can see AVCC and various grounds around the chip but none of them analogue ground, the pinouts description doesn't mention one either, there is an a ref pin which is important for the Internal reference voltages of nominally 2.56V or AVCC provided on-chip. "This voltage reference pin may be externally decoupled at the AREF pin by a capacitor for better noise performance."
There is no mention of analogue ground, are the pins being used the other way around and the vref voltage being used to trigger a high on the input pins instead of a low to ground when the switches are closed (probably not) but Is the circuit schematic accurate?
I think pin 63 which is labelled ground in the specification sheet has been misinterpreted as an analogue ground and should in fact be connected to ground, perhaps that makes no difference if all the grounds are connected in the chip, but it might be significant if the pathway through the chip is not low resistance perhaps the 64 is, but the 128 and variants are not so directly connected!!
Last edited by Bill on Sun Jul 07, 2013 5:13 pm, edited 1 time in total.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

Pin 63 is indeed being used as an analog ground connection. It is connected to digital ground through a 10uH inductor.
Have you get a copy of the circuit, references have been posed in several places?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

MikeB wrote:Pin 63 is indeed being used as an analog ground connection. It is connected to digital ground through a 10uH inductor.
Have you get a copy of the circuit, references have been posed in several places?

Mike.
Yes I have the gruvin 9x one and that's why I'm questioning it's accuracy the pin 63 is clearly labelled analogue ground but the data sheet says otherwise if indeed a connection is being made on the end of the inductor this may well be the problem.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

The basic problem is indeed that this analog ground is the only ground connection wired to the small board by the horizontal trim switches. This board handles both axes of one stick and the horizontal trim switch. Consequently, the horizontal trim switches switch to this analog ground and is the original design error. The vertical trim switches are wired separately using the digital ground.

The easiest solution is to add 1K resistors to the horizontal trim switches.

In my opinion, it is actually a design flaw to have any switches with a capacitor directly across them, this is always going to cause some spikes, using the analog ground just makes them worse. It wouldn't be so bad if the capacitors for the horizontal switches were also connected to analog ground, but they are connected to digital ground.

When I get a chance, I shall fit 1K resistors to all my horizontal trim switches, even with the M64.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by jhsa »

I guess that one might have to be put on the immediate to do list :
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Flaps 30 »

Yup... I reckon it ought to be on the must do list for any/all 9X owners, regardless of what firmware they have on board. Having a transmitter reset whilst in the air is no joke, especially if you have switches in positions that are not in default settings.
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by Bill »

In my opinion, it is actually a design flaw to have any switches with a capacitor directly across them
They may not be there just to annoy you, they are probably there to remove radiated RF from the transmitter module preventing it from getting into the microprocessor and causing all kinds of mayhem (especially when the TX was originally designed for 35 MHz).
Wiring the trim switches to the correct ground will probably be the best fix.
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: 9x upgrade to ATmega128A3-AU + Reboot With Horiz Trims

Post by MikeB »

Yes, keep the capacitors, use the correct ground, BUT also have the resiostors. The resistors will prevent any spikes.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “Hardware”