DLのラジコン用に作りました。ほとんどStainz用と一緒ですが、以下のところが違います。

  • バッテリーとレールから集電を併用。このため、レールからの集電不良があるとバッテリーに切り替え走り続けます。S1でバッテリーのみかバッテリー、レール併用かを切り替え。D1はShottky Barrier Diodeとして電圧ロスを抑える。
  • アセンブラではなく「C」でプログラム。
  • 使用メモリー増加に対処するため、CPUをMega88に変更。
  • 出力段はTA7257Pに代わって、MOSFETディスクリートに変更。

I made this for Kato-style DL. This one is basically similar to controller for Stainz, but followings are different:

  • Track and battery fed operation. In case of poor power correction the battery automatically overtake and continue the operation. Battery only or track with battery operations can be selected by S1. D1 is Schottky barrier diode to reduce voltage drop across the diode.
  • Control program is written by "C" language instead of assembler.
  • CPU is changed to Mega88 to cope with larger object code size from compiler.
  • For motor driver circuit, discrete MOSFET circuit was designed instead of TA7247P.

Battery I chose was NiMH 8 cell battery pack with 9.6V output rating. However the power truck I chose would be rated at 20Vdc or so. I wanted to minimise the voltage loss across motor driver circuit. The power driver used to use was TA77257P with voltage drop of about 2V. 2V drop seemed too much. Easy solution was to use MOSFET type H switch IC, but this type of IC’s were quite expensive. So I decided to design the motor driver from scratch using discrete MOSFET’s. The circuit around Q2, Q4, Q5, Q6, Q7, Q8 is the new motor driver circuit. Not so much complicated.

I programmed new control strategy different from TA7257P. With TA7257P PWM signals are given to Q2 and Q6 in case of forward and both transistors turn ON and OFF at the same timings. However wit this arrangement there is nowhere the motor current to be diverted when the transistors turn OFF, generating large noise. So it is mandatory to put large size of capacitor at motor terminals.

In new method Q6 stays ON in forward operation and only Q2 works for PWM control. In reverse operation, Q5 stays ON and Q4 control PWM. In this arrangement motor current can flow in circulation mode to reduce noises as shown on left.

バッテリーはNiMH8セルを使うので9.6Vになりますが、使用したパワートラックが20V定格くらいと思われるので、モーター制御素子の電圧ロスをできるだけ抑えたい。今まで使用のTA7257Pはとても便利なモーター制御ICなんですが、電圧ドロップが2Vもあり、2セル分近くも損するので使いたくない。MOSFETのHスイッチICにすれば電圧ドロップは無視できるくらいになりますが、高すぎる。ということでディスクリートのMOSFETでHスイッチを組んでしまうことにしました。回路図の、Q2, Q4, Q5, Q6, Q7, Q8まわりです。ディスクリートでも大してややこしくはありません。

Hスイッチの制御方法はTA7257P違うやり方にしました。TA7257Pでは、正転側のPWMパルスを与えるとQ2とQ6が同時にオン、オフするようになっています。この方法では同時オフしたとき、モーターに流れていた電流の行き場がなくなり大きなノイズを発生することになります。このため、ノイズ吸収用のかなり大きなコンデンサをモーター端子に付けなければなりません。

今度のやり方は、正転では、Q6はオンしっぱなし、Q2のみでPWMのチョッピングを行います。逆転では、Q5がオンしっぱなしで、Q4がチョッピング。このようにすると左の図のようにMOSFETに組み込まれているダイオードを通して、電流が還流するようになりノイズの発生が抑えられます。

PWB finished was under testing. The PCB shown on left side is test PCB used for debugging.

できた基盤をテストしているところです。左のはソフトのデバッグ用に作ったテスト基盤です。

プログラムはこちらからダウンロード可能。

  • "main.c" はサンプルのメイルーチン
  • "def.c" はメインルーチン用パラメータ定義ファイル
  • "PLC.c" は、簡易PLCのプログラム
  • "PLC_Inst.c" はPLCの命令定義ファイル
  • "PLC_dev_def.c" はデバイス、レジスタ定義ファイル
  • "PLC_Program.c" はラダープログラムの定義ファイル
  • "macros.c" はマクロ定義ファイル
  • "var.c" は変数(RAM)定義ファイル

制御ロジックには簡易PLCのプログラムを使っています。

Look at here for program source code.

  • "main.c" is main routine
  • "def.c" is parameter definition file for main
  • "PLC.c" is PLC program
  • "PLC_Inst.c" is PLC instruction definition file
  • "PLC_dev_def.c" is device register definistion file
  • "PLC_Program.c" is ladder program definition file
  • "macros.c" is macro definition file
  • "var.c" is variable (RAM) definition file

I used a “Simplified PLC” program for the logic control.


 

 
inserted by FC2 system