detecting a coil

Hello all,
i have an interesting problem.

I have an electromagnet that is pwm controlled.
This part is very easy, however. I need to because to sense when it is disconnected.

If it is connected everything is good, if it is disconnected then a i need stop sending the pwm output and raise a warning.

However i have no idea how to do this.
I first though of a current monitor, but there will be times where the pwm will be 0

dos anyone else have any good ideas…??

I believe, current sensor is only option. You have to limit low end of pwm to 1, or "ping" periodically setting higher values.

[quote author=Jason King link=topic=67002.msg492012#msg492012 date=1311103239] Hello all, i have an interesting problem.

I have an electromagnet that is pwm controlled. This part is very easy, however. I need to because to sense when it is disconnected.

If it is connected everything is good, if it is disconnected then a i need stop sending the pwm output and raise a warning.

However i have no idea how to do this. I first though of a current monitor, but there will be times where the pwm will be 0

dos anyone else have any good ideas..?? [/quote]

Kind of a strange requirement, maybe you could explain better why you need to know when the magnet circuit has been 'disconnected' and then have to remove the pwm output. Is there harm having pwm active with an open circuit?

If your requirements needed, perhaps a simple hall-effect switch or even a magnetic reed switch could be mounted on the electromagnet and you could read it as a simple digital input that the magnet is no longer generating a magnetic field?

Lefty

One way to do it would be quite tricky to set up - but the idea might be flyable (?).

Basically - measure the coil’s resistance (or some other “known” about the coil), in between the PWM pulses. This of course would require a few things - most notably your own PWM generation function. You would also need to somehow know that there isn’t any voltage “left” in the coil (ie, check only when the back-EMF from the field collapse is zero; this was also a way I was thinking you could check - monitor the back-EMF, but it doesn’t count for when PWM is zero). By measuring resistance, you might also be able to monitor for overheating issues (which would possibly change the resistance) and aging issues of the coil (depending on age and environment?). Measure it with a voltage divider, of course, but measure from “each end” (likely using two analog inputs or something similar - maybe external components) and compare the results. Likely to do this properly, the PWM and checking would all have to be done using external hardware (with comparators and such for the checks, and an external timer for PWM). You might be able to pull it off with just the Arduino, but your PWM speed will likely be fairly slow (compared to the open-loop fashion you’ve been operating at).

Just an idea, of course - maybe there’s an easier way to crack this nut…

[quote author=Jason King link=topic=67002.msg492012#msg492012 date=1311103239] I first though of a current monitor, but there will be times where the pwm will be 0 [/quote]

A resistor and a cap will smooth the PWM to something you can read as an analog voltage.

http://www.makingthings.com/wiki/analog-output

but there will be times where the pwm will be 0

So when the PWM value is zero you don't look to see if the coil is connected, when it is not you do. It's just a matter of software.

A resistor and a cap will smooth the PWM to something you can read as an analog voltage.

But how would that tell you if the coil was disconnected or not? It can't.

When the PWM value is zero you are in a "don't care" status since it is irrelevant whether the coil is connected or not. As soon as you have a PWM value greater than zero you can monitor the current and hence determine whether or not the coil is connected. Simples

WoW, thanks for all the reply's.

The electromagnet is in a rear differential for a car. 0 output is free wheel. where 100% (the coil actually saturates well before that) means the clutch is fully locked up not slip essentially turning it into a spool diff.

The Dash has a reed out for amount of lockup, so the driver would need to know if something goes wrong with the unit, not common place for them to fail, but it dos happen and you need to SIGNIFICANTLY adjust your driving style.

The PWM is mapped by a lookup table throttle vs steering angle. both aer simple 0-5 volt inputs based on a 10k pot.

The coil runs at about 150Hz, so not really that fast at all..

A shunt resistor in series with the coil would work. You would just have to look for pulse readings and as said before have a “don’t care” status for when the coil is not in use.

Mark