|
|
|
|
|
|
|
|
Australia, VIC, Ringwood
Joined Feb 2008
2,085 Posts
|
D8R user telemetry
Thanks Trevor.
OK so using the programming lead for the user telemetry is working. I need to look further but it may be that the Vout Low on my inverter is not low enough to switch off the simple transistor S8050 translator (as shown in the Protocol Document 20100921121837352.pdf) in the receiver - probably close to 0.6V. The LS04 inverter I am using has a nominal output swing 0.5 - 2.5V so as Werner says any noise and ....... . A diode in the emitter leg of the transistor may help (FrSky?). Of course there is no problem if you have full RS232like +/- signals. I don't know what the receiver software does when it starts receiving corrupted user data as this will certainly result in USART framing errors. I think you are correct Trevor and the receiver code may just say "I am seeing just noise on the Rx pin" and disable the USART interrupts until the next power cycle. This may also be a reliability issue when driving from a micro using inverted USART signalling. I need to fix my analog scope as logic analysers don't tell the full story .My packet receiver is below. It is called every time a character is received. FrSkyRxPacketTag is FE FD etc.. In my case I am using the FD type to build up much larger packets which can be seen in the second routine below. On the D8R V2 the recever voltage reading (A1) seems to be scaled by 4. The second sensor input (A2) seems to be unscaled. The link quality is unscaled dB typically up around 80dB on the bench. Greg [PHP] void ParseFrSkyPacket(byte ch) { switch (FrSkyPacketRxState) { case WaitRxSentinel: if (ch == 0x7e) { FrSkyRxPacketTag = FrSkyPacketTag; FrSkyPacketRxState = WaitRxTag; } break; case WaitRxTag: if (ch != 0x7e) { FrSkyReceivedPacketTag = ch; FrSkyRxPacketByteCount = 0; FrSkyPacketRxState = WaitRxBody; } break; case WaitRxBody: if ( ((ch == 0x7d) || (ch == 0x7e)) && ( FrSkyRxPacketByteCount != 8 )) FrSkyPacketRxState = WaitRxESC; else { FrSkyPacket[FrSkyRxPacketByteCount++] = ch; if (FrSkyRxPacketByteCount == 9) { if (ch != 0x7e) RxFrSkyErrors++; else FrSkyPacketReceived = true; FrSkyPacketRxState = WaitRxSentinel; } } break; case WaitRxESC: ch ^= 0x20; FrSkyPacket[FrSkyRxPacketByteCount++] = ch; FrSkyPacketRxState = WaitRxBody; break; default: FrSkyPacketRxState = WaitRxSentinel; break; } } void ProcessFrSkyPacket() { short b, nb; double RxVolts; short LQ; FrSkyPacketReceived = false; switch ( FrSkyReceivedPacketTag ) { case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: break; case 0xf8: // Threshold request break; case 0xf9: // A2 Threshold break; case 0xfa: // A2 Threshold break; case 0xfb: // A1 Threshold break; case 0xfc: // A1 Threshold break; case 0xfd: // Data packet nb = FrSkyPacket[0]; for (b = 2; b < (nb + 2); b++) { ParsePacket(FrSkyPacket[b]); // another state machine for the UAVX packets! if (PacketReceived) ProcessPacket(); } break; case 0xfe: // A1, A2, link quality RxVolts = (FrSkyPacket[0] * 4.0 * 3.3) / 255.0; if ( RxVolts < 4.0 ) FrSkyA1.BackColor = System.Drawing.Color.Orange; else if ( RxVolts < 3.5 ) FrSkyA1.BackColor = System.Drawing.Color.Red; else FrSkyA1.BackColor = FrSkyBox.BackColor; FrSkyA1.Text = string.Format("{0:n1}", RxVolts ); FrSkyA2.Text = string.Format("{0:n1}", ((float)FrSkyPacket[1] * 10.0 * 3.3) / 255.0); LQ = FrSkyPacket[2]; if ( LQ < 80 ) FrSkyLQ.BackColor = System.Drawing.Color.Orange; else if ( LQ < 70 ) FrSkyLQ.BackColor = System.Drawing.Color.Red; else FrSkyLQ.BackColor = FrSkyBox.BackColor; FrSkyLQ.Text = string.Format("{0:n0}", LQ ); break; case 0xff: break; default: break; } } [/PHP] |
|
|
|||
|
|
Quote:
It can however be used as the basis of an inverter cct and if driven from a logic circuit D8 is not required. D8 is only there to protect the transistor from a negative swing from a fully specified RS232/V.24 input. I have just traced the signal on a V1 D8R. The following obserevations may be of interest: 1) The COM input does not copnnect directly to R14/R15. Instead it connects to R19(330R) which in turn connects to R14/R15. R19 does not seem to serve any useful purpose! 2) The RxD O/P from R13 connects to the RxD pin on the Programming port. The other end of R13 connecting to the Vcc pin on the programming port. I will have a look at one of my V2 D8R's next time I have a need to open it up. Quote:
Of course even if noise proves to be the root cause this does not excuse the lock up problem and FrSky will need to do something about this. Trevor |
||
|
|||
|
|
||
|
Australia, VIC, Ringwood
Joined Feb 2008
2,085 Posts
|
Quote:
Yes I agree that the diagram shows what is supposed to be in the Rx and is also a suggestion for adding outside the box to undo the "damage" so to speak. Unfortunately as drawn the transistor is not likely to be hard off. My suggestion was that FrSky put a diode on the emitter to give an external driver some chance of switching it off. I just reassembled one of my D8Rs I had open but could also try to trace what is actually there. I doubt if many of us would be putting a device with RS323 signaling on board an aircraft theses days. Much more likely to be driving it directly from some micro with direct "TTL" level signaling from a USART. It seems a pity to resort to a MAX232 or similar. Hopefully Eva or one of the FrSky people will spot this dialogue and respond .Cheers Greg |
|
|
||
|
|
|
|
|
Hi Trever, hi Greg
Today I have written a test program in order to send bytes with correct and wrong baud rate to the receiver Rx. Only the bytes with correct baud rate setup (9600 bps) are displayed correct on my dashboard. I have made the tests with approximately 10700 bps / 4300 bps. But if have not detected a lock up problem. The receiver still transmits the bytes (USER FRAME). Even I still receive the remote frame with my dashboard, diplaying the link quality. The transmission of the user data (0x7E, 0xFD) is event and time triggered. No reception on RX means no user frame will be send. I have tested my serial LiPo monitor using an old brushed DC-Motor with many EMI, but I have had never problems receiving the USER and REMOTE Voltage frame. Hope it will help you. Best regards Micha |
|
|
|
|
|
|
|
Hi Micha,
At the request of a number of users FrSky have produced a version of their Rx s/w that puts out a combined PPM signal on Channel8. This was released at the beginning of the month as fdd_rx_cppm_build110120.frk. Usually referred to as CPPM. This feature, previously made available on V8R7, is not useful to everyone. If you don't need it stick with V2. By asking the question I assume you are using V2 s/w in which case I would not expect you to see the lockup. Trevor |
|
|
|
|
|
|
Joined Mar 2008
116 Posts
|
Hallo Trevor,gke ,
I recommand for the inverter a simple transistor BC547 with two resistors 2,2 K ohm. That is easy and should work. Yesterday I tried to use my cppm Software with an updated V1 receiver and the signal was good ,but the quadrocopter Mega 8 unit detected only no Signal. Befor it worked with a flysky receiver with a combined PPM electronics. As next step I tried to generate a signal with PPM signal in a similar way to the flysky unit (with longer PPM pause) and then it worked. What I recognized the small voltage swing of the PPM signal and so I decided to test a level shifter 3.3 V >> 5 V and then it worked. The quadrocopter unit with an mega 8 has a 5 V powersupply. With my RS232 hub ,similar build as Snoopy Schulz showed it ,I have had only problems by bad decoupling of the pic processor. Then i noticed the same problem you have ,the data stream locked even if the pic sends data. I have the problem i can only see it on the scope ,but in that case i can not see if they are correct. With better decoupling i had no locks anymore. best regards Werner |
|
|
|
|
||
|
Australia, VIC, Ringwood
Joined Feb 2008
2,085 Posts
|
Quote:
I think if the external transistor has a sufficently low VCE when off it is OK. As you said any noise coupled intothe ground line giving ground bounce will stop the internal transistor from cutting off properly and the receiver software will probably ignore the Rx input from then on. The VCE of a saturated BC547 must be just low enough to most of the time to work. The specs show 0.2V typical and 0.6V max so if you get a BC547 close to typical it will work but not with much margin. I think FrSky needs to rethink the internal translator to make it more reliable for unipolar signalling. As I said a diode should give us another 0.6V of noise margin. Cheers Greg |
|
|
||
|
|
|
|
Romania, Dolj, Craiova
Joined Sep 2007
12,360 Posts
|
What about an external diode connected in series with the transistor base (serial input) ? Should give you the same results...
|
|
Latest blog entry: JRSky - birth of a dream radio
|
|
|
|
||
|
Australia, VIC, Ringwood
Joined Feb 2008
2,085 Posts
|
Quote:
If the diode is in the base then you will still need 1.2V to turn on the transistor but when you take the input diode down to 0.6 or thereabouts from your signal source then the base voltage is .... ? The classic TTL circuit solves the problem another way: http://en.wikipedia.org/wiki/Transis...ental_TTL_gate If we were driving the Rx pin with a true RS232C signal as FrSky expect then there would be no problem at all. It is just that we are trying use unipolar signals with a logic low not quite low enough .Greg |
|
|
|
||
|
|
Quote:
Adding a diode shifts the switching threshold but does not change the noise immunity. While changing the threshold may help a little we really need some hysterisis e.g. a Schmitt trigger. I need to carry out some tests, too much speculation at present, but I favour using the either a 2N7002 (to shift the threshold) or going into the processor i/p directly and using the Schmitt trigger that is already there. Trevor |
|
|
||
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mini-Review FrSky 2.4ghz - looking good so far! | BrumBob | Radios | 10998 | May 22, 2013 11:48 AM |
| Discussion New Audio Modem Protocol For FPV Telemetry | MelihK | Video Piloting (FPV/RPV) | 138 | Dec 31, 2011 09:24 AM |
| New Product FrSky 2.4GHz radio system | jonathan-FrSky | Australia | 70 | Apr 28, 2011 04:22 PM |
| Cool TWIN 2.4GHz new RFHSS system from CZ, with or w/o Telemetry | alex.guzun | Radios | 5 | Jan 18, 2010 02:24 PM |
| Mini-Review The video for FrSky 2.4Ghz | Chase Wu | Radios | 0 | Dec 16, 2009 01:18 AM |