duminică, 18 septembrie 2011

Incarcator acumulator cu circuitul integrat LM317

Incarcator acumulator cu circuitul integrat LM317

Limiting Current with an LM317T

The LM317T is a voltage regulator chip. It can also be used with a suitable resistor to regulate current. Full details on how this works are available here in our guide tousing the LM317T with LED lighting.

Current limiting with the LM317T

The value of the resistor required is given by Ohm's Law as 1.25V divided by the output current required. (The 1.25V is the regulated output from the LM317T's ADJoutput.) The higher the input voltage and current, the more heat will be generated by the LM317T since the output current is fixed and the extra power has to go somewhere. The LM317T will cope with currents of up to 1.5 Amps and so will have no problem at all with small solar panels.

Choosing the Resistor for the LM317T Current Limiting Circuit

Resistors are only available in certain values - e.g. 5.6 Ohms and 6.8 Ohms, but not 6.2 Ohms. Below is a table of available resistor values together with the output current generated if each resistor is used in an LM317T current limiting circuit (R = resistance, I = current).

R (Ohms)3.94.75.66.88.210121518222733
I (mA)321266223184152125104.283.369.456.846.337.9

Therefore using the table above we can see that to charge 1000mah AAA rechargeable batteries with a current of 100ma, a 12 Ohm resistor would be perfect. A 15 Ohm resistor would reduce the current and slow down charging, a 10 Ohm resistor would increase the current and speed up charging.

miercuri, 14 septembrie 2011

Intrare digitala pe un microcontroller


Intrare digitala pe un microcontroller
divizor tensiune





joi, 8 septembrie 2011

Bec digital

program bec/aprins/stins


' Declarations section

main:
dim stare1 as byte

C1ON_bit = 0
C2ON_bit = 0
PORTD.4 = 0
PORTC = 255
TRISC = 255
TRISD = 0
ANSEL = 0
ANSELH = 0
stare1 = 0

start:

IF (Button(PORTC,2,50,1)) and (stare1 = 0) then
PORTD.4=1
DELAY_ms(50)
goto asteapta1
end if
IF (Button(PORTC,2,50,1)) and (stare1 = 1) then
PORTD.4=0
DELAY_ms(50)
goto asteapta2
end if

goto start

asteapta1:
if (Button(PORTC,2,50,0)) then
stare1 = 1
DELAY_ms(50)
goto start
end if

goto asteapta1

asteapta2:
if (Button(PORTC,2,50,0)) then
stare1 = 0
DELAY_ms(50)
goto start
end if
goto asteapta2

end.