Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Cicruit overview

Status
Not open for further replies.

Pol

New Member
Hello,
I just finished my first uC-based project. Can you look is everything OK?

**broken link removed**

The Schottky diodes are good for emergency power? Phototransistor and LCD are good connected?
 
R7 4.7K resistor, shouldn't it connect to ground not +5 ?


Lefty
 
Last edited:
I question the LCD back light.
LED- goes to GND through Q2 = ok
LED+ goes to gnd through a 10k resistor = ?
I think LED+ should go to +5V thought a 200 ohm resistor.
 
Oh my fault, I forgot delete 4,7k resistor and wrong connect LED +
 
Last edited:
Q3 may not turn off when powered from mains due to the voltage drop across D3. I assume you know that the 3V6 supply will vary between apx 4.5V when mains powered and (Vbattery - 0.5V) when on battery? The LCD, 1WIRE, phototransistor and piezo won't work when battery powered but that may be your intent.
 
3V6 its only backup power, when the main power disconnect backup will power only uC to dont reset clock. D3 and D4 is diode sluice-gate.
 
I would still add a diode in series with R6 to ensure that Q3 will be off when on mains. A better method would be to use a BS170 like you did for the LCD back light and invert your piezo logic in code. An even better solution is to have the uC sense that it is on battery and handle all the power saving via software.
 
Last edited:
Good idea with software power saving. Connect +5V line via 100K resistor to OC1B PWM?
 
Basically, yes. Set pin 16, or any spare pin, to input mode and connect via a 10K-100K to the +5V line. You will probably also need a bleeder resistor (try 470Ω) across the 5V line so it drops to zero relatively quickly after the mains drops out. Then your code can poll this pin to see if the mains power is on or not.
 
Good, but if I want to check what is voltage and if is over 4V enter in power saving mode connect in the same way?
 
What does the 12V come from? Maybe you want to measure that with an ADC/comparator via a divider so you can go to power save mode before the 5V collapses?
 
12V is from AC.
I think it will be good connect to check voltage -> +5V->|43k|->|2,2k pot|->|1k|->GND , from potentiometer to ADC pin.
I intend to use Li-Ion 1000-2000mAh battery from mobile phone(good choice?) what resistor i must use to charge it?
 
Last edited:
You can't charge a Li-Ion battery with just a resistor. NiCad and NiMh can be charged this way. If you want to charge a Li-Ion battery, you'll need a specialized charger IC or make your uC control the charging.
 
**broken link removed**

I think that batt will be OK. 5oHm resistor to charge it will be good? It can be charging all time?
 
You should trickle charge it at a rate no more than 1/20C which works out to 75ma for the battery above. So a 12Ω resistor should be good, assuming 0.5V schottky diode drop.

To extend the battery life you could charge it at 150ma for 12 hours and then lower the trickle current to a 5ma maintenance charge. Since you already have a uC, you can keep track of the charging time and also keep track of the discharge time to decide how long to charge the battery when the power comes back on.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top