Automatic Transfer Switch

i just asking for the logic or the simmilar program. i build an ATS for switching between batteries and grid. I want when the battery drain it switch to grid and charge untill it full. When the battery full i want to switch it untill it drain. and so on. i used my logic and it keep switching between the line.

i used my logic and it keep switching between the line.

What logic would that be ?

It sounds like you need to introduce some hysteresis between the on and off levels to create a deadband to prevent the system hunting between the 2 power sources

if battery voltage < trigger level
  switch to grid
  start charging battery
else if
  battery voltage > trigger level + deadband value
  switch to battery
  stop charging battery
end if

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR

Then look down to "code problems" about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

  • What are your batteries?
  • What voltage and capacity are your batteries?
  • What are you using to charge the batteries?
  • How do you detect battery voltage?
  • How do you detect that the mains power is ON?

Can you please post a complete copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.