Jump to content


Photo

ER9X Hacks

FlySky/Turnigy - FrSky

  • Please log in to reply
121 replies to this topic

#41 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 06 March 2012 - 12:32 AM

There's just the baro sensor and a 3.3V Vreg on the PCB. Doesn't even look like there's a level converter for the communication pins.

When you get to the telementry page on ER9X (by scrolling on the home page, or from r742 on directly with [LONG DOWN]), you can cycle between the basic screen, hub screen (with baro altitude), and GPS screen with [LEFT] [RIGHT]. These pages only appear if a hub is connected to the RX and ER9x sees hub-type frames coming in.

#42 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 06 March 2012 - 08:06 AM

These pages only appear if a hub is connected to the RX and ER9x sees hub-type frames coming in.

Thanks for the explanation.
- Thomas

#43 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 08 March 2012 - 05:37 PM

I finally got around to performing the FrSky failsafe setup and I'm not having any success. I hold the Tx sticks at the positions I want during Failsafe, press the little button on the Rx for 1-sec, and nothing happens. I'm suppose to hear a beep at the Tx. When I turn off the Tx the model does the default Failsafe "hold" instead of observing the failsafe pre-set position that I need. So I could use a bit of advice on how to make the failsafe feature work.

Edit/Update: I spent more time with it and after several attempts the Tx finally responded (with a beep) upon a Rx button push. Now the failsafe works. Then I tried again and it appears that setting the failsafe pre-sets is very intermittent. It ignores the button press 99% of the time.

Not sure what is going on. Might be a bad push switch on the Rx, so tomorrow when I have more time I'll try my other FrSky rx. But I won't be surprised if it turns out I am doing it wrong.

Edited by Mr.RC-Cam, 08 March 2012 - 10:48 PM.
Got it to work.

- Thomas

#44 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 09 March 2012 - 09:54 AM

Hmm I haven't tried setting failsafe yet.

I've however read there are 2 firmware "sets" (for TX and RX), the first one (normally stock) that sets failsafe like described in the manual with a press on the receiver's button, while the other set uses the TX's button. Of course the matching set bust be installed on both ends.

I'll have a try with my stuff...

#45 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 09 March 2012 - 10:45 AM

Hmm I just tried and had trouble at the start as well, however once I got it (looked like kind of a "burn-in"??? or it was me...) it seemed to work all the time on 5 receivers and 3 TX modules I have here on the table. The manual actually says "less than 1 second", and it seems all it takes is just a very short press.

Edited by Kilrah, 09 March 2012 - 10:45 AM.


#46 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 09 March 2012 - 10:59 AM

Thanks for checking. You must have the magic touch. Later today I will try again.

BTW, it is interesting that you mention there is another firmware version that involves pressing the Tx button instead of the Rx button. While I was struggling with getting it to work, I recall I did press the Tx button a couple times along the way -- maybe that is the reason I got it to work (without understanding why).
- Thomas

#47 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 09 March 2012 - 11:06 AM

Also, note that it seems only the "large" RXs (D8R***) do the beep on the TX. I have some D6FRs and D4FRs, and those rather blink the green LED on the RX twice.

#48 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 09 March 2012 - 12:07 PM

I have no explanation, but I did exactly the same button pressing today and everything worked perfectly. Go figure.

Also, note that it seems only the "large" RXs (D8R***) do the beep on the TX. I have some D6FRs and D4FRs, and those rather blink the green LED on the RX twice.


All the tests yesterday were with the 8-CH. Today I tried the 4-CH. They both work as you describe. Thanks for the help!
- Thomas

#49 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 09 March 2012 - 12:13 PM

Cool :)

Pretty much unrelated, but I checked my 3 modules on the SA. My DHT outputs ~20mW, my DJT about 35mW, and my DHT-U 65mW. That's some quite serious sample variation...

#50 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 09 March 2012 - 12:20 PM

My DHT outputs ~20mW, my DJT about 35mW, and my DHT-U 65mW. That's some quite serious sample variation...

That is a bit unusual. If you are measuring it from the SMA connector cable that each Tx module provided, maybe the cable itself is the problem. Especially if they are slightly different in length or the factory used different coax cable brands. Perhaps a good test would be to move the cable on the 65mW Tx to the 20mW Tx and measure again. However, if you measured at the U.FL connector then the issue is in the RF circuitry for sure.
- Thomas

#51 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 09 March 2012 - 12:49 PM

I measured all 3 at the SMA connector with their own pigtail installed. Your remark makes sense, even if 3-5dB sound like a lot of difference for a little pigtail to me... I'll try that when I have time.

#52 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 12 March 2012 - 04:12 PM

Then I've tackled the GPS, I didn't want to buy the FrSky unit as I already have tons of modules in my drawers, but obviously that involved finding out what the sensor hub was happy with. Found out with some help that it wants 9600,N,8,1, default NMEA sentences are fine, 1 or 2 Hz. Data is transmitted at 1Hz, but it seems setting 2Hz helps truly getting 1Hz downlink (input and output both at 1Hz but unsynchronised = gaps sometimes).


I purchased the Frsky hub and GPS. The uBlox GPS they use defaults to 9600 baud / 1 Hz. But during power-up the hub reconfigures the GPS to a much faster update (perhaps about 5Hz, but that is just a guess).
- Thomas

#53 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 14 March 2012 - 11:00 PM

I decided to go forward with the DiY FrSky GPS-hub using a PIC. I've got a crude working prototype at this point, but the GPS parsing engine needs more work. My biggest issue at the moment is a bit silly -- I can't get a GPS satellite fix while indoors. Working outside in the rain is a bit of a problem. It's the simple things that slow down projects like these.

So I'm on the hunt for a work-around. Despite my distrust of "free" software, I've downloaded two different GPS simulators. The Skylabs GPS demo app was a total bust (would not recognize any com ports on my WIN7 PC). Another one named SatGen was initially helpful, but is buggy and does not provide RMC sentences. So, does anyone know of a good/reliable/trojan-free NEMA simulator that can provide RMC and GGA sentences? I don't want to have to buy it, so hopefully there is something out there that is a freebee.

EDIT/Update: It just dawned on me that my old Garmin Handheld GPS has a NEMA simulator mode. I used it several years ago during a prior GPS project. So I will dig it out of storage and put it to work. With luck, I expect to have more DiY FrSky GPS-Hub progress in the next couple days.

Edited by Mr.RC-Cam, 15 March 2012 - 09:41 AM.
Update

- Thomas

#54 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 15 March 2012 - 10:46 AM

Well, my solution back during development of the IFOSD was plain and simple... I recorded a few minutes of NMEA into a plain text file, then played that back to the serial port with Hyperterminal, with a line delay to slow it down...

Other than that, great news about the PIC job :)

Edited by Kilrah, 15 March 2012 - 10:47 AM.


#55 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 15 March 2012 - 11:54 AM

Well, my solution back during development of the IFOSD was plain and simple... I recorded a few minutes of NMEA into a plain text file, then played that back to the serial port with Hyperterminal, with a line delay to slow it down...


Good idea. I'll use the Garmin's demo mode as a data source and capture an hour's worth of NEMA sentences. Then I'll use your Hyperterm method and play back the file to the Hub so I can work on the GPS parsing code. The reason for doing it this way is because the Garmin eats batteries at a fast rate and using the data from a file eliminates the dead battery issues while I debug.
- Thomas

#56 Kilrah

Kilrah

    RC-Cam Mentor

  • Trusted Member
  • PipPipPipPipPip
  • 2,079 posts
  • Location:Switzerland
  • Interests:Modelling, electronics, computers

Posted 15 March 2012 - 02:42 PM

With tracker, Spektrum and everything working fine my FPV Sbach UMX is getting closer :)

Closer than expected actually, found a wide lens I could use with the camera...



#57 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 15 March 2012 - 09:47 PM

Fantastic video!
- Thomas

#58 pseddon

pseddon

    RC-Cam'er

  • Trusted Member
  • PipPip
  • 60 posts

Posted 16 March 2012 - 02:47 AM

Paul B Mather (Happykillmore) wrote an easy to use GPS emulator as part of his GCS for the Ardupilot series of products. Try DIYDrones.com.

Peter

#59 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 16 March 2012 - 07:20 AM

Thanks for the DIYDrones/Happykillmore emulator tip.
- Thomas

#60 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,684 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 17 March 2012 - 12:01 PM

Good news, the DiY FrSky GPS hub prototype is fully working. I need to do some code clean up and then determine which PIC chip to port it to. Unfortunately it wont be a 8-Pin chip, but there's some 14 pin choices I can use. Currently I have it running on a 18 pin part (because it is the smallest PIC chip my compiler can support that has a ICD debugger feature in it).

I mapped the GPS's Fix Status and Satellite count into the FrtSky's Temperature2 and Fuel Level registers. So now GPS signal status/quality can be seen on the R/C transmitter's telemetry display screen. I have also increased the update rate to the GPS data. I can do more tricks like this, but I can't think of anything else that should be included. Any wish list items I should consider?

There's a tremendous amount of flexibility in the way the Hub can be implemented. For example, there is room in the FrSky 8-ch Rx to install the Hub chip inside the case. Power would come from the Rx's 3.3V Vreg to eliminate an external Vreg. Or it could be installed on the GPS and steal power from the GPS module's Vreg. Or make it standalone (but it will need 3.3V power).

I'm not too keen on a sloppy dead-bug wired chip and would prefer using a PCB. But if I go to the expense of doing that, I would probably add the baro sensor too. And perhaps some other features. With luck, it could all still fit in the 8-Ch Rx's case.

Kilrah, I know what you had in mind (basic 8-pin chip, a few hand soldered wires, GPS module, and that's it). We have similar needs, but I want it to have a bit more functionality. Especially since the added features are nearly free, so to speak. Do you have any thoughts about this? Is there any interest in a custom PCB?

If there is any further interest in the project then I will spin it off into a dedicated thread. Otherwise, this will just be another one of my many projects that earns a check mark on my DiY bucket list. :)
- Thomas