Author Topic: One for Jim  (Read 19369 times)

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
One for Jim
« on: 12/12/2014, 01:45:48 PM »
Hi Jim

I'm hoping you can answer this for me or do some reasearch?

I want to reflash a OrangeRx Mk1 3 axis stabiliser. There's stuff all over the web such as http://eastbay-rc.blogspot.co.uk/2013/04/open-source-stabilization-software-for.html and https://docs.google.com/document/d/1Wu7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7HSnXEutw/pub

I don't have the flashing tool that they suggest but I do have an AVR-ISP-MK2 along with AVR Studio 6.
AVR Studio will open the files. I can select the chip type - Atmega168PA and all looks ready to go.

I'm just not 100% sure about electrical connections of the programmer to the stabiliser. I'll prob just suck it and see TBH. Just thought I'd see if you knew.
The ICSP10 port on the programmer has pins called:- MOSI, MISO, RST, SCK, VTG and GND.
While the stab has DTR, Tx, Rx and GND.

Can I connect one to the other, or am I barking completely up the wrong tree?



Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #1 on: 13/12/2014, 08:22:01 AM »
Chris,

Ok, so let's establish what you have...

1) Do you an AVR ISP...? Typically a little USB dongle type board that ends in a 6 or 10 pin MISO / MOSI connector? These are commonly used to flash bootloaders etc into empty Atmel ATmega MCUs like Arduinos.

2) Does the target Orange board have have the ISP MISO / MOSI programming pin set available and marked? I ask beacuse I would believe that the "DTR, Tx, Rx and GND" are a standard seial port, not an ISP port.

My suggestion is as follows. If the ISP port is definately NOT broken out on the PCB (very unusual) then I would dab some very fine mod wire onto the ATmega pins, bring them out to some vero and put an ISP header on that.

Once I had the port working to flash the chip I would maybe epoxy it onto the board for future use, else it's a lot of work and only gets used once in anger.

What if they bring out some newer firmware in future?

BTW, I have one of these Orange stabilisers, and I've looked into flashing an open source firmware onto it. In the end I built my own stabiliser and wrote my own firmware. My homebrew unit has one major design improvement...

All the cheap Orange etc stabilisers keep their price down by only using 3-axis gyros. This means they can only sense instantaineous angular movement, but once they stop pitching, rolling or yawing the output stops. They're fine for taking wind buffeting out of your flight. They don't know what LEVEL is...

My system has a 3-axis accelerometer, which knows what level is. My system keeps correcting the control sufaces until it is level. Auto-recovery.

I literally have a PANIC button, on an AUX channel that once triggered should level the plane where ever it is.

Anyway, hope that helps, I might dig my Orange unit out and see if they have broken the ISP port out.

Cheers!

Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #2 on: 13/12/2014, 09:31:51 AM »
Chris,

I forgot to mention  in my first post.

I do have a USB Programmer as mentioned on the Open Source project site. It's a USBasp.

Also, the "overclipping" lead that is recommend is another way of getting the ISP connection:

http://www.hobbyking.com/hobbyking/store/__27195__Atmel_Atmega_Socket_Firmware_Flashing_Tool.html

Or we might have an overclip at work....

I will take a look at options...

Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #3 on: 14/12/2014, 12:58:24 PM »
Chris,

I have taken my Orange Stabilser apart...

Mine is a Version 2

PCB marked up as PO51_2 HEXTRONIK (Hobbyking, I think)

My PCB has a total of six pads, 3 top, 3 bottom which break out the ISP port, MOSI / MISO / SCK etc

Does the Open Source software work on a Version 2 board? I think so, as it's based on an Atmel ATmega 168PA MCU also...

The sensor is an Inversense ITG-3205 3 axis gyro. Datasheet here: http://www.invensense.com/mems/gyro/documents/PS-ITG-3200A.pdf

I will try to breakout the ISP port to a standard six pin header and see if I can get my USBasp to talk to it...

Jim
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #4 on: 14/12/2014, 07:26:40 PM »
Hi Jim

Yep I have one of these http://uk.farnell.com/olimex/avr-isp-mk2/programmer-usb-2-0-pdi-tpi-for/dp/2144332

Mine's a RX3S Ver 1 Stabiliser but the new firmware is for all versions I think.

This is the online manual that I'm looking at mostly. https://docs.google.com/document/d/1Wu7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7HSnXEutw/pub
What I'm particularly interested in, apart from the better features, is what appears to be an SBUS version, which I'm hoping means we'll need just a single cable from Rx to Stab. The builds are here https://github.com/noobee/FlightStab


This looks like something we could do at a club night. All the instructions talk about a USBasp, so if you have that and the overclipping lead- I don't need to get one :)
I won't have much time at all in the next week or so, but if I do I might try soldering to the MISO/MOSI etc on the 168PA.

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #5 on: 14/12/2014, 07:37:03 PM »
You know what, I just spotted this in the on line manual.



This shows an ISP header. I wonder...?

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #6 on: 14/12/2014, 07:51:15 PM »
OK, I completely missed this, these markings are not readable to (my) naked eye.


Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #7 on: 14/12/2014, 08:39:40 PM »
Last post on this, certainly tonight.

I've now come across a later on line manual with much more info - It even points out the ISP pins I needed to find, DOH!

https://docs.google.com/document/d/1UBKUB74xqSB0fVFe3MX-6d9QH1B4-LDRAf7nH9Qs1dY/pub#id.73y9lpaj10hi

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #8 on: 15/12/2014, 09:11:56 AM »
Chris,

This looks even better.

Here is the pinout for the USBasp programmer that I have:



Do these tally up, I'd be amazed if they didn't....
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #9 on: 15/12/2014, 10:33:51 AM »
That six pin one does match the writing on the PCB in my photo in post #6 above.
That is a shot of my PCB.

Of course my programmer only has a 10 pin ISP connector. (along with PDI and TPI 6 pins)
I just need to make an adapter for mine.

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #10 on: 15/12/2014, 11:41:58 AM »
Chris,

Yes! Sounds about right...

Most USBasp programmer come in 6 pin or 10 pin flavours, or both.

I have a little 10 to 6 pin adapter board that you are welcome to or knock up your own...

Please advise...
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #11 on: 15/12/2014, 11:49:53 AM »
Great thanks Jim

Just hang on to that for the time being. I think I have everything I need to knock one up.
If not, I will ask again.

Cheers
Chris

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #12 on: 15/12/2014, 01:02:11 PM »
Chris,

I have most of these kinds of components available.

Anything you're short of just ask, and we can meet at the field at the weekend (maybe with an aircraft or two?!) and sort it out...

I will put my USBasp and adapter in the car tonight...
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Jim (Chairman)

  • Administrator
  • Member
  • *
  • Posts: 263
  • Engineer & Adventurer
    • View Profile
    • Jim Mchughs Photo Gallery - now with less duplicates!
Re: One for Jim
« Reply #13 on: 15/12/2014, 06:33:35 PM »
Chris,

I've just found out my USBasp programmer and 6 pin adapter, and put them in my car.

Anytime you want them, just let me know.

One issue that may cause issues. Some boards are 3v3 only, and will not tolerate 5 volts. It's usually the sensor chip.

My programmer does NOT have a jumper to force 3v3 operation, it's only 5 volt.

Make sure you check that your board can be programmed at 5 volts before connecting, else you'll probably program the MCU OK but destroy the gyro chip in the process...

 :o
Building Winter 2015: Wiggo, Alliance (rebuild), Mini Whizzza (66% reduced plan), Foamie Spitfire (rebuild), SebArt Sukhoi SU-29 60E (rebuild)

Chairman

  • Administrator
  • Member
  • *
  • Posts: 133
    • View Profile
Re: One for Jim
« Reply #14 on: 17/12/2014, 09:06:08 AM »
Thanks Jim, useful warning.

I had spotted that on a thread somewhere, and my programmer does have a jumper for 3.3v. Just wish I had some time.
Ah well, I'll get round to it,

I'll try to get over with my bits on Sat and maybe I'll borrow that 6 pin adapter if it looks like it will do the job.

Don't count on me being there though.. Kitchen must be finished by Xmas.. you know what it's like.