Go to Otherpower.com Home Page Go to Forcefield Shopping Cart Go to Wondermagnet.com Home Page
Front Page - [Homebrewed Electricity-- (wind) (solar) (hydro) (steam) (controls) (storage) (mechanical)] - Classifieds - Site News
Everything - Newbies - [Remote Living-- (housing) (heat) (light) (water)] - Rants & Opinion - Diaries - Our Products
Digital dump controller version 3


By elt, Section Controls
Posted on Sun Jul 27th, 2008 at 06:38:31 PM MST
.... I've added LVD and lighting control

My Polar Power lighting controller stopped turning on the night light so I've decided to upgrade my existing dump controller circuit to add that feature.

Since I made that one, I've learned to implement both the button input and LED output functions on a single pin; that creates a spare pin that I can connect to a logic-level FET for switching. The timing of the lighting control (or low voltage disconnect) will be programmed into the chip so I hope that there's no need for additional hardware.

The new schematic is here. While I've drawn the controller chip to show what each pin is used for, it is really a general purpose microcontroller, an ATMEL Tiny85, that I've programmed to do what I want.

I've made a few other changes, hopefully they don't undo any the good advice and help I got in making the existing circuit work:

  1. I've switched from using four discrete transistors as a FET driver (which worked great) to using a driver chip, an MCP1407... mostly because I was able to sample them from MicroChip and I have a few hanging around.
  2. I've put a low pass filter on the battery-string voltage sense line. I've never seen a problem with voltage sensing in this circuit but I did have problems with sensing it in my MPPT circuit so I put it in and hope it doesn't hurt here...
  3. I've added another battery connection for powering the board logic. I want to use LDO voltage regulators to minimize the current draw of the board and most of them have a max input of 20 or 25 volts. With separate battery connections and with proper choice of the output FETs, high side caps and diode, practically any voltage on the dump load can be accommodated. For 12 volt only operation, the second input could be jumpered to the battery string input. Otherwise it should be connected to a battery terminal about 12 volts up from ground. I'm hoping that it doesn't matter if the 12 volt supply browns out from low battery voltage because the FETs would never be turned on under that condition.)
  4. I've added a jumper for changing the input sensing voltage. (I wire my battery bank for 12 volts in the Summer and early Fall when winds are low and 24 volts otherwise.) All the voltage levels were programmable in the previous circuit; however, I frequently found myself hurried punching in the numbers to change voltages. The new controller will be programmed to model a single battery cell and then I use a voltage divider to scale the battery bank voltage down to one cell.
Well, there you have it... if anything looks stupid please let me know. I'm not an EE so I'm prone to ignorance about things which might be obvious to more experienced folk.

Thanks again,
 - Ed.

Digital dump controller version 3 | 11 comments (11 topical, 0 editorial)

Re: Digital dump controller version 3 (3.00 / 0) (#1)
by elt on Mon Jul 28th, 2008 at 10:24:11 AM MST
(User Info)

The specs for this controller are in other posts but briefly, it's a temperature compensated PWM dump controller with an automatic voltage boost from float level to charge level after it's detected a voltage drop... it's not as smart are a real charge controller but I think it's a usefull step in the right direction. Total cost to build a 30-40 amp version is about $25 USD.

I've done a layout for the circuit:



(Click here to see it at full resolution.)

The layout of the high power section is nearly identical to that of the existing controller. I reduced the number of caps from four to two to allow a little more room for heatsinks. The big caps are needed to protect from voltages spikes cause by inductance in the battery cable; the big diode protects from spikes caused by inductance in the load... this layout and circuit has been working very well. (Thanks everyone!)

The control sections is routed completely on one layer. I tweaked the autorouting to get the best ground routing that I could. So, even through the board is two layers, the only things on the top layer are power planes and they are very forgiving of alignment with the bottom layer. (It's as easy a two layer etching job as possible.)

Since I posted the schematic, I remembered ScottsAI showing me a nicer way to select reference voltages by shorting connections rather than by making them. The result is that I could selected three voltages with the three position jumper so I added another resistor to support a 48 volt connection. That change can be seen in the lower right part of the control section layout, the difference in the previous schematic is show here:


I've gotten so much help from the board getting this working that I really hope that others can benefit from it as well. If nothing else, for other folks that do digital circuits but are iffy on power electronics, the discrete four transistor driver and big caps and diode protecting the FETs (used since version 2) has worked great; it should be applicable to other PWM applications.

And if anyone wants to build this or an equivalent control circuit, I would be very happy to post artwork and provide preprogrammed controller chips at cost to help you along the way.

 - Ed



Re: Digital dump controller version 3 (3.00 / 0) (#2)
by scottsAI (user name at eml dot cc) on Tue Jul 29th, 2008 at 09:08:00 PM MST
(User Info)

Elf,

CPU PIN:

  1. - connection not shown no comment!-)
  2. - ADC input, Higher input impedance. If for some reason input voltage goes above CPU supply rail, want to limit the current to couple hundred microamps. Else consider diode protection to Vcc and gnd.
  3. - Pin pulled to ground will light LED, Switch: is this an input to micro or to turn on LED dimmer?
  4. - gnd OK
  5. - Not used? Why the cap?
  6. /7 nice dual use of pins.
  7. Vcc OK.
Rest of the circuit looks straight forward, OK.

Concerns on pin 2 and 3, let me know what you end up doing.

Have fun,
Scott.



Re: Digital dump controller version 3 (3.00 / 0) (#3)
by elt on Wed Jul 30th, 2008 at 06:47:00 AM MST
(User Info)

Hi Scott,

It's very nice to hear from you.

  1. The pin is used to program the chip (via the JP2 header.)
  2. I have no great understanding of "impedance." The datasheet says that the ADC is optimized for 10K and I figured that the resistor values were in that range... since it's only sampling at about 1KHz, I suppose the values can go higher. Thank you for pointing this out... one reason that I wanted to redo the existing dumper was that it wasn't quite rated to handle the mill without the batteries attached. (I'm not looking to generate heat, just to be able to do some maintenance while the wind is blowing.)
  3. Assuming that I'm not out there during a gale, perhaps 3x battery voltage is enough? ... that'd be about 8 volts at the input. Limiting to 250uA would require 32K ohm. Give or take the existing resistance in the voltage divider, I should throw in a 22K resistor at the input pin of the ADC?
  4. This works great! It implements and X10-like one button, one LED user interface. When the pin is an output, the controller flashes the LED. The resistor on the switch side (R6) protects the controller output if the user pushes the button while the output is high. When configured as an input, the voltage doesn't go to zero when the button is pushed but, assuming a 2+ volt drop across the LED, it does go down to logic zero (.2Vcc) ... I do see that the voltage is borderline, I'll make R4 680 ohm to bring it down a little bit more. Lighting the LED while the button is pushed is an artifact but I can call it a "feature" :) as it does provide some feedback that the button made contact.
  5. The cap is used to decouple the internal 2.56V voltage reference.
  6. Thank you. Without the pull down resistors, the FETs turn on for a blink while the pins are floating. The resistors stop that; the LEDs are optional.
Thanks again!
 - Ed.

[ Parent ]


Re: Digital dump controller version 3 (3.00 / 0) (#4)
by domwild (domwild at hotmail dot com) on Fri Aug 1st, 2008 at 02:17:36 AM MST
(User Info)

Elt,

Good job and well done!

What do you think of the specialized chips on the market, which are specifically designed to charge batteries and, if i remember correctly, have a PWM input somewhere?

Obviously, if you construct your own, you have more control over the charging.

Regards,

dom

dom There is one thing money cannot buy: POVERTY!



Re: Digital dump controller version 3 (3.00 / 0) (#5)
by elt on Fri Aug 1st, 2008 at 10:13:27 AM MST
(User Info)

Thank you!

> What do you think [...]

I'm not an electrical engineer (but usually I can pretend enough to be on to get free samples.) I have looked at a few chips but my background isn't strong enough to glance at a datasheet and see how they might apply to wind power. But, at a glance, I usually see enough resistors, caps and sometimes coils in the example circuits that by the time you add them up I think they cost if more than the $3 for the microprocessor... that's my not-an-electrical-engineer point of view (and I do appreciate that there's a not-a-software-engineer point of view as well!)

 - Ed.

[ Parent ]



Re: Digital dump controller version 3 (3.00 / 0) (#6)
by Deron Kazmaier (deron]at[pagestream]dot[org) on Sat Aug 30th, 2008 at 03:40:50 PM MST
(User Info) http://www.dogstarkennel.com

Hi Ed,
I've been following your work (and others!) on this board. I'm more of a digital guy, and the analog/high voltage stuff is new to me (like you, at least initially. I can only aspire...). I did some work with 8051s 20+ years ago and I think the Atmel line is more to my liking than the picaxe.

Anyway, with the tower coming together for my 10ft/48v mill I would like to get my feet wet on the electronic side by building a dump controller like this one. If you have made any design changes to this, would you mind sharing them? Do you have the source posted somewhere or would you mind sharing it as well?

Sorry for the public posting, but I didn't know how else to contact you!

Thank you,

Deron

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used



Re: Digital dump controller version 3 (3.00 / 0) (#7)
by elt on Sat Aug 30th, 2008 at 08:35:15 PM MST
(User Info)

Hi Deron,

There's no changes to the circuit yet.

I think you'll love the AVRs. If you haven't found them yet, I suggest that you google WinAVR, AVR studio and Procyon AVRlib, all free. The latter includes sample code to program and access all the timers, PWM, ADC, other peripherals and lots of other stuff. Also, the chips can be programmed by connecting them to the parallel port of your PC, dicey but costs nothing more than some wire and perhaps a parallel port connector... basically you can get a totally free and unlimited dev system for next to nothing.

I'm sorry that I can't send the source. It uses a real time kernel that I can't distribute the code for. One day I may write my controls from scratch but not yet. But google and look at the "Procyon AVRLib". It has all the calls you'll need, I think you'll look at it and know just what to do.

Hope to see a story or diary from you and please feel free to respond any way you need to to contact me.

Hope that helps,

 - Ed.

[ Parent ]



Re: Digital dump controller version 3 (3.00 / 0) (#8)
by Deron Kazmaier (deron]at[pagestream]dot[org) on Sun Aug 31st, 2008 at 03:21:50 PM MST
(User Info) http://www.dogstarkennel.com

Thanks Ed!

I don't have anything yet, just trying to get my bearings. I'm going to order all the parts Tuesday. My box of parts is packed away somewhere so I am almost starting from scratch.

I'll start pouring over the products you mentioned. I've seen a few simple/cheap USB programmers and I may go with that since I don't normally run on a PC with a parallel port.

Any of the source you can share or even pseudo code is fine. If not, no worries. When I get something running without distribution restrictions I'll make it available to others.

The one things I will probably do different from the start is hooking up to a daughter board for local network connection. Actually, maybe what I will do is use serial connection for setting/getting data and a daughter board can be added that is independent of the original design. Just thinking out loud.

Sorry for the pseudo-hijack. If you would prefer I contact you off-list please send me some other way to reach you.

Thanks again!

Deron

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used
[ Parent ]



Re: Digital dump controller version 3 (3.00 / 0) (#10)
by elt on Sun Aug 31st, 2008 at 05:24:12 PM MST
(User Info)

Hi Deron,

If you're starting from ground zero, I really, really (honestly) recommend that you get an AVR Butterfly board. It costs $20 to $22 USD depending who has it in stock and you won't need anything more than a 3.3v voltage regulator and some FETS (and your software) to make a dump controller.




LCD, joystick, buzzer, temperature sensor, voltage sensor, 8 megabit dataflash and an RS232 port and, oh ya, a 16K ATMega processor.

Product page:
http://atmel.com/dyn/products/tools_card.asp?family_id=607&family_name=AVR%AE+8%2DBit+RISC+& tool_id=3146


You can use the RS232 for your app plus it has a bootloader that works over the serial port for downloading your programs; you don't need to spend anything on a programmer.

If you are going to spend money on a programmer, the "AVR Dragon" also allows on-chip debugging on chips with less than 32k flash. (But be careful not to touch components in the power section as that is a documented way to blow the board.)

Use the "check inventory" feature on the Atmel site to see who has them; Mouser currently has both in stock.

If you go the Butterfly route to make you dump controller, the strategy will be to add a resistor to extend the range of the 0-5 volt DVM so that it covers the range of your batteries and to use the PWM that drives the piezoelectric buzzer to drive your FETs. (And there's a 0R SMT that you can knock off so that you don't have to hear the buzzer buzz.)

Feel free to ask me any AVR questions but, even better, there's a whole web site of AVR freaks here -
http://www.avrfreaks.net/
It's a huge real friendly crowd but, like here, some members get testy if newbies ask questions easily found by searching...

I'll be happy to share ideas and code from scratch. I think that this is a great place to talk about programming a dump controller application (as opposed to just "programming.") Let me suggest that you first get a blinking LED going (on whatever platform you choose) and then start a dairy entry about your project. I'll hang out with you there!

 - Ed.

[ Parent ]



Re: Digital dump controller version 3 (3.00 / 0) (#9)
by Deron Kazmaier (deron]at[pagestream]dot[org) on Sun Aug 31st, 2008 at 04:17:39 PM MST
(User Info) http://www.dogstarkennel.com

I don't know that I got everything, but I do see a couple components that I don't know what they are. Can you tell me what is IC1, IC2?
How about is C7, C9?
What is D2, D3?
What do you recommend for Q1-7

Or if you wrote this somewhere and I missed just point the way! To much new info, so I may have missed it.

Off now to learn about building boards! In the good ole days, I always wire wrapped. Evidently post to post soldering is not in the cards...

Thanks again,

Deron

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used



Re: Digital dump controller version 3 (3.00 / 0) (#11)
by elt on Sun Aug 31st, 2008 at 05:47:58 PM MST
(User Info)

ic1 and ic2 are voltage regulators. The uP voltage will depend on what uP you use. You can use a 7812 for ic1. The minimum cap values vary by maker but 22uF is pretty much good for everything.

D2 and D2 are 1n5819; mostly chosen because I had them.

Q1-Q7 are stp60nf06. Nothing magic there but look in other posts about "Rdson" and how it effects how much heat is dissipated. These are 60 amp 60 volt FETs and I use a bunch so that they run cool. Two might do the job but it seems that FETs are cheaper than big heatsinks. (Little heatsinks are still needed.) Looking back, I'll find some 100v FETS the next time. These FETs work fine as long as the batteries are connected but the 24v mill might make more than 60v in a storm if the batteries aren't... it shouldn't, but it'd be nice if the dump load could handle the mill without the batteries (which clamp down the voltage.) If you have a 12 volt systems, the 60 volt parts will be fine. If you have a 48 volt system, 200v FETs would be better.

Hope that helps,
- Ed.


[ Parent ]



Digital dump controller version 3 | 11 comments (11 topical, 0 editorial)
Display: Sort:
Menu
· create account
· How to use the board
· FAQs
· search the board
· Google search the board
· Old Otherpower Board

Login
Make a new account
Username:
Password:

Total Views
  158 Scoop users have viewed this posting.

Related Links
· existing dump controller circuit
· here
· Also by elt

Powered by Scoop
You must be a registered user to post here. It's easy and free, and the link is on the upper right side of your page.
All trademarks and copyrights on this page are owned by their respective companies. Postings are owned by the poster, but may be deleted or moved at the ADMIN's sole discretion. The Rest © 2003 Forcefield.
You can Email the board ADMIN here. PLEASE include the username you signed up with!