一番最初に実用化したAVR回路です。これは水上機などに使用しているものです。ただ単にマイコンのピン7に入力されたR/Cプロポ信号を変換してピン6からPWM出力しているだけです。ちなみに私のSANWAのプロポの出力は約20m秒毎に1200(Low)から1800(High)μ秒幅のパルスが出ていました。これのパルス幅を外部割込みで計測して、PWMのデューティーに変換しています。

  • マイコンはAVR Tiny15を使用。8ピンでA/Dコンバータも付いてとても高機能です。このような用途にはぴったっりです。
  • 5Vの電源(IC2)はオートカットオフ電圧をできるだけ低くしたいので低ドロップレギュレータを使用。
  • 出力MOSFET(Q1)は私の定番IRFZ44です。400クラスのモーターには十分すぎます。飛行後に触ってもかすかに暖かくなって入るぐらいです。この石20年ほど前に買ったものがまだ手持ちにあったんですが、今でも現役で売っています。
  • ブレーキ用のP-channel MOSFET Q3はQ2でレベル変換して駆動します。ブレーキがかかってモーターが止まるまでの間しか電流が流れないのでQ1に比べて小さい物でOKです。(モーターグライダー用)
  • パワー用のMOSFETには通常保護ダイオードが組み込まれています。ブレーキ不要でQ3を付けないときはQ3の位置に還流ダイオードが必要になります。400クラスの場合3Aもあれば十分でしょう。
  • ピン3はオートカットオフ用のA/Dコンバータ入力です。
  • スイッチS1はキャリブレーションとブレーキ使用、不使用の切り替え。

This is the first circuit I developed with AVR and used for my R/C planes as Float Plane. It converts the R/C servo signal input to pin 7 to PWM signal output to pin 6. The servo signal from my radio set (SANWA) was measured as pulse width with 1200 (low) to 1800 (high) microsecond every 20 m sec. The pulse width is measured by external interruption function and converted to PWM duty ratio.

  • The microcontroller I used is AVR Tiny15. It is in 8 pin package with A/D converters, etc and ideal for this kind of application.
  • 5V power supply (IC2) is a low-drop type voltage regulator since I want to make auto cut off voltage as low as possible.
  • Output MOSFET is my favourite IRFZ44. It has plenty of margins to drive 400 class motors. It gets just slightly warm after flight.
  • P-Channel MOSFET Q3 is provided for the brake. It is necessary only for motor gliders and driven by level conversion FET Q3. It can have much smaller capacity comparing to Q1 because it only works to stop the motor.
  • Usually power MOSFET's have built-in diode. If Q3 is not mounted a flywheel diode must be mounted at Q3 position.
  • Pin 3 is A/D converter input for auto cut off.
  • Switch S1 is provided for calibration and Q3 usage selection.

The pattern is quite congested.

パターンはできるだけ小さくしたかったのでかなり込み入ってます。

実際のプログラムはこちらをご覧ください。 Include ファイルはソフトライブラリからダウンロードできます。

  • DIP スイッチ S1 の1を ON にするとキャリブレーションモードに入ります。
  • スティック LOW  → 電源スイッチ ON  →  LED 点滅 → 電源スイッチ OFF →  スティック HIGH  →  電源スイッチ ON  → LED 点灯 でキャリブレーション完了です。
  • 電源スイッチ、 DIP スイッチ S1 の1を OFF にします。
  • 次に電源スイッチを ON にすれば運転モードになります。 OFF インターロックが付いているので、スティック LOW にしないとスタートしません。

キーンというスイッチング音が嫌いなので PWM のキャリア周波数は 10KHz にしました。これだとスイッチング音はまったく聞こえません。

たまに動作しなくなることがあり、原因としては、受信機からのパルス幅が温度で変わってしまうのか、 EEPROM のキャリブレーションデータが消えているか、どちらかと思われます。機体につんだ後で DIP スイッチを操作するのは面倒なので、別のキャリブレーション方法を考慮中です。

Look at here for program source code. Included files can be downloaded from software library.

  • When 1 of DIP switch S1 is set to ON, it goes to calibration mode.
  • Stick Low -> Power Switch ON -> LED flashes -> Power Switch OFF ->Stick High ->Power Switch ON -> LED ON -> Calibration completed.
  • Turn OFF power switch and 1 of DIP switch S1.
  • Turn ON the power switch next time it goes to the operation mode. It has “Off Interlock”, so it won't start until you take stick to low position.

I do not like high pitch chopping sound. So I set the carrier frequency of the PWM to 10KHz and chopping sound is not heard.

Some times I have a trouble that motor does not start. It may be caused by pulse width drift or loss of EEPROM contents. I have not investigated this yet. Anyway it is bit cumbersome to operate the DIP switch after installed to the plane fuselage. So I am now considering to take different calibration procedure.


Actual installation on a motor glider


モーターグライダーへの搭載例

 

 
inserted by FC2 system