Info display for generator/inverter setup

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey All -

Well, I'm toying with starting yet *another* project ... We have a 12kW diesel generator here, connected to a Trace/Xantrex inverter with several large batteries. Kind of a partial house UPS.

It works great. Power goes out, and the inverter kicks in for the protected circuits cleanly - not even the computers notice it. The inverter has a 2-line LCD that I can scroll through to see the current voltages, current usage, etc, but it's not particularly friendly, not can I log stuff.

The generator has rudimentary meters - voltage, current, frequency. Analog, and jumpy as anything with the engine running. Useless really.

I want to build an information box, two actually, one for the generator and one inside with the inverter and batteries. Something with a bunch of 3 1/2 digit LCDs that will show the current status of everything. Also with an rs232 port so I can log things on a PC. Also with another port (rs485 ?) so I can pass the data between inside and the generator shed.

So, things to monitor at the gen are :

Generator volts - should be 120 or so
Generator current - should max out at around 90amps full load
Generator frequency - should be 60Hz
Coolant temp - use a sensor taped to the radiator hose or similar
Oil temp
Oil pressure

Inside would be :

Generator volts - either directly or via commo from shed
Generator current - ditto
Generator freq - ditto
Battery volts
Battery current - both into and out of the batteries
Inverter output current

I suppose I could just buy a few voltage and current panel meters off ebay, with appropriate shunts. But those would just be static displays with no logging capabilities. Besides, I would still need something for the generator ...

This should not be rocket science. Basic signal conditioning circuitry up front (isolation, opamps, etc) feeding ADC in the AVR. Multiplexed 3 1/2 digit LCD panels, maybe latches to hold their data. Will also have some outputs - engine shutdown driver for solenoid to stop engine in case of overtemp, overpressure, etc.

So, before I really start digging into this, I'm looking for opinions. On all aspects. There are things here I no idea about, for example, getting the oil pressure/temp, measuring AC amps/voltage safely.

Dean.

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I like the panel meter idea at the generator, especially if you can get to the conditioned input to the meter... the avr a/d can read all that stuff and just make it an interactive menu out the 232 to the pc. One of the menu items is 'select log params', 'select log interval' 'start log', 'stop log'. 'dump log' etc.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not sure about measuring AC volts or current. I've done some internet digging, and come up with this.

It looks like I will have to read the AC voltage at an ADC input (scaled) and watch for the peak readings for simple peak-peak measurements, or do all the calculations to generate true RMS readings. So question 1 is

(1) What is the best/safest way to interface to 120VAC for voltage and frequency measurements ?

Frequency shouldn't be too hard. Feed that same signal into a peak-detector opamp configuration and count. Simple timer stuff.

For current, it looks like an open-loop hall-effect sensor is the way to go. Get a ferrite toriod, cut a notch in it for a hall-effect sensor, and put one of the generator output conductors through it, maybe with one or two loops if they will fit. Question 2 is

(2) Ummm, what exactly do I measure here ? I know a voltage will be generated proportional to the current through the primary conductor, flicking back and forth in AC like the primary. What am I looking for ? The peak V seen, or an integration across time ?

The end result of all this will be an info panel at the generator shed. An LCD will show current measurements of all sensors, and allow you to set limits for emergency shutdown. It will also have an RS485 link back into the house for a remote display panel. Maybe RS232 for logging too.

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For AC work I'm partial to the ADE77xx chips from Analog Devices. They do all the hard work for you (RMS, etc) and are not expensive.

We do the AC voltage with dropping resistors, and the current with CTs. Analog Devices has good datasheets, app notes, & reference designs. Heck, for a 1-off you may end up cheaper to just get the appropriate demo board.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee - thanks for the pointer. The ADE7753 looks ideal, and it's only a few $$ each. The demo board is $166, which is a bit much I think.

The ADE7753 supports the Rogowski Coil method for current sense - this uses a coil of wire wrapping the toroid rather than a hall-effect sensor, but it's the same principal. Hrm - can probably use a hall-effect anyway, would just need to be calibrated.

There's a lot in the datasheet to absorb. I know I won't need all of it - I just need to extract voltage, current and freq from the chip.

Dang, too bad it's not in pdip format, could do the whole thing on veroboard then :)

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, there >>is<< a lot of stuff in those chips. They are "professional grade", suitable for energy billing. So you can tweak everything down to 1 of 24 bits, etc. Wave form analysys, limits sensing & alalrms, zero-crossing detection, missed-crossing detection, true RMS, etc. etc.

We selected ADE7754 for an industrial 3-phase app. I used the SPI interface plus the interrupt line.

We couldn't find a reliable supplier for the Rogowski coils at a decent price point, so ended up using CTs.

For just the current sensing part, go to http://www.allegromicro.com/hall... Allegro is good about samples. :)
I don't know how/if Hall devices would work for the front-end to ADE77xx.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, time to get going on this one. I've requested samples of the ADE7753 and ADE7763 - will start reading up on the datasheets this week. I had hoped to stick to pdip, but these are only available in SSOP.

I looked briefly at the Allegro current sensors, which look cool, but I don't think they can handle it. The gen max output is about 87A at 120V - we're not just using Romex here to send it to the house and inverter. Those little terminal tabs don't look like they're up for that much. Hrm, the specs state the ACS750xCA-100 is good for 100A, but doesn't specify the voltage.

When I place my next Digikey order, I'll nab a current transformer

http://rocky.digikey.com/WebLib/Amveco-Talema/Web%20Data/AC1100.pdf

This is the classic "coil around the conductor" type, so should work fine. It's pcb mount, but oh well. Anyone have a better solution than this one ?

I need some rs485 drivers as well, since there will be two stations to this project and it's about 30 meters distance to send the signals. One out with the generator, collecting local data, with a local 4x40 display, also interfacing with the shutdown relay for shutting the genset down in the event of oil temp/pressure etc going out of spec. The other is in the house with the inverter (also 4x40 lcd), showing the remote data, as well as battery current, volts, inverter output, etc.

Lee, any tips ? Anything like schematic/pcb layout fragments, code snippets, etc would be most welcome. I understand if it's proprietary though.

Let's see, will need some opamps for conditioning the temp sensors. Get a typical car radiator temp sensor for coolant, a thermistor for the shed temp. Need something for oil temp - this gen doesn't have one. I can't find a combined oil/temp sender, so I may have to put in a T fitting for both a pressure and temp sender. Hrm, I think there are drainplug replacements that are temp senders ...

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

don't know if it would help your design, but i found $5 electric meters on ebay a while ago (digital, outside of the house types)... picked one up -- IIRC it was MSP-based (TI). It used several current sensing coils, conditioning and safety circuitry... might be useful to pull apart a working model of part of what you're trying to do....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thought I would post an update, since a couple of people had emailed privately asking for more info. The bulk of the schematics are done, almost finished. The design is set up to use the same pcb for both the inside-house box and the outside-gen-shed box. It's also set up to allow one to remote-mount the LCD pretty easily, so you can put the LCD on the outside of the shed, while the main board with all the wires going to it is inside.

I'm using a Mega163-dip, which means we can move to a Mega32 for more space if necessary. The LCD is a Varitronix MDLS40466 40x4 backlit - nice and large. The enclosure is a RadioShack 270-1808 3"x8" plastic box. The LCD just fits inside, and can use the lid mounting screws to hold it down. It will need about 1mm shaved off the pcb on the left to fit perfectly - there's plenty of bare space there for shaving.

One output (OC1A) is used as a pwm control for feeding the LED backlight directly from 12V. It's a big backlight, sucking down around 180mA, and that would heat up the regulator quite a bit. Hrm, might change to a switching regulator and feed the backlight right from 5V ... That would save on the waste heat

It uses an ICL7662 charge pump to generate the -ve Vee needed for the LCD. Given that the outside LCD will see freezing temps, the contrast needs to be adjustable. Vee is fed to the LCD via a 2n3906 pnp whose base is controlled via a 10k thermistor. I don't know for certain if this will work, but there are a couple of sample schematics on the web like this, and spice shows the output Vee changing appropriately as the thermistor resistance changes.

Maxim has a cool RS232 chip, the MAX3325 in DIP28 - it has 2 transmitters, 2 receivers, and a built-in LCD temperature compensated contrast control. Pity it doesn't use an external temp sensor :( The datasheet has a lousy explanation of choosing the resistors for setting the LCD voltage. Ah well.

RxD/TxD are connected via a MAX3081 rs422 driver for commo between the inside and outside boxes. This uses an RJ11 connector. Plain old rs232 serial is provided by a MAX203, controlled via bit-banging. This will be an output only serial port, for datalogging. The MAX203 is nicer than the MAX232 in that it has internal caps, so no need for the 5 extra 1uF caps ...

Generator volts is measured with a MX536A rms to dc converter. A voltage divider (92k/3.9k) drops the 170Vp-p down to 7V for the MX536a, and it spits out a dc voltage proportional to the average rms voltage of the input. This looks to be a nice simple way. The ADE77xx chips are great, and do an incredible amount of work, but they're only available in SMD, and require more code to deal with. With the MX536a, it's just a calibrated A/D conversion.

Generator current is measured with a current transformer The particular one I have is a 2000:1 turns ratio. A 56ohm burden resistor will give a max of 2.5V for 90A in the primary - that goes to an A/D input.

The various sensors for temp and oil pressure etc are all resistive. Each one forms one leg of a voltage divider which drops it to a 0-2.5V range. These all go to A/D inputs, clamped with 4.7V zeners for safety, since an open-circuit sensor will send +12V to the A/D. Not good. To detect this, the nominal 2.5V input also goes to a comparator which compares it to 4V. If a sensor fails open-circuit, the comparator output changes, and we have a failed-sensor alarm :) Nifty.

The inside box really only has to measure the battery bank voltage and current. A couple of solder-bridge jumpers let you enable the components for doing that, and simply don't populate the ones for generator voltage/current. You can toss in a few thermistors for measuring battery temp, inverter temp if needed. That would use the same components as mentioned above, just different value resistors.

The pcb has a 2x8 header for the LCD to plug into, but the footprint is actually a 2x13. With the LCD in the main box, a 2x8 female socket is fitted, and when the LCD is remote, a 2x13 socket is put in. The extra pins carry the alarm LED, the rotary encoder signals, LCD thermistor, etc to the remote box. You can use an old printer cable (25-pin) with the ends cut off with a couple of IDC26 plugs to remote the LCD and user interface.

The pcb is designed with the smaller remote pcb on one end. When it comes back from fab, just cut it off with a hacksaw, and it's good to go. The remote pcb has a 2x8 for the LCD and a 2x13 for the connector cable. Rotary encoder, LED, etc are all in the same places as the main board, so the holes in the box are in the same place.

I've included the pcb layout below, rotated so it doesn't make the thread page wide and cumbersome.

Dean.

Attachment(s): 

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)