Electromagnet waveform

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Looks good. I added a diode to turn off the pwm at the end and hooked it up to the +12.
How about just a dpst switch on the coil to switch it in and out.
You added a diode? Could you post an image of that so I can take a look?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Just added the diode... but I sincerely fail to understand what its function is... the waveform looks exactly the same to me. Could you please elaborate on this?

Also, look what I did with the value of R23 (the one added to U3 for hysteresis), I found a way to make it vary over time to see what its effects are like during the sim.
I also tweaked V7, to see how sensitive to variations in voltage the circuit is, and it seems like it's passing the stability test with flying colors.
And finally, I adjusted the value during time of V1 to more accurately simulate what the original waveform looks like.
 

Attachments

ronv

Joined Nov 12, 2008
3,770
Just added the diode... but I sincerely fail to understand what its function is... the waveform looks exactly the same to me. Could you please elaborate on this?

Also, look what I did with the value of R23 (the one added to U3 for hysteresis), I found a way to make it vary over time to see what its effects are like during the sim.
I also tweaked V7, to see how sensitive to variations in voltage the circuit is, and it seems like it's passing the stability test with flying colors.
And finally, I adjusted the value during time of V1 to more accurately simulate what the original waveform looks like.
Sorry, been a little busy. Seems a guard rail jumped in front of the golf cart my wife was driving. Nothing serious, just had to get it going again.

You have a square wave modulating the pwm while I just have the pwm, so you are turning it off with that while mine needs something else. I know you are trying to make it look like the scope picture and I can't explain why it doesn't, but I think you want to use the pwm to hold the current around the 3.4 amps not add an open loop signal. Perhaps you could make the layout so you could do it either way - your pwm signal or +12 to the top of the pot?
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Ron,
Good to hear from you again... glad to hear that your wife's little mishap was nothing serious.

So I finally had another chance to lay my hands on the machine again, and this time I took much finer readings than I had taken the previous time. It seems that the power cuts happening during the middle of the cycle reach negative voltage, around -10 to -12 V from what I'm seeing (green trace). The initial +120V and final -75V pulses stay have stayed the same on these new better resolution readings. Vertical divisions on the graph are 20V.
I built a small voltage subtractor circuit to compensate for the 2.5V offset that my amp sensor is delivering, and I was able to get much finer resolution on current measurement (yellow trace). Since the ammeter delivers 37mV/Amp, and the yellow trace's vertical divisions are 50mV, it means we're getting peaks of 7.3A on the initial pulses, and an average of about 3.65A during mid-cycle.
I hope this will give you a much clearer picture of what's happening there... I also hope that it doesn't change things too much, and that if it does change things too much... then I hope you don't hate me too much because of that... ha ha ha...
Anyway, I've already finished the layout and I'm going to build the thing... but I'd like to hear your comments on this new data... and if you think some changes should be made, then I'll be more than happy to implement them now... before I etch the PCB and assemble everything.
 

Attachments

Alec_t

Joined Sep 17, 2013
15,119
I still see no purpose in those four negative voltage blips towards the end of the plateau? They don't last long enough to cause the valve to close. You may have said earlier, but I'm presuming the valve is an on/off type rather than proportional?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
I still see no purpose in those four negative voltage blips towards the end of the plateau? They don't last long enough to cause the valve to close. You may have said earlier, but I'm presuming the valve is an on/off type rather than proportional?
The valve is an on/off valve, and is definitely not proportional. I'm pretty sure those negative blips are cause by the coil being shut down for a brief moment to keep heat at a minimum.
 

Alec_t

Joined Sep 17, 2013
15,119
Hmm. Would just a few % average current reduction make much difference to the coil temperature? Could the system be sensing the response to those blips to detect if the coil is actually connected and operating correctly?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Hmm. Would just a few % average current reduction make much difference to the coil temperature? Could the system be sensing the response to those blips to detect if the coil is actually connected and operating correctly?
I doubt it... my guess is that the system is carefully measuring the coil's resistance, and hence inferring its temperature... and feeding bleeps here and there to minimize power.
 

ronv

Joined Nov 12, 2008
3,770
OK, I think we got it now.
Here is what I did.
Changed R24 to 1 ohm. This puts the +12 and the +120 thru the big resistor. It also lets the coil voltage go below ground before it is clamped.
Then I moved the top of the pot to the regulated +5 so the low current didn't vary with the 12 volts.
Changed R20 to 30k to drop the high current pulse.
Changed R23 to 27K to lower the pwm frequency to be closer to your pictures.
It seems to run well with between 9 and 15 volts on the plus 12 and 90 to 150 volts on the 120 volts. This makes me wonder what voltage the 120 volt caps are. I had forgotten we generated the 120 from the 12.

PS left both voltages low in the sim.
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Hmm. Would just a few % average current reduction make much difference to the coil temperature? Could the system be sensing the response to those blips to detect if the coil is actually connected and operating correctly?
@Alec_t, I'm a fool... I think I might have dismissed your very valuable observation too soon...
The machine's computer does have the capacity to detect when the valve's been disconnected, and also if it's short circuited... so maybe you're on to something... I'm gonna give it a little bit more thought.
Thanks!
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
OK, I think we got it now.
Here is what I did.
Changed R24 to 1 ohm. This puts the +12 and the +120 thru the big resistor. It also lets the coil voltage go below ground before it is clamped.
Then I moved the top of the pot to the regulated +5 so the low current didn't vary with the 12 volts.
Changed R20 to 30k to drop the high current pulse.
Changed R23 to 27K to lower the pwm frequency to be closer to your pictures.
It seems to run well with between 9 and 15 volts on the plus 12 and 90 to 150 volts on the 120 volts. This makes me wonder what voltage the 120 volt caps are. I had forgotten we generated the 120 from the 12.

PS left both voltages low in the sim.
Yes, it's looking a lot more like the original waveform... I wonder why the sim's not able to reach the initial 120VDC peak pulse.
EDIT: but it DOES reach the 120VDC peak... you had V2 configured as a 90VDC power source... guess it's part of the testing you were doing before posting.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
I've been playing around with the new circuit for a while... and I think that maybe I'm just beginning to get it... If I adjust the 12V voltage source to just below 8.5V the waveforms begin to resemble the originals more and more...
Anyway, here's two graphs. They are both the same and were taken under the same conditions. Green trace is voltage across the coil, and the yellow one is current. Graph one represents the waveforms of the complete valve assembly. While graph #2 is the measured waveform of the coil only, that is, the coil removed from the valve. That means that the coil is not experiencing the effort of pulling the plunger up and keeping it up until the end of the cycle.
There is definitely current monitoring and control involved in the original circuit...
So, unless you have an insight or two to share with me after this new info... I think I'll get started and assemble a test driver circuit... see how it goes.
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
Odd. One graph shows 4 negative blips on the plateau, the other shows only 2?
Yup... I'm guessing the blips are activated when a threshold is reached on the current... Look at how the yellow trace very quickly increases in value and then decelerates, and after a very finely tuned value the negative blip is triggered.
 

ronv

Joined Nov 12, 2008
3,770
The one thing that still troubles me is best seen in the second picture. When the voltage is above ground it is asking for more current. So even though the current is still well above 3.6 amps the circuit is still asking for current. This signal appears to be analog in that the voltage slowly rises. It then seems like it switches to pwm and the pulses come on and off around the 3.6 amp level.
Edit:
But having said that I don't think it matters as it seems 3.6 amps is enough to hold it in.
 
Last edited:

Thread Starter

cmartinez

Joined Jan 17, 2007
8,762
The one thing that still troubles me is best seen in the second picture. When the voltage is above ground it is asking for more current. So even though the current is still well above 3.6 amps the circuit is still asking for current. This signal appears to be analog in that the voltage slowly rises. It then seems like it switches to pwm and the pulses come on and off around the 3.6 amp level.
Yeah... I'm not as electro-savyy as you are, but I've noticed that anomaly too... could it be that there's a transistor circuit trying to feed constant current to the coil? Also... if you pay close attention to the mid part of the waveform, the down notches reach almost exactly -7.5V, while the top tends to stabilize at around 5V... could it be that the supply is not 12V ?
Anyway, I've decided to tweak the PCB I've drawn to include the latest changes, and to make it as easy as possible to change components back to the previous version if needed... I'll post a pic of the PCB layout and the complete circuit when I'm done.. which I think could be by this friday. Cheers! and thanks for all your help!
 

Alec_t

Joined Sep 17, 2013
15,119
A bit late for this question, but your post #1 said "I need to replicate the way a magnet is being energized by a controller". Unless I've missed something, it's not clear why? Given that you have accesss to a machine designed to drive the valve, why the precise waveform replication being attempted here? If you simply want to use the valve other than with its original machine, won't a simple peak-and-hold drive (as used for a fuel injector) work for you?
 
Top