1

I am doing a project in which I use 230V mains to charge a battery. If mains power is down, I have to use solar power for charging; and if the solar power is not good I have to switch to the diesel generated power. I have to do this using a microcontroller. Also, I should display the the source with which the battery is being sourced on a lcd display. How do I do this?

Nick T
  • 12,480
  • 2
  • 45
  • 72
user2556
  • 19
  • 2
  • 3
    What do you need help with? You listed several questions: Charging a battery from mains, charging a battery with solar power, charging a battery with a diesel generator, switching between the three with a microcontroller, and displaying something on an LCD. These could all be separate questions. However, to get the best kinds of answers, you can't just ask "How do I charge a battery from mains power". Some description of what you've tried, your budget, and information on the battery chemistry would help you get a usable answer. – Kevin Vermeer Jan 10 '11 at 14:28
  • 3
    Also, it sounds like you want us to do this problem for you. We'd love to help, but we're here to help if you get stuck, not to take the project from start to finish. – Kevin Vermeer Jan 10 '11 at 14:30

2 Answers2

3
o-------------+--- >| ---- + ---------- power output
              |            |
3 sources     |            |
o---------+---|--- >| ---- + 
          |   |            |
          |   |            |
o-----+---|---|--- >| -----/
      |   |   |
      |   |   |
      measure here (digital inputs with proper resistors)

beter use Schottky diodes

jet
  • 217
  • 1
  • 5
  • 1
    This can be done in a better schematic program and you can upload an image from your computer. This will automatically put it on imgur.com on the SO professional account. – Kortuk Jan 10 '11 at 19:37
  • @jet, in this configuration, is it normal to see the power output voltage level also at the floating input of any other diodes. So if only source 1 is connected, is it normal to observe the output voltage at source 2 and 3 if they are not connected? – jeep9911 Jan 28 '12 at 17:06
2

Required:

  • method to measure voltage and current of each source
  • method to switch between sources

Mains monitoring can be done by measuring only voltage. To do this, I suggest you read How to connect 230V 50Hz to arduino analog input. Solar monitoring solutions can range from a simple current sense resistor to maximum power point trackers. It's up to you whether or not you need a generator monitor -- perhaps a simple "is it on?" indicator. A switch solution depends entirely on the power requirements. For moderate to low power, I suggest you read Interfacing microcontroller and mains via a relay; high power will need more buffering. Each of the mentioned sources produce different types of electricity, so you need circuitry to address this, like a Xantrex power hub or other AC-DC & DC-DC converters. Interfacing with an LCD is a different issue altogether, so start a new question with a specific LCD in mind and read Serial Enabled LCD.

tyblu
  • 8,207
  • 6
  • 41
  • 70