24vac valves and motors

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

I just looked at a contraption with 24v AC motors and solenoids controlled by relays. As expected, it goes mildly haywire when he turns one of these motors on or off. If it was DC, I'd put a diode across each gizmo. In an AC system? Umm. Perhaps MOVs? He just ordered some 56v MOVs from Digikey.

 

It's operate by a beaglebone running a program written in Ruby.

 

"You write in Ruby?"

 

"With your name, I figured you'd be an expert!"

 

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

Some small hints:

 

1). Use output protection on the beaglebone.

Beaglebone outputs are quite weak and not meant to have long wires hanging of of them.

Good old 74ls logic is compatible with Beaglebone I/O and it is robust and might be so slow as to keep glitches out.

 

2). Put those buffers near your Beaglebone.

3). Optocouplers are not only used for high voltage separation, you can also use them to keep excessive noise out.

4). Keep signal wires and power wires well separated.

5). Use double layers of isolation.

For example most of those cheap Relay boards from Ali / Ebay also have optocouplers to switch the relays.

 

6). Use a shielded metal box for the sensitive electronics.

7). Pay extra attention to power supply filters. Use common mode chokes & filters.

8). (splittable) ferrite beads on cables can also help somewhat.

9). Shielded cables help.

 

If your contraption is "big" you can use RS485 to talk to  some "remote" avr's which handle the heavy I/O.

 

These are all pretty general hints.

Torby wrote:
it goes mildly haywire
What does "mildy haywire" mean in your dictionary ???

 

How big are your motors and what kind of motors? Induction? Universal? ...

For an universal motor it could help to put small caps between the brushes and "earth" / GND.

 

Edit: "nose" -> "noise" :)

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Fri. Feb 2, 2018 - 12:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:
excessive nose out.
   I try to keep my nose out, but sometimes it gets in the way!  wink

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

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

Zero cross switching control.

It all starts with a mental vision.

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

KitCarlson wrote:
Zero cross switching control.
This is such a widespread and stubborn misnomer.

 

It is often not given enough thought.

Copied brainless without thinking.

I'll explain from personal experence.

Beware: Long rant about Zero Crossing circuits follow.

 

You can use a triac to switch AC loads, nothing wront with that.

Turn it on, and turn it off some time later. That's waht they are for.

If you stop putting gate current into a triac it will keep on conducting untill the CURRENT through the triac approches zero. (a few mA).

While the triac is conducting there is of course no voltage across it (Well,maybe a volt or so, but not much).

Nothing mind boggling yet.

However:

With an inductive load there is a phase shift between voltage and current.

If the phase shift is big enough the voltage ( dV/dt ) can rise very rapidly across the triac.

Under an "ideal" inductive load ( Trust me Big toroidal transformers are very inductive) the phase shift can be pretty near 90 degrees.

The voltage goes "instantly" from zero (conductive) to the line peak voltage.

This fast transient can cause enough current flow through the "gate" trhough capacitive coupling that it turns itself on again.

That's why "snubbers" are added.

Without "snubbers" triacs can behave very eratically under an inductive load.

 

Now about switching the triac on in real life situations.

I naively started with turning my transformer on near the zero crossing of the voltage.

This resulted in peak currents of more than 100A from mains. So what happened???

(Lets assume I turned the triac on on the positive going zero crossing)

The current (and magnetic field) in the transformer will keep on increasing as long as the polarity of the voltage does not change.

During "normal" operation there is still a "negative" current through the transformer at the Zero crossing of the voltage, due to the phase shift between voltage and current.

If you turn the triac on, near the Zero Crossing of the voltage however the current also starts at Zero, the triac has just turned on.

Because the normal phase shift is not there yet. the magnetic field reaches saturation before the next Zero Crossing of the voltage.

And when the magnetic core is saturated, the self inductance of the coil collapses and it is no longer able to resist the current.

This results in very high peak currents. 100A or even 200A are not an exception.

The only reasen the Mains fuses in my house didn't blow is because of the short duration of these peaks ( Wikipedia I2t)

( I've had the full 310V peak line voltage measured over a 1 Ohm shunt resistor).

(How much current there really was I do not know because of the inductive part of the shunt becomes important in those fast transients).

After about 10 to 20 cycles of the power grid the transformer finds it's balance with a normal designed phase shift.

Did you ever hear a transformer humming for a second or so just after startup? This is why.

 

All these measurements are wth a 12V 42A 600VA transformer with an open secundary winding.

If you add a bridge rectifier and Big Elco's (which act as short during startup) you have .... other effects.

(This is why they put a resistor (temporary) in series with the primary winding in big audio amplifiers).

 

The solution is also pretty simple.

You should not turn the triac on near the Zero crossing of the voltage.

You should measure the phase shift between Voltage & Current and turn the triac on at the time the Current would have been 0 during normal operation.

If you do this correctly, the transformer starts normal operation without saturation right after the triac is turned on.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

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

Just use the proper relay, be it mechanical or solid state. The technology involved is well known and established these days.

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

Paulvdh wrote:

(This is why they put a resistor (temporary) in series with the primary winding in big audio amplifiers).

Or an NTC. From Wikipedia:

"an inrush current limiter device in power supply circuits, they present a higher resistance initially, which prevents large currents from flowing at turn-on, and then heat up and become much lower resistance to allow higher current flow during normal operation. These thermistors are usually much larger than measuring type thermistors, and are purposely designed for this application."

     

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

"Mildly haywire"  When he turns a motor off, the valves snap randomly, never staying in the new position, just snapping loudly. Of course, this would goof up the operation.

 

He has a large tangle of wires and jumpers inside a box. I'm helping him clean that up.

 

He has 2 relay boards. These have a bjt circuit to drive the relay coil and an led. A home brew I2C "port expander" board with a chip plugs into a pin header and there's a long I2C bus full of wires and connectors that looks a little suspicious to me but seems to work. I added .1uF capacitors to these port expander boards and smoothed out operation a LOT. 

 

The contraption is a big stainless steel thing with pipes and valves all over. Some of the valves are operated by motor, and some by solenoid. These are all 24v AC valves. The motors are rated up to 1 amp. This is powered by a transformer from the mains. The relay boards have a bjt driver with a 10k base resistor. The emitter drives the coil and an led.

 

When he turns off one of these motors, solenoid valves randomly snap, which would goof up operation of the contraption. There are leds on the relay boards, but these don't blink then, only when the solenoids are SUPPOSED to be on. The 24v lines seem to be well separated from the I2C bus, the home made port expander boards and the beaglebone. As a test, we disconnected the port expander from one of the relay boards, and the solenoids this relay board is connected to still snap. 

 

I'm designing him a PC board shield to replace the tangle of wires and prototyping board he has now. I'm thinking it might be good to put the port expanders on the shield and run ribbon cables to the relay boards. Also put some resistors and diodes, even some schmitt triggers on the lines coming from switches on the machine instead of running these straight to beaglebone pins, just so we don't transmit transients to the beaglebone.

 

It's about as flaky as you'd expect a device made by somebody who doesn't know anything about what they are doing. Like me

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

So it seems that jou don't just have temporary glitches but that the I/O flipflops in your IC's are being upset by the glitches.

I2C is also never ment to be used on circuits that do not fit on a single PCB.

Philips has written an application note about I2Cwiring for if you want to put I2C through a IDC flatcable to the next pcb.

Some hobbyists have gotten away with longer I2C cables, but that does not make it Ok on my book.

 

Fom your desctiption I get the idea that to do it "proper" you have to throw it all out and start over.

But you might get it to work "reasonably" well with a bit of tinkering.

 

I would never have started such an application with I2C. Would have used RS485 with TVS and a remote AVR controller.

A really hacky solution is to just write the data to the I2C expander every 20ms or so.

If the I2C expander gets upset, it only will be for a short time.

 

Also the little details matter, such as the length of all wires, placement of components.

You say you have 10k base resistors. Are these near the transistors, or near the I2C expander?

Putting the I2C expander in a little  grounded aluminimum box also helps, but then make sure there are no unprotected wires coming out of the box.

For example, put the 10k resistors right on the edge of the box. or those ristor shaped inductors.

 

It's nearly impossible to give long distance advice for an ad-hoc solution for a hacked together contraption.

I probably don't even want to see a photograph of it. indecision

 

1A 24Vac motos are not so big.

I wouldn't be surprised if the switching of the relay coils themsef are the cullprit.

Do they have diodes over them?

"Snubbers" over the relay contacts can also be a part of the solution.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

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

Oops. read over this, most of my post #9 is probably garbage...

Torby wrote:
As a test, we disconnected the port expander from one of the relay boards, and the solenoids this relay board is connected to still snap.

So it's not the I2C expander.

Long parallel bundles of wire hav a mutual inductive & capacitive coupling. Noise from one gets coupled into another cable.

At least separate the signal cables from the power cables.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com