Go Down

Topic: reading voltage of an N channel mosfet (Read 11972 times) previous topic - next topic

mtraven

OP...

My method would have a constant current supply ,and a  very slow controllable feed mechanism whose speed depended on the average voltage across the gap. The bigger the volts, the faster the feed. Hence you'd get a constant gap as the hole was formed.

You can buy tungsten carbide drills down to about 300 micron - used for PCB manufacture. But very brittle.


Allan
yah I have looked at drills, one problem I run into is I would only try those drills on the lathe where everything is nicely aligned and my lathe just does spin fast enough for those tiny drills.  I could also just buy the nozzles I need, but I saw an opportunity to learn about something new so I took it..

that setup sounds very much like mine.  the(+) electrode is on a table with a 10-32 leadscrew and a microstepping stepper running 7680 steps/rev--so yah its slow as sin.

so my questions would be:
1) how would you measure that voltage across the gap (like I am with a voltage divider, or different method?)

2) how would you accomplish the constant current portion of that setup? (i have wanted to do this from the beginning but I don't know how.

allanhurst

#16
Apr 25, 2018, 03:20 am Last Edit: Apr 25, 2018, 03:22 am by allanhurst
,You circuit  won't work.

I presume the 'right hand' switch is a connection, and the 'left hand ' one the gap.


To measure the average voltage across the gap:

1/ Connect one end of the 2M2 to the gap.

2/ Other end to the 220k , and to arduino analog in.

3/ 220k to this point, other end to ground.

4/ I'd add  a capacitor eg 10uF between the gap and ground as well to smooth out the pwm and get a steady reading.

And even so this only tells you the PWM ratio of the drive ( which you know already) , nothing about the current flowing, which is the important thing.



I think my idea of a constant current feed and a variable speed drive is much better.

I'll hash out a circuit.

Allan

tinman13kup

Ok. Do you understand what I'm saying about the divider when the mosfet is turned off? It really needs reconfigured, or better yet moved off that 12V supply. The noise from the arc will play havoc with any digital signal, and with R values that high it will be messy.

What is the goal of the divider circuit? Just indication?
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

allanhurst

Something like this.

R1 has to be 10W rating.

The mosfet should be heatsunk as it might dissipate 20 watts. IRF 540?

The pot adjusts between 0 and 1A => plenty. I'd start with 100mA.

The 24v psu MUST be completely isolated from ground - note that ground is on the electrode.

The arduino measures the gap volts - choose  eg 2, and use it to drive the stepper to hold it near there.

As I remember a typical spark erosion system only uses a few volts - < 10 - so your +24 is probably well over the top and just adds dissipation. Try 12.


Allan

mtraven

,You circuit  won't work.

I presume the 'right hand' switch is a connection, and the 'left hand ' one the gap.

To measure the average voltage across the gap:
1/ Connect one end of the 2M2 to the gap.
2/ Other end to the 220k , and to arduino analog in.
3/ 220k to this point, other end to ground.
4/ I'd add  a capacitor eg 10uF between the gap and ground as well to smooth out the pwm and get a steady reading.
And even so this only tells you the PWM ratio of the drive ( which you know already) , nothing about the current flowing, which is the important thing.

I think my idea of a constant current feed and a variable speed drive is much better.
I'll hash out a circuit.
neither of the switches is a switch, just a stand in for the electrodes.

well I am very confused....I read your description and that is how I have it setup, I even tried a filter cap as you suggested.  

I am unclear how your idea differs, are you saying you would control the gap based on current? or still use voltage as a gap gauge and add a constant current method to the circuit?

I am excited to see what you sketch up, and very much appreciate your help!

mtraven

Ok. Do you understand what I'm saying about the divider when the mosfet is turned off? It really needs reconfigured, or better yet moved off that 12V supply. The noise from the arc will play havoc with any digital signal, and with R values that high it will be messy.

What is the goal of the divider circuit? Just indication?
I am trying but no i really dont understand.

how would I read that voltage & move off the 12V supply?  The R values can easily be changed, I started with smaller values & changed them when I was having problems.  and the divider is analog, not digital, but I still see your point.

the purpose of reading that voltage is to adjust the spark gap.

allanhurst

#21
Apr 25, 2018, 04:29 am Last Edit: Apr 25, 2018, 04:40 am by allanhurst
Obviously you haven't looked at my circuit yet.

But some basics.

There are 6.023 E23 atoms/ molecules in a mole.( Avagadro's number)  So that many atoms in 56 grams of iron( it's atomic mass )

To remove each atom takes 2 electrons - it comes off as Fe++.

Each electron has a charge of 1.6E-19 coulombs. ie ampere-seconds.

So to remove 56 grams of iron takes 6.023E23 x 1.6E-19 x 2 or about 193,000 coulombs (ampere-seconds).

Suppose your hole requires removing 0.1 grams of iron. That'll need 193,000/(56/0.1) or 344 coulombs, ie 1A for 344 seconds. Or 0.1A for 3440 seconds



Let's continue?

Allan

mtraven

The mosfet should be heatsunk as it might dissipate 20 watts. IRF 540?

The pot adjusts between 0 and 1A => plenty. I'd start with 100mA.

The 24v psu MUST be completely isolated from ground - note that ground is on the electrode.

The arduino measures the gap volts - choose  eg 2, and use it to drive the stepper to hold it near there.

As I remember a typical spark erosion system only uses a few volts - < 10 - so your +24 is probably well over the top and just adds dissipation. Try 12.

its gonna take me a minute to understand all that, but thanks so much!

not totally sure whats going on with the op amp, but I'll do some reading & figure it out.

what is the purpose of the zener diodes?

as for the isolation, doesn't the PSU ground get connected to the ardunio ground as soon as that mosfet turns on?

and I am using 12v--that power supply has 12 & 24 volt winding.  and yah I have seen people do it with as little as 1.5v volts off a AA battery, but I already read about commercial units that use closer to 100V...either way, id like to get it working at 12v.

I am gonna see if I can scavenge these components and build the circuit, will report results, or more likely, come back with questions


tinman13kup

Might be easier for you to test and see. Disconnect the Uno altogether, it's not needed, or at least the pin we are looking at. With the mosfet OFF, measure the voltage anywhere on that resistor divider. All points will read 12VDC. Turn the mosfet ON. You should read 12V, 1.2V, and 0V.

What is the max input level for the Uno? IIRC it's VCC +.5VDC, so roughly 5.5VDC, but it also might just be .3VDC. I don't recall as I try to keep inputs <= VCC.

What you are trying to do is doable, but it's going to be a bit more complex than what you have. Using an adjustable constant current supply would make things a little less complicated.  
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

mtraven

Obviously you haven't looked at my circuit yet.

But some basics.

There are 6.023 E23 atoms/ molecules in a mole.( Avagadro's number)  So that many atoms in 56 grams of iron( it's atomic mass )

To remove each atom takes 2 electrons - it comes off as Fe++.

Each electron has a charge of 1.6E-19 coulombs. ie ampere-seconds.

So to remove 56 grams of iron takes 6.023E23 x 1.6E-19 x 2 or about 193,000 coulombs (ampere-seconds).

Suppose your hole requires removing 0.1 grams of iron. That's 344 coulombs, or 1A for 344 seconds. Or 0.1A for 3440 seconds



Let's continue?

Allan
that I follow...math & physics I have a decent foundation with, electronics not so much

mtraven

Might be easier for you to test and see. Disconnect the Uno altogether, it's not needed, or at least the pin we are looking at. With the mosfet OFF, measure the voltage anywhere on that resistor divider. All points will read 12VDC. Turn the mosfet ON. You should read 12V, 1.2V, and 0V.

What is the max input level for the Uno? IIRC it's VCC +.5VDC, so roughly 5.5VDC, but it also might just be .3VDC. I don't recall as I try to keep inputs <= VCC.

What you are trying to do is doable, but it's going to be a bit more complex than what you have. Using an adjustable constant current supply would make things a little less complicated. 
one of the lines of the divider is ground, how would that show 12v? and the middle is the input pin, so it should NEVER be above 5.3.  But what you say about the on state is what I witness.

I don't think I have a constant current PS, so I guess its gonna have to be complicated

tinman13kup

Allan's circuit is clever in how it deals with the voltage divider. Notice how his is either an open circuit with the fet OFF, or is grounded with the fet ON. That keeps the 12V off the analog pin. As for the zeners, go ahead and read. They are easy enough to understand the basics.
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

tinman13kup

The ground path for your divider (as shown) is through the mosfet. With the mosfet OFF, you have no ground, and all points of the circuit will reach max potential--12VDC. Try and see. It's the easiest way to learn.
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

allanhurst

#28
Apr 25, 2018, 05:01 am Last Edit: Apr 25, 2018, 05:44 am by allanhurst
The left hand part of the  circuit provides a constant current.

The 5v zener provides a reference for the current - the opamp/mosfet in this configuration sets the current such that the voltage set by the pot / resistance of  R1  gives the current in amps.


The 12v zener limits the g-s voltage on the mosfet - too much and it'll be damaged.

The mosfet is never fully 'on' -  it's resistance is continually adjusted by the electronics so as to provide a constant current into the gap.

It's not very power efficient, but who cares?

Edit : Considering the very noisy nature of the spark, I reckon it's worth adding a little smoothing to the current source - see enclosed.  /Edit

Choosing the electrode as the earth point keeps everything happy - but does require a floating 24 ( or whatever voltage you choose)  as the gap power source.The work must not be grounded!

It'll work

Allan

ps On a second look I'd use a 2.5v TL431 instead of the 5v zener  ( much more accurate) , and make R1 2.5 ohms - less dissipation . But it doesn't matter much

A

pps I'd get this working first, and then if you want a more efficient power source, use a second
arduino or other electronics to implement a PWM - based or other buck convertor type constant current power supply. But one step at a time.....

A


mtraven

The ground path for your divider (as shown) is through the mosfet. With the mosfet OFF, you have no ground, and all points of the circuit will reach max potential--12VDC. Try and see. It's the easiest way to learn.
I have tried it, the largest voltage measured under any circumstances @ middle of divider is 5.2V....if it got 12V I would have fried the pin.

I am trying to gather parts for allan's circuit now, not sure I have all the comps....

and thanks allan for the description of the circuit, that's helpful.

Go Up