軌道モーターカーに使うために設計し、片ボギーガソにも使用しています。Oatrey Electronicsの400MHzR/Cユニットと使うことを前提としています。下記の展開図は片ボギーガソに使用したものです。

  • マイコンはAVR Tiny26を使用。20ピンでこのクラスとしてはとても高機能です。組み込みクロック8MHzで早いです。
  • 5Vの電源(IC2)はオートカットオフ電圧をできるだけ低くしたいので低ドロップレギュレータを使用。
  • 出力のパワーICはTA7257Pを使用しました。いわゆるHスイッチで1個で前進、後進の切り替えもできるのでとても便利です。しかし、AC特性はへたれで100Hz位のスイッチングがいいとこかもしれません。私は50Hzで使ってます。またバイポーラのため、ドロップも大きく2Vも落ちます。MOSFETのHスイッチが理想的なんですが、高くて手が出ません。
  • PA4からPA7までがR/Cユニットからの入力。
  • PB1とPB3が前進、後進用のPWM出力となっています。
  • PA0は後進出力、ヘッドランプとテールランプを駆動。
  • PA1は前進出力。
  • PA3は室内等点灯用。
  • PA7、PB0、PB2、PB4は将来のサウンド出力用です。
  • PB5は加速度設定用A/I。
  • PB6はバッテリー電圧チェック用。軌道モーターカーではつけなかったんですが、R/C基板よりTiny26の方が低電圧で動くため、止められなくなっとことがあり、追加。

I designed this for the “VW Rail Van” at first and slightly changed for “Half Bogie Gasoline Car”. This circuit is supposed to be used with 400MHzR/C units from Oatrey Electronics. Following schematic diagram is for “Half Boggy Gasoline Car”.

  • Micro-controller is AVR Tiny26. This has quite powerful functions as 20 pin chip and fast with built-in 8 MHz clock.
  • I selected a low-drop regulator for 5V power supply (IC2) to have low auto-cut-off voltage.
  • I used TA7257P as a motor driver. It is so-called H-switch and can do speed control and changeover of forward and reverse by itself. Very handy. However AC characteristics is quite slow and overall drop is large as 2V. I could not find this IC in Australia and bought them in Akihabara. Actually MOSFET H-switches are ideal, but quite expensive.
  • PA4 to PA7 are inputs from R/C receiver.
  • PB1 and PB3 are PWM outputs for forward and reverse.
  • PA0 is for head and tail lights on reverse.
  • PA1 is for head and tail lights on forward.
  • PA3 drives interior lights.
  • PA7, PB0, PB2 and PB4 are reserved for sound system in future.
  • PB5 is analogue input to set acceleration rate.
  • PB6 is analogue input to detect battery voltage. The VW Rail Van was out of control when the battery was getting flat because Tiny26 can work under much lower voltage than R/C receiver.

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

  • PA7(DIR)をONにするたびに停止→前進→停止→後進と切り替わります。
  • PA5(UP)をONにすると加速、加減速度はPOT1で調整できます。
  • PA6(DOWN)をONにすると減速。
  • PA4(ES)をONにすると非常停止です。
  • また走行中にPA7(DIR)をONにすると通常停止。

またこの制御ロジックには簡易PLCのプログラムを使っています。これに関してはそのうち記事にする予定。自動運転などに応用すると便利なはずです。

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

  • Every time giving “1” to PA7 (DIR) changes the status OFF -> Forward -> OFF -> Reverse.
  • Giving “1” to PA5 (UP) increases the speed and the rate is set by POT1.
  • Giving “1” to PA6 (DOWN) decreases the speed.
  • Giving “1” to PA4 (ES) initiates an emergency stop.
  • Giving “1” to PA7 (DIR) while running initiates normal stop.

I used a “Simplified PLC” program for the logic control. This program is quite useful for automatic operation, etc. I will write an article about this in future.

 


 

 
inserted by FC2 system