ࡱ> ~Y QAbjbjWW ==Q=]       44444 @44:2444=q $      244    2l2  2t @| Js44B2Glitch Counter Circuit Introduction This article describes a small, lightweight diagnostic unit designed to monitor the servo control signal supplied by an R/C receiver. It is intended that, in the event of erratic model behaviour, the unit be installed in the model and connected to the servo channel suspected of giving trouble. The unit will continuously monitor the servo control signal measuring the four important waveform parameters and log any failures detected. The number of failures, up to 99 for each parameter, are sequentially displayed on a 7 segment LED display on a continuous 'round robin' basis. When 'armed' the unit performs an initial validation of the incoming servo control signal and then executes an automatic self-calibration based on the various control signal parameters. Once calibrated the unit enters its normal operating mode continuously checking for the following four parameters:- a. Servo control pulse too narrow. b. Servo control pulse too wide. c. Erratic frame rate. d. Missing frames. It thus provides a more comprehensive range of operational and monitoring facilities than any of the similar commercial devices known to the author and also has the advantage of being able to monitor the signal of an R/C channel that is actually in use .. something that the other units cannot do and is refered to as 'In-Line' mode. Consisting, as it does, of a single IC, an LED display and a handful of other components it is both easy to build and, requiring no manual calibration, easy to use. Description At the heart of the circuit is a small microprocessor from the popular PIC range; the PIC16C52. It continuously measures the servo control signal parameters listed above and increments an internal 'Parameter Error Counter' for each occasion that a failure is detected. Each of the four 'Parameter Error Counters' can accumulate and display up to 99 error events (any more than this is displayed as an 'over-range') with the current value of each of the counters being displayed in a timed sequence. An R/C system consists of one or more channels each with its own variable width servo control pulse. The transmitter repeatedly sends the control pulses, from each of the channels in succession, to form a 'Multi Channel Frame' or MCF. After the last channel has been sent a 'dead zone' is entered during which no useful information is sent. The start of the next MCF is signified by the rising edge of the servo control pulse corresponding to the first channel. The receiver separates the MCF into a number of single channel frames, or SCF, for driving the servos. The unit looks for four types of SCF and/or servo control pulse error as described below:- Type 1. The positive going servo control pulse is too narrow. To be considered valid the control pulse must be at least 740uS wide and any pulse, or glitch, wider than 6uS is guaranteed to be detected. Type 2. The positive going servo control pulse is too wide. To be considered valid the control pulse must meet the minimum width criterion and also be less than 2250uS wide. Type 3. The measured Pulse Repitition Frequency or PRF of two successive frames differs by more than an acceptable amount. To be considered valid an SCF must start within 1mS of its expected time based on the recent past history of the incoming waveform. Type 4. A Missing Frame was detected. The servo control pulse did not occur before an internal time-out expired. The unit re-synchronises itself to the incoming waveform as soon as servo control pulses are re-established. Typical causes of all the above failures is interference caused by other R/C transmitters operating on the same (or nearby) channels, any other non R/C transmitter causing interference in the R/C bands or, particularly in the case of a Type 4 failure, the model going out of range. Theory of Operation Pressing the ARM button resets all four of the internal 'Parameter Error Counters' to zero and initiates the 'self-calibration' sequence. During calibration, which may last up to 8 seconds if an input signal is not detected, the letter 'C' is displayed and the procedure starts by assessing the incoming servo control signal and measuring its PRF. Should the calibration sequence fail a descriptive character replaces the displayed 'C' with any one of the following four reasons being classed as a failure:- a. There is no signal present and the input line is 'stuck' at a logic 0. This type of failure is denoted by the display of the character 'L'. b. The input line is either stuck at a logic 1 or is high for an unacceptably long time. This type of failure is denoted by the display of the character 'H'. c. The input signal is pulsing but the PRF is too fast, ie less than 8mS. This type of failure is denoted by the display of the character 'F'. d. The input signal is pulsing but the PRF is too slow, ie more than 32mS. This type of failure is denoted by the display of the character 'S'. If the incoming waveform is basically satisfactory the unit measures the PRF of a number of cycles and calculates a mean value for the PRF. It then uses this mean PRF value to compare with the PRF of a further number of incoming cycles. If the PRF of any of these tested cycles differs from the calculated mean PRF by more than 1mS an error is deemed to have occured and the letter 'E' is displayed. Pressing the ARM button again will restart the calibration sequence. After a satisfactory self-calibration the unit begins to display the values stored in the internal 'Parameter Error Counters' with each of the values being displayed as a two digit sequence with the 'tens' being presented first followed by the 'units'. Thus an error count of 12 would be shown as a '1' followed by a '2'. A short duration 'blank' separates each of the 4 displayed values and each complete sequence is separated from the next by a long duration 'blank'. For a typical incoming PRF of 20mS the complete set of error values is displayed in a 10 second cycle. The largest error count that can be displayed using a two digit sequence is 99 and any error counter holding a value greater than this displays as an 'o' followed by an 'r' denoting an over-range. Most R/C control systems operate on the principle of a constant PRF with a variable pulse width, usually between about 1mS and 2mS, containing the information regarding the desired servo position. However there are systems in which the 'dead-time' (the time in the cycle where no servo position information is present) is constant and so, as the sticks are moved and hence the pulse widths change, the PRF changes. The unit handles this type of R/C system by continually assessing the PRF of the incoming signal and adjusting its calculated mean PRF value as necessary and so can, in this way, always predict when to expect the start of the next servo control pulse. The permitted time difference between the expected arrival of the incoming pulse and its actual arrival is 1mS which is enough to cope with all normal multi-stick movements. However, and only on this latter type of system, should two or more switched channels be operated simultaneously, a very unlikely occurence, with each lengthening (or shortening) their respective pulses it is possible that the PRF will change by more than 1mS on two successive cycles. This will be detected and displayed as a single occurence of a 'Type 3' error. Display Sequence The following table shows the sequence used to display the internal 'Parameter Error Counter' values. The times given are for a typical R/C system with a 20mS PRF. For R/C systems with different frame rates the durations must be correspondingly adjusted. Displayed ParameterDurationServo Pulse Narrow (Tens)0.5 secondServo Pulse Narrow (Units)0.5 secondDisplay Blank (Short)1.0 secondServo Pulse Wide (Tens)0.5 secondServo Pulse Wide (Units)0.5 secondDisplay Blank (Short)1.0 secondErratic Frame (Tens)0.5 secondErratic Frame (Units)0.5 secondDisplay Blank (Short)1.0 secondMissing Frame (Tens)0.5 secondMissing Frame (Units)0.5 secondDisplay Blank (Long)3.0 seconds Note that even in the absence of an input signal the unit will continue to display the current error counter values albeit that the complete sequence takes rather longer. However as the lack of an input signal is recognised by the unit as 'Missing Frames' the Missing Frame error count will very quickly reach over-range. The other parameters will be displayed normally. Graphical Description of Error Types The following figures show typical servo control waveforms giving examples of the various failures. Failure Types 1 and 2 The following figure shows the range of acceptable servo control pulse widths. Should a pulse be detected that is less than 740uS the 'Short Pulse' error counter will increment or if more than 2250uS wide the 'Long Pulse' error counter will be incremented. EMBED MSDraw \* mergeformat Failure Type 3 The following figure shows the Expected Arrival Time (E.A.T.) based on calculations performed on the PRF of recently received frames. The dotted lines denote the limits 'window'. Any pulse arriving outside the limits will be detected and increment the 'Erratic Frame' error counter. EMBED MSDraw \* mergeformat Failure Type 4 The following figure shows how a Missing Frame is detected. The servo control pulse does not arrive at the expected time which starts an internal timer. If no pulse arrives before the expiry of the timer it is considered that a frame was missing and the 'Missing Frame' error counter is incremented. Should a pulse arrive before the internal timer times out the failure will be classified as a Type 3. EMBED MSDraw \* mergeformat Assembly Assembling the parts onto the PCB is straightforward. However the following components must be inserted in the correct orientation and the following notes may help: U1 This component is a CMOS device and should be treated accordingly. It will have a semi-circular 'notch' in the end that marks pin 1. The IC should be inserted such that Pin 1 connects with the 'square' pad. U2 With the PCB orientated such that this component fits in the top-right hand corner fit U2 such that the decimal point is in the bottom-right corner of the display. RNx The three resistor networks also require to be fitted in the correct orientation. They will all have a 'dot' marked on their bodies denoting pin 1. Fit RN1 and RN2 such that pin 1 connects with the square pad. RN3 should be fitted such that pin 1 is toward J2 and J3. SW1 This component is intended to be recessed below the front panel of the enclosure in order to prevent accidental operation. Its optimum height may be obtained by varying the amount the leads are pushed through the PCB prior to soldering. NOTE: the circuit diagram shows only two connections to the switch but all four leads must be soldered, both for mechanical strength and, more importantly, because the unused switch terminals are used as part of the circuit continuity. J2/J3 These two 'connectors' are not fitted. Connection to only one of these 'connectors' is required if 'In-Line' mode operation is not envisaged. For use in In-Line mode a suitable servo extension lead must be cut in two and the free ends of each half stripped and tinned prior to soldering through the PCB. Both these leads are termed the 'Signal Input' leads. J1 This 'connector' is also not fitted but wired as for J2/J3 above if required..see the section headed 'Future Capability' below. Initial Power-Up and Checking Having carefully checked that all the components are correctly located, orientated and soldered, and in particular the flying leads, the assembled unit may be tested. NOTE: There is no reversed polarity protection provided and connecting the unit with the wrong polarity will probably destroy it. The testing procedure is very simple as no manual calibration is required. The following procedure will check that the unit is functioning and, provided the 8 second calibration period is correct, demonstrates that the internal timers are operating correctly thus ensuring all measurements of the incoming waveform will be made correctly:- 1. Connect the unit to a receiver using the input lead and power up the receiver. 2. With the transmitter switched OFF press the ARM button. The letter 'C' should appear on the display and remain there for 8 seconds followed by the letter 'L'. This occurs because, with the transmitter switched off, the receiver does not output any servo control pulses. Note however that receivers fitted with Fail-Safes do output a servo control pulse in the absence of a transmitter. In this case you will need to power the unit without connecting the servo signal lead (often the white one). Reconnect the servo signal lead once this test has been performed. 3. Switch the transmitter ON and press the ARM button again. Once again the letter 'C' will be displayed and, provided the calibration succeeds, it will be followed by a series of '0's displaying the contents of the 4 'Parameter Error Counters'. 4. Watch the display for a while and check that the display sequence repeats every 10 seconds or so. 5. Switch off the transmitter for a very brief period and then on again. For those without Fail-Safes the 'Missing Frame' error counter should now display a number above zero. The actual count will depend on how quick you were with the on/off switch. Note that you may see error counts greater than zero displayed for the other parameters. This is because as the transmitter powers down and up again its output may be undefined..this is quite normal and not a problem with the unit. 6. Take a note of the error count values and then move all the sticks to each of their extremes and check that none of the error count values change. 7. With the transmitter on press the ARM button again and check the the calibration sequence is performed satisfactorily. Leave the system like this for a while, say 10 minutes, and check that after this time all error count values are zero. If they are not you may need to investigate a possible Tx/Rx problem! This completes the testing procedure. Future Capability This project is the first of a long term series of electronics projects to have a 'download' capability built into their software. As described above the Glitch Counter software maintains four 'Parameter Error Counters', whose values are displayed locally using the 7 segment LED display, but these values may also be extracted from the unit using a simple cable connected to J1. A future project is planned that will allow the values to be downloaded to an IBM, or compatible, PC using a simple interface that plugs into the parallel port. It is intended that J1 be connected to a small jack socket, or similar, suitably mounted on the model such that a PC, fitted with the interface and running the custom software to be described, may be used to download and display the contents of the four 'Parameter Error Counters'. Wiring into the System The simplest connection of the Glitch Counter to the models Receiver/Servo system is to connect the appropriate Signal Input lead to an otherwise unused receiver output. The other Signal Input lead, if fitted, is left with no connection but should be placed so as to prevent a possible short circuit if it has protruding male connections. As stated in the introduction the unit may be used in In-Line mode to monitor a servo channel that is actually in use. To use the unit in this way disconnect the servo lead from the receiver and connect it to the appropriate Glitch Counter input lead and connect the other input lead to the appropriate receiver output. !"%%&&&&&&&&((7(8(9(:(<(J())))))QA j5Uj%UVmH j;"UjUVmH jtUjUVmH jU5$gQ  +PX $ $r $$$0 3 ]$**+(,8-/01"111L2M2335)677g995;[;\;n;>>>@PAQA$ 3R') !!""")"4"5"P"["\"r"!$$l40M $$$$  $ $r"}"~""""""""""" # # #+#,#B#M#N#c#n#o###!$$l40M $$######'%(%N%%%%&&&&&((;(<(K())8$$$$!$$l40M )** **+(,8-/01"111L2M2335)677g995;$ $8 8 $8 8$$85;[;\;n;>>>@PAQA$ S $ $ . A!"#n$n%tMSDraw Y!.  Z&MrEdMicrosoft DrawZ&MrEd*X  System=&U~ W+3O2&MrEdX X   - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd%- & MrEd% @ & MrEd% - & MrEd% & MrEd% & MrEd%@ & MrEd%@@- & MrEd%@@.1Courier NewA- 2 W740uS & MrEd% P & MrEd%P & MrEd%PP & MrEd%P  & MrEd%P & MrEd%PP & MrEd% & MrEd% & MrEd% & MrEd%@p & MrEd%@p & MrEd%@ 2 2250uS & MrEd% @ & MrEd%  & MrEd% @ 2 p@ 20mS typical & MrEd%p & MrEd%p@ & MrEd%"System--''/x@ & MrEd METAFILEPICTY!Y!. V Z&MrEdMicrosoft DrawZ&MrEd*X  System=&U~ W+3O2&MrEdX X   - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd%- & MrEd% @ & MrEd% - & MrEd% & MrEd% & MrEd%@ & MrEd%@@- & MrEd%@@.1Courier NewA- 2 W740uS & MrEd% P & MrEd%P & MrEd%PP & MrEd%P  & MrEd%P & MrEd%PP & MrEd% & MrEd% & MrEd% & MrEd%@p & MrEd%@p & MrEd%@ 2 2250uS & MrEd% @ & MrEd%  & MrEd% @ 2 p@ 20mS typical & MrEd%p & MrEd%p@ & MrEd%"System--''/xSDdW<  C A2.so`GzRM`!.so`GzRMX(.ex=Q{o张6"xQV4䂕!q\#kyݖ"ib"hfA--{rd;ۙٙ7)Xп4u`.„.G/Vav_‡}p<<o/pUKf V QUh;pomr2<=u%|w֓:f 48Unk<0;SSO;5߂cYzc-[*bRb/Ve7;>'VcO*4S[:P͘qgb쀎P(oXCa:gHԗ:$EXn>;~~ zeӌ`/ui) CT"UÌ(׋PE(YdsޏDPSErV~+Z.TaRUB3]q^lUn4Aj=%2YsQ=rB4= ULh>sNY(>_tMSDraw #3  lZ&MrEdMicrosoft DrawZ&MrEdhzX  System=&U~ W+3O2&MrEdXrH X P  - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd%- & MrEd% @ & MrEd% - & MrEd% & MrEd%@ & MrEd%@@- & MrEd%@@ .1Courier New- 2 d E.A.T. + 1mS & MrEd% @P & MrEd%@P & MrEd%P@P & MrEd%P0  & MrEd%P0 & MrEd%PP & MrEd% @2 Expected Arrival Time & MrEd%p & MrEd%p@ & MrEd%- & MrEd% 2 Z E.A.T. - 1mS"System--''awZ&MrEd* METAFILEPICT##3 1 lZ&MrEdMicrosoft DrawZ&MrEdhzX  System=&U~ W+3O2&MrEdXrH X P  - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd% & MrEd%- & MrEd% @ & MrEd% - & MrEd% & MrEd%@ & MrEd%@@- & MrEd%@@ .1Courier New- 2 d E.A.T. + 1mS & MrEd% @P & MrEd%@P & MrEd%P@P & MrEd%P0  & MrEd%P0 & MrEd%PP & MrEd% @2 Expected Arrival Time & MrEd%p & MrEd%p@ & MrEd%- & MrEd% 2 Z E.A.T. - 1mS"System--''& MrEd%PJDdB<  C A2YCWϰ1 "`!YCWϰ1 XrH=2W\xUkAfvfo\D0.9L z`=H#!Y Ө,vV^-W V,? -{3ppvg} LޞGl9.aHMzZݝzc'mv[ ̾;{|O|$K@fnl,nzel<$MX^-W?Y~w±~,*3F N^ҕƙf8ip[k#Yʲ&/l==u!MI6J3RY#}!z`x~IdeȞG4+^N}2*7(8Q…b@.#zȈB11(^hۜΨT9b=?R3e1.:N+wDB3H1",߲o?bt Wn$$x) gIN类_QV٬DKJsc2kH)m5}Qv ]k4(#^.ӱ71"?էdFkixm6#Gm= MR֮z>2zzvEmwW9%gǫڣ O/kU*+܌DtMSDraw E+) Z&MrEdMicrosoft DrawZ&MrEdXpCourier NewU~ W+3O2&MrEdX( h X p   - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd%  & MrEd%p`- & MrEd% @- & MrEd%  - & MrEd% 0 & MrEd% 0` & MrEd%p0 0 & MrEd% 0P & MrEd% 0P` & MrEd% 00 & MrEd%   @.1Courier New+-2  Exp. Arr. Time & MrEd%  & MrEd% @ & MrEd%` - & MrEd%- & MrEd% p `- & MrEd% - & MrEd% p `2 0Internal Timebase 32mS- & MrEd%   & MrEd%  2 PMissing Frame Detected Here- & MrEd%  @ & MrEd%p  & MrEd%  & MrEd% "System--''S METAFILEPICTE+E+)nP Z&MrEdMicrosoft DrawZ&MrEdXpCourier NewU~ W+3O2&MrEdX( h X p   - & MrEd%` & MrEd% & MrEd% & MrEd% & MrEd%  & MrEd%p`- & MrEd% @- & MrEd%  - & MrEd% 0 & MrEd% 0` & MrEd%p0 0 & MrEd% 0P & MrEd% 0P` & MrEd% 00 & MrEd%   @.1Courier New+-2  Exp. Arr. Time & MrEd%  & MrEd% @ & MrEd%` - & MrEd%- & MrEd% p `- & MrEd% - & MrEd% p `2 0Internal Timebase 32mS- & MrEd%   & MrEd%  2 PMissing Frame Detected Here- & MrEd%  @ & MrEd%p  & MrEd%  & MrEd% "System--''MS Sans Serif|_D*"nDd<  C A2]Y8S{Pv򑮫=6`!]Y8S{Pv򑮫X( h<QxUkA~kVT*([CP)k$&R^yij'x'{٠20|o0/x cE#moBw=7 юs8+Z$ZFTRK!Ṙ[q9o><|W$LlZcIhD,v 3Ȍx [H| HNrhl k%;eǘq(O!:`yga`)-PTXR' ĈP1WDB[WR{'{ԙL2 LX|3 O,iAɛ"Я;P_:%oG‰P$Te|09oݘ r!T2*q\-Xo1¸r U**T]D;|w泄 E}=Ý;/B-i_-IbZ uoͮRɳmLn<5z]L/^/ןP)u/wyn>зF-3{=?1p#/]\}9GO,]a<%;قv_u{dʢޙ׻lvjs [4@4NormalCJOJQJkHmH @`@ Heading 1 @&5>*CJOJQJ>`> Heading 2 x@&5CJOJQJ<A@<Default Paragraph Font=QA@ r"#)5;QAACDEFGQAB"""$7$9$%%%=:::3: # z km ((+(,,&555A6D6&7(7S= ST 2 N ELiS\/8$$%%'',(/(K)e),,k.q.///55555=6D677S=Martin J Barratt!F:\MPLABPRJ\GCounter\GCOUNTER.DOC@HP OfficeJet Pro 1150CLPT1:HPMDJCXCHP OfficeJet Pro 1150CHP OfficeJet Pro 1150C7 d,,HP OfficeJet Pro 1150CLPT1 ,,HP OfficeJet Pro 1150C7 d,,HP OfficeJet Pro 1150CLPT1 ,,++++Q=P@GTimes New Roman5Symbol3& Arial"CV hm|k3#&2 0="V 20^GRadio Control Glitch CounterMartin J BarrattMartin J BarrattOh+'0 $0 L X d p|Radio Control Glitch CounterMiadiMartin J Barratttchart Normal.dotrMartin J Barratttch153Microsoft Word 8.0h@n@s䠼@ѵWa@j Cs2 0՜.+,D՜.+,\ hp  Omega Electrotek Ltdl=^Gj Radio Control Glitch Counter Title 6> _PID_GUIDAN{38BD40C1-DFB4-11D2-AB12-444553540000}  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHJKLMNOPQRSTUVWXYZ[\]^_`abcdeghijklmopqrstuwxyz{|}Root Entry F5*s@| JsData Ig91TablefWordDocumentSummaryInformation(nDocumentSummaryInformation8vCompObjjObjectPool@| Js@| Js  FMicrosoft Word Document MSWordDocWord.Document.89q