3 Kasım 2010 Çarşamba

DC/STEP MOTOR UYGULAMALARI

Program 57 :DC motor kontrol programi (DC motoru çalistirma ve durdurma)
 
 
 
Sekil 10.1’de PIC16F84 ile DC motor kontrolü yapilmaktadir. Devrede butonlar PIC16F84’ün A portunun 0. ve 1. bitlerine bagliyken, DC motor B portunun 0. bitine baglidir.
     Program57, PIC16F84’ün A portunun 0. bitine bagli butona basildiginda motoru döndürürken, 1. bitine bagli butona basildiginda durdurur.

Programin (1) numarali komut satirinda 5 bitlik TRISA içeriginin tamami “1” yapilarak buton kontrolü için PORTA’nin giris olmasi saglanmistir.
(2) numarali komut satirinda 8 bitlik TRISB’nin tüm bitleri “0” yapilarak motor kontrolü için PORTB’nin çikis olmasi saglanmistir.
(3) numarali komut satirinda PORTB içerigi sifirlanarak, bu register içerisinde önceden kalabilecek datalar silinmistir.
 (4) numarali komut satirina (7) numarali komut satirindan yönlendirme yapabilmek için sürekli buton kontrolü amaciyla MOTOR_KONTROL etiketi atanmistir.
 (5) numarali komut satirinda PORTA’nin 0. bitine bagli butona basilip basilmadigi test edilmektedir. Bu komut satirinda Eger (IF) PORTA’nin 0.bit degeri “0” ise,  o zaman (THEN) PORTB’nin 0. bitini HIGH “1” yap denmektedir.
 Bu komut satirinda belirtildigi gibi RA0 butonuna basilir ise program, THEN komutundan sonra gelen HIGH PORTB.0 komutunu isleterek PORTB’nin 0. bitini “1” yapar. Bu durum B portunun 0. bit çikisinin +5V olmasi anlamina gelir ve motor çalismaya baslar.
 (6) numarali komut satiri çalisan motoru durdurur. Bu komut satirinda PORTA’nin 1. bitinin “0” olup olmadigi diger bir ifadeyle butona basilip basilmadigi sorgulanmaktadir. Eger butona basilmis ise program, THEN komutundan sonra gelen LOW PORTB.0 komutunu isleterek PORTB’nin 0. bitini “0” yapar. Bu durum B portunun 0. bit çikisinin sase potansiyeli almasi anlamina gelir ve motor durur.
 (7) numarali komut satiri ile buton durumlarina göre motoru çalistirmak veya durdurmak amaciyla GOTO komutu ile MOTOR_KONTROL etiketli (4) numarali komut satirina dönülür.





Program 61 : Step motoru tek fazli süren program
 
                                            
 
Program61 PIC16F84’e yüklenip, Sekil 10.12’de görülen devre ile çalistirildiginda PIC16F84’ün A portunun 0. bitine bagli butona basildiginda PORTB’nin ilk dört bitine bagli step motor bobinlerine sirayla palsler uygulanir ve step motor saat yönünde hareket eder.
     Sekil 10.12’de PIC16F84’ün B portunun ilk dört bit’i step motorun bobinlerine sirasi ile A1 bobini PORTB0, B1 bobini PORTB1, A2 bobini PORTB2 ve B2 bobini PORTB3  seklinde baglanmistir. Bu baglanti türünde yer alan bobin siralamasina uyulmaz ise step motor düzgün çalismaz.
     Program 61’de (1) numarali komut satiri ile PORTA giris, (2) numarali komut satiri ile PORTB çikis olarak tanimlanmaktadir.
     (3) ve (4) numarali komut satirlari ile PORTA ve PORTB içerikleri silinmektedir.
     (5), (6) ve (7) numarali komut satirlari A portunun 0. bitine bagli butona basilip basilmadiginin sürekli test edildigi bölümdür. RA0 butonuna basildiginda PORTA’nin 0. biti sase potansiyeli alarak “0” olur ve program THEN komutundan sonra belirtilen (8) numarali MOTOR_KONTROL etiketine dallanir.
     Butona basilmaz ise (7) numarali komut satiri isletilerek sürekli buton kontrolü için butona basilana kadar program (5) numarali komut satirina döner.
     (9)-(16) numarali komut satirlari arasinda motorun saat yönünde dönmesi amaciyla, Tablo 10.1’de belirtilen siralamaya uygun palsler step motor bobinlerine PORTB’nin RB0, RB1, RB2 ve RB3 bitlerinden uygulanir. Her bir pals bobinlere 100msn’lik aralikla uygulanmaktadir.
     Program, (9) numarali komut satirini isletip (10) numarali komut satiri ile 100msn bekledikten sonra (11) numarali komut satirini isletir. Bu durumda step motor saat yönünde 1 adim atmis olur. (15) ve(16) numarali komut satirlarinin ardindan step motor 4. adimi atarak, (17) numarali komut satiri ile MOTOR_KONTROL etiketli (8) numarali komut satirina döner. Ayni islemler devam ederek step motor 5. adimdan itibaren devam eder. 

Hiç yorum yok:

Yorum Gönder

İzleyiciler

LED DİRENÇ HESAPLAMA

All LEDs require current limiting, without a current limiting mechanism the LED will usually burn out in under a second. Adding a simple resistor is the easiest way to limit the current. Use the calculator below to find out the value of resistor you require.

For example if you are wanting to power one of our_blank">red LEDs in an automotive application you would see that the typical forward voltage is 2.0 Volts and the maximum continuous forward current is 30mA. Therefore you would enter 14.5, 2.0 and 30 into the Single LED calculation box. After calculating you get 470ohm 1 watt as the result. Here is a that allows you to enter a resistor value and generate the corresponding color code.

Note: For automotive applications use the actual system voltage, not 12 Volts. Most 12 Volt system actually operate at around 14.5 Volts.

Supply Voltage
VOLTS
Voltage Drop Across LED
VOLTS
Desired LED Current
MILLIAMPS



Calculated Limiting Resistor
OHMS
Nearest higher rated 10% resistor

Calculated Resistor Wattage
WATTS
Safe pick is a resistor with
power rating of (common values are .25W, .5W, and 1W)
WATTS

LEDs in series

Several leds in series with one resistor
Supply Voltage
VOLTS
Voltage Drop Across LED
VOLTS
Desired LED Current
MILLIAMPS
How many LEDs connected




Calculated Limiting Resistor
OHMS
Nearest higher rated 10% resistor

Calculated Resistor Wattage
WATTS
Safe pick is a resistor with
power rating of (common values are .25W, .5W, and 1W)
WATTS
LM317 UYGULAMA DEVRELERİ HESAPLAMASI

 




Çıkış Voltajı
R1 resistor

R2 resistor

R1 resistor
R2 resistor

Çıkış Voltajı


Lm317 uygulama devreleri ve detayli bilgiye Buradan ulasabilirsiniz

LM555 - ASTABLE OSCILLATOR CALCULATOR

LM555 - ASTABLE OSCILLATOR CALCULATOR
Value Of R1 Ohms Value Of R2 Ohms
Value Of C1 Microfarads
Output Time HIGH SECONDS Output Time LOW SECONDS Output Period HIGH + LOW SECONDS Output Frequency HERTZ Output Duty Cycle PERCENT
Resistor values are in Ohms (1K = 1000) - Capacitor values are in Microfarads (1uF = 1)

NOTE: The leakage currents of electrolytic capacitors will affect the actual output results of the timers. To compensate for leakage it is often better to use a higher value capacitor and lower value resistances in the timer circuits.

LM555 Astable Oscillator Circuit Diagram


LM555 - ASTABLE CAPACITOR CALCULATOR

The next calculator can find the capacitance needed for a particular output frequency if the values of R1 and R2 are known.

Value Of R1 Ohms Value Of R2 Ohms
Frequency Desired Hertz
Capacitance uF
s

VOLT AMPER OHM ve WATT HESAPLAMA

Current:
kA (kiloamps) A (amps) mA (milliamps) µA (microamps)
Voltage:
kV (kilovolts) V (volts) mV (millivolts) µV (microvolts)