• 車種別
  • パーツ
  • 整備手帳
  • ブログ
  • みんカラ+

おりおんSTのブログ一覧

2007年12月12日 イイね!

サーボモーターの使い道

<embed src="http://videocast.yahoo.co.jp/player/vsuexy.swf?vid=288230376151954385" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">

動いているのはサーボモータ。動画はワンチップマイコンでテストプログラムを作って制御しています。

なんに使うんでしょう??

トルクはなんと30kgあるそうです。30kgもあれば、アクセルペダルを制御できるんじゃないんでしょうか。

そう、クルコンが作れるんじゃないかと…

技術的にはできそうなんですが、
・車検通るんでしょうか?
・フェイルセーフをかなり厳密に組み込まないと、安全上問題がありそうです。

課題は多そうです。
Posted at 2007/12/12 02:47:17 | コメント(0) | トラックバック(0) | 自作電装品 | 日記
2007年12月08日 イイね!

自作 HUDタイプ電圧計 赤バージョン

自作 HUDタイプ電圧計 赤バージョン赤バージョンの写真も撮ってみました。

コネクタを使っているので、7SegLEDの交換も楽チンです。

ただし、青色は28mcdに対し、赤色は21mcdの明るさで、昼間は見えるかどうか微妙です…

基板の詳細の写真と配線図をヤフーブログに載せました。

Posted at 2007/12/08 08:49:46 | コメント(2) | トラックバック(0) | 自作電装品 | クルマ
2007年12月07日 イイね!

自作 HUDタイプ電圧計

自作 HUDタイプ電圧計HUDタイプ電圧計を作ってみました。

高輝度LEDを使用しているので、昼間でもフロントガラスに反射させた表示が見えます。まともに西日がさしたりするとちょっときついですが…

作り方の詳細を整備手帳に載せました。

配線図はみんカラだと解像度が落ちてわかりずらいので、希望者にはメール送付します。

プログラミング済みマイコンが欲しい方は1個1000円でお譲りします。

パーツセット(箱なし)を希望される方は1セット3000円でお譲りします。プリント基板ではないので、配線図を見ながらの手配線となります。

<embed src="http://videocast.yahoo.co.jp/player/vsuexy.swf?vid=288230376151950761" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
Posted at 2007/12/07 13:02:35 | コメント(1) | トラックバック(0) | 日記
2007年12月07日 イイね!

自作デジタルタコメーターのソースリスト(デジタル版)

program tacometer02


const TMR1H_Ini = 62
const TMR1L_Ini = 0

dim taco_pulse as byte
dim txt as string[3]

dim ilumi_cnt as byte

'===============================================================================
' decode ascii-char -> 7segment-LED
'===============================================================================
Sub procedure led7seg_decode3( dim ascii_char as byte )
SetBit (PORTB,4)
Select case ascii_char
case " "
ClearBit(PORTD,1) 'A
ClearBit(PORTD,0) 'B
ClearBit(PORTB,2) 'C
ClearBit(PORTB,1) 'D
ClearBit(PORTB,0) 'E
ClearBit(PORTD,2) 'F
ClearBit(PORTC,3) 'G
case "0"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
SetBit (PORTB,0) 'E
SetBit (PORTD,2) 'F
ClearBit(PORTC,3) 'G
case "1"
ClearBit(PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
ClearBit(PORTB,1) 'D
ClearBit(PORTB,0) 'E
ClearBit(PORTD,2) 'F
ClearBit(PORTC,3) 'G
case "2"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
ClearBit(PORTB,2) 'C
SetBit (PORTB,1) 'D
SetBit (PORTB,0) 'E
ClearBit(PORTD,2) 'F
SetBit (PORTC,3) 'G
case "3"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
ClearBit(PORTB,0) 'E
ClearBit(PORTD,2) 'F
SetBit (PORTC,3) 'G
case "4"
ClearBit(PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
ClearBit(PORTB,1) 'D
ClearBit(PORTB,0) 'E
SetBit (PORTD,2) 'F
SetBit (PORTC,3) 'G
case "5"
SetBit (PORTD,1) 'A
ClearBit(PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
ClearBit(PORTB,0) 'E
SetBit (PORTD,2) 'F
SetBit (PORTC,3) 'G
case "6"
SetBit (PORTD,1) 'A
ClearBit(PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
SetBit (PORTB,0) 'E
SetBit (PORTD,2) 'F
SetBit (PORTC,3) 'G
case "7"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
ClearBit(PORTB,1) 'D
ClearBit(PORTB,0) 'E
SetBit (PORTD,2) 'F
ClearBit(PORTC,3) 'G
case "8"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
SetBit (PORTB,0) 'E
SetBit (PORTD,2) 'F
SetBit (PORTC,3) 'G
case "9"
SetBit (PORTD,1) 'A
SetBit (PORTD,0) 'B
SetBit (PORTB,2) 'C
SetBit (PORTB,1) 'D
ClearBit(PORTB,0) 'E
SetBit (PORTD,2) 'F
SetBit (PORTC,3) 'G
case else
End select
End sub
'===============================================================================
' decode ascii-char -> 7segment-LED
'===============================================================================
Sub procedure led7seg_decode4( dim ascii_char as byte )
SetBit (PORTB,5)
Select case ascii_char
case " "
ClearBit(PORTC,5) 'A
ClearBit(PORTC,4) 'B
ClearBit(PORTC,7) 'C
ClearBit(PORTD,4) 'D
ClearBit(PORTD,5) 'E
ClearBit(PORTC,6) 'F
ClearBit(PORTD,3) 'G
case "0"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
SetBit (PORTD,5) 'E
SetBit (PORTC,6) 'F
ClearBit(PORTD,3) 'G
case "1"
ClearBit(PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
ClearBit(PORTD,4) 'D
ClearBit(PORTD,5) 'E
ClearBit(PORTC,6) 'F
ClearBit(PORTD,3) 'G
case "2"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
ClearBit(PORTC,7) 'C
SetBit (PORTD,4) 'D
SetBit (PORTD,5) 'E
ClearBit(PORTC,6) 'F
SetBit (PORTD,3) 'G
case "3"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
ClearBit(PORTD,5) 'E
ClearBit(PORTC,6) 'F
SetBit (PORTD,3) 'G
case "4"
ClearBit(PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
ClearBit(PORTD,4) 'D
ClearBit(PORTD,5) 'E
SetBit (PORTC,6) 'F
SetBit (PORTD,3) 'G
case "5"
SetBit (PORTC,5) 'A
ClearBit(PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
ClearBit(PORTD,5) 'E
SetBit (PORTC,6) 'F
SetBit (PORTD,3) 'G
case "6"
SetBit (PORTC,5) 'A
ClearBit(PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
SetBit (PORTD,5) 'E
SetBit (PORTC,6) 'F
SetBit (PORTD,3) 'G
case "7"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
ClearBit(PORTD,4) 'D
ClearBit(PORTD,5) 'E
SetBit (PORTC,6) 'F
ClearBit(PORTD,3) 'G
case "8"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
SetBit (PORTD,5) 'E
SetBit (PORTC,6) 'F
SetBit (PORTD,3) 'G
case "9"
SetBit (PORTC,5) 'A
SetBit (PORTC,4) 'B
SetBit (PORTC,7) 'C
SetBit (PORTD,4) 'D
ClearBit(PORTD,5) 'E
SetBit (PORTC,6) 'F
SetBit (PORTD,3) 'G
case else
End select
End sub
'===============================================================================
' Turn Off
'===============================================================================
Sub procedure turn_off
PORTA = 0
PORTB = 0
PORTC = 0
PORTD = 0
PORTE = 0
End sub
'===============================================================================
' Turn On
'===============================================================================
Sub procedure turn_on
led7seg_decode3(txt[2])
led7seg_decode4(txt[1])
End sub
'===============================================================================
' Interrupt from Timer1
'===============================================================================
Sub procedure interrupt
If PIR1.TMR1IF = 1 then
ByteToStr(taco_pulse, txt)
ilumi_cnt = 0
taco_pulse = 0

TMR1H = TMR1H_Ini
TMR1L = TMR1L_Ini
ClearBit(PIR1,TMR1IF)
SetBit(PIE1,TMR1IE)
End if
End sub
'*******************************************************************************
' Program main
'*******************************************************************************
main:
ClearBit(INTCON,GIE)
SetBit(PIE1,TMR1IE)
TMR1H = TMR1H_Ini
TMR1L = TMR1L_Ini
T1CON = 0
SetBit(T1CON,T1CKPS1)
SetBit(T1CON,T1CKPS0)
SetBit(T1CON,TMR1ON)
ClearBit(PIR1,TMR1IF)
SetBit(PIE1,TMR1IE)
SetBit(INTCON,PEIE)
SetBit(INTCON,GIE)

ADCON0 = 0
ADCON1 = %00000110
SetBit(CMCON, CM2)
SetBit(CMCON, CM1)
SetBit(CMCON, CM0)

TRISA = %00100000
TRISB = %11000000
TRISC = %00000000
TRISD = %00000000
TRISE = %00000000

turn_off

taco_pulse = 0
ilumi_cnt = 0

WaitHigh:
Inc(ilumi_cnt)
If PORTB.6 = 0 then
If ilumi_cnt <> 8 then
turn_off
Else
turn_on
ilumi_cnt = 0
End if
Else
turn_on
End if
If PORTB.7 = 0 then
goto WaitHigh
End if
Inc(taco_Pulse)
WaitLow:
Inc(ilumi_cnt)
If PORTB.6 = 0 then
If ilumi_cnt <> 8 then
turn_off
Else
turn_on
ilumi_cnt = 0
End if
Else
turn_on
End if
If PORTB.7 = 1 then
goto WaitLow
End if
Inc(taco_Pulse)
goto WaitHigh

end.
Posted at 2007/12/07 00:29:24 | コメント(0) | トラックバック(0) | 自作電装品 | 日記
2007年12月07日 イイね!

自作タコメーターのプログラムソース(バーグラフ版)

字下げが消えちゃうからちょっとみにくいんですが、MikroBasicで記述しています。


program tacometer01

const TMR1H_Ini = 62
const TMR1L_Ini = 0

dim taco_pulse as byte
dim rpm as byte
dim wrpm as byte
dim ilumi_cnt as byte
dim ix as byte

'===============================================================================
' Display LED
'===============================================================================
Sub procedure TurnOn(dim rev as byte)
Select case PORTA.5
case 0
If rev > 3 then
SetBit(PORTB,5)
ENd If
If rev > 5 then
SetBit(PORTB,4)
ENd If
If rev > 7 then
SetBit(PORTB,3)
ENd If
If rev > 9 then
SetBit(PORTB,2)
SetBit(PORTB,1)
ENd If
If rev > 11 then
SetBit(PORTB,0)
ENd If
If rev > 13 then
SetBit(PORTD,7)
ENd If
If rev > 15 then
SetBit(PORTD,6)
ENd If
If rev > 17 then
SetBit(PORTD,5)
ENd If
If rev > 19 then
SetBit(PORTD,4)
SetBit(PORTC,7)
ENd If
If rev > 21 then
SetBit(PORTC,6)
ENd If
If rev > 23 then
SetBit(PORTC,5)
ENd If
If rev > 25 then
SetBit(PORTC,4)
ENd If
If rev > 27 then
SetBit(PORTD,3)
ENd If
If rev > 29 then
SetBit(PORTD,0)
SetBit(PORTC,3)
ENd If
If rev > 31 then
SetBit(PORTC,2)
ENd If
If rev > 33 then
SetBit(PORTC,1)
ENd If
If rev > 35 then
SetBit(PORTC,0)
ENd If
If rev > 37 then
SetBit(PORTE,2)
ENd If
If rev > 39 then
SetBit(PORTE,1)
SetBit(PORTE,0)
ENd If
case 1
If rev > 41 then
SetBit(PORTC,1)
ENd If
If rev > 43 then
SetBit(PORTC,2)
ENd If
If rev > 45 then
SetBit(PORTC,3)
ENd If
If rev > 47 then
SetBit(PORTD,0)
ENd If
If rev > 49 then
SetBit(PORTD,1)
SetBit(PORTD,2)
ENd If
If rev > 51 then
SetBit(PORTD,3)
ENd If
If rev > 53 then
SetBit(PORTC,4)
ENd If
If rev > 55 then
SetBit(PORTC,5)
ENd If
If rev > 57 then
SetBit(PORTC,6)
ENd If
If rev > 59 then
SetBit(PORTC,7)
SetBit(PORTD,4)
ENd If
If rev > 61 then
SetBit(PORTD,5)
ENd If
If rev > 63 then
SetBit(PORTD,6)
ENd If
If rev > 65 then
SetBit(PORTD,7)
ENd If
If rev > 67 then
SetBit(PORTB,0)
ENd If
If rev > 69 then
SetBit(PORTB,1)
SetBit(PORTB,2)
ENd If
If rev > 71 then
SetBit(PORTB,4)
ENd If
If rev > 73 then
SetBit(PORTB,5)
ENd If
If rev > 75 then
SetBit(PORTA,0)
ENd If
If rev > 77 then
SetBit(PORTA,1)
ENd If
If rev > 79 then
SetBit(PORTA,2)
SetBit(PORTA,3)
ENd If
End Select
End sub
'===============================================================================
' Turn Off LED
'===============================================================================
Sub procedure TurnOff
PORTA = 0
PORTB = 0
PORTC = 0
PORTD = 0
PORTE = 0
End sub
'===============================================================================
' Display LED
'===============================================================================
Sub procedure Display
If rpm <> wrpm then
wrpm = rpm
TurnOff
TurnOn(wrpm)
End If
End sub
'===============================================================================
' Interrupt from Timer1
'===============================================================================
Sub procedure interrupt
If PIR1.TMR1IF = 1 then
rpm = taco_pulse
taco_pulse = 0
TMR1H = TMR1H_Ini
TMR1L = TMR1L_Ini
ClearBit(PIR1,TMR1IF)
SetBit (PIE1,TMR1IE)
End if
End sub
'*******************************************************************************
' Program main
'*******************************************************************************
main:
ClearBit(INTCON,GIE)
SetBit (PIE1,TMR1IE)
TMR1H = TMR1H_Ini
TMR1L = TMR1L_Ini
T1CON = 0
SetBit (T1CON,T1CKPS1)
SetBit (T1CON,T1CKPS0)
SetBit (T1CON,TMR1ON)
ClearBit(PIR1,TMR1IF)
SetBit (PIE1,TMR1IE)
SetBit (INTCON,PEIE)
SetBit (INTCON,GIE)

ADCON0 = 0
ADCON1 = %00000110
SetBit(CMCON, CM2)
SetBit(CMCON, CM1)
SetBit(CMCON, CM0)

TRISA = %00100000
TRISB = %11000000
TRISC = %00000000
TRISD = %00000000
TRISE = %00000000

TurnOff

taco_pulse = 0
rpm = 0
wrpm = 0
ilumi_cnt = 0
ix = 255

WaitHigh:
Display
If PORTB.7 = 0 then
goto WaitHigh
End if
Inc(taco_Pulse)
WaitLow:
Display
If PORTB.7 = 1 then
goto WaitLow
End if
Inc(taco_Pulse)
goto WaitHigh

end.
Posted at 2007/12/07 00:27:51 | コメント(1) | トラックバック(0) | 自作電装品 | 日記

プロフィール

愛車ストリームに自作の回路を組み込んで楽しんでいます。オートドアロック、リバース連動ハザード、リバース連動ミラー、オートライト、オートミラークローズなどです ^...
みんカラ新規会員登録

ユーザー内検索

<< 2026/2 >>

1234567
891011121314
15161718192021
22232425262728

ブログカテゴリー

リンク・クリップ

ヤフーブログ 
カテゴリ:その他(カテゴリ未設定)
2007/05/10 06:12:13
 

愛車一覧

ホンダ ストリーム ホンダ ストリーム
自作の回路を組み込んで楽しんでいます。オートライト、オートミラークローズ、車速感応ドアロ ...

過去のブログ

2008年
01月02月03月04月05月06月
07月08月09月10月11月12月
2007年
01月02月03月04月05月06月
07月08月09月10月11月12月
ヘルプ利用規約サイトマップ
© LY Corporation