Go Down

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

tinman13kup

Quote
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.
Either the mosfet is not off or you still had the divider hooked up to the arduino.
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

allanhurst

1/ Please see mods to my previous post.

2/ My divider is 6:1   , so even 24v only gives the arduino input 4v worst case.

Allan

mtraven

#32
Apr 25, 2018, 11:07 am Last Edit: Apr 25, 2018, 11:42 am by mtraven
having a bit of trouble finding an lm338, I am getting most of the components from old boards, what kind of electronics might i find one in?

also found some other chips that may be applicable:

k2611-n channel mosfet
70l02gp - n channel mosfet
uc3845, uc3843 -currentMode pwm controlers
lm339-quad comparator
edit: also have a LM3900 quad amp, could that work in place of the lm338?
im done for the night, will check back in tommorow

MarkT

The LM338 is a high current voltage regulator, the LM3900 is a quad Norton amp.  Completely different.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

mtraven

#34
Apr 25, 2018, 10:03 pm Last Edit: Apr 26, 2018, 06:28 am by mtraven
sorry, the lm338 was a typo, I meant lm358(dual op amp) as Allan had recommended. 

mtraven

so I have managed to cobble this circuit together, I have substituted an LM324n for the lm358 that is called for, data sheets looked pretty similar, is that a reasonable substitution?


this may be rather silly, but where is the control pin of the arduino connected?

allanhurst

#36
Apr 26, 2018, 01:31 pm Last Edit: Apr 26, 2018, 01:50 pm by allanhurst
1/  1/4 LM324 would be fine.

2/ Control pin? - do you mean to control the motor drive?

3/

Neither

k2611-n channel mosfet
70l02gp - n channel mosfet

are ideal.

The k2611 has a Rds on of 10 ohms - far too much.
The 70l02gp has only  25v  Vds - not enough.

Try eg a IRLZ44N or FQP30N06L

Allan

mtraven

in my original circuit, there was a digital out connected to an NPN that drove the MOSFET....thats how I was controlling the pulse width, off duty & frequency.

so the fact that I had to clarify that suggests to me you did not intend for arduino to control the pulses...does that mean this is a self oscillating circuit(I see something like a an RC circuit feeding the op amp)? Or when you said constant current, did you mean always on constant current?  I took it to mean constant current when on.  Without pulses, will it even spark / spark properly?

and hey I am learning, I had ruled out those 2 mosfets late last night for the same reasons!  probably not a big deal to an expert like yourself, but it boosts my very low confidence.  Though I still don't have the recommended mosfet. The IRF3205 I had in my original circuit has Rds=10m(omega), that's milli ohms right?  If so, that should be low enough, no?

ill search around for the 2 mosfets you just recommended, see what I can come up with.

side note:  what program did you use for those circuit diagrams?  fritzing is really pissing me off & I liked the look of your drawings.

thanks again Allan!

allanhurst

#38
Apr 27, 2018, 12:48 am Last Edit: Apr 27, 2018, 04:59 am by allanhurst
1/ The IRF3205 would be fine.

2/ By pulses I thought you had in mind a stepper motor  for which you would need  separate driver board, rather than a geared dc brushed motor drive .

 I was wrong.

 Pwm control for these would be fine.

Build it, try it and report!

good luck.

Allan

by the way, it would be handy to use a dpdt switch to reverse the motor for backing out.......

mtraven

1/ The IRF3205 would be fine.

2/ By pulses I thought you had in mind a stepper motor  for which you would need  separate driver board, rather than a geared dc brushed motor drive .
 I was wrong.
 Pwm control for these would be fine.
Build it, try it and report!
good luck.
Allan
no you had it right, I am running a stepper to control the gap, and a little stepstick driver runs it....everything to do with position control I am familiar with and have running nicely.

When I am talking about pulses now, I am referring to the power to the electrode.  In software, I was pulsing    a signal on & off to generate the sparks. and with that setup I can vary on-time & off-time to tune the circuit. In general the longer the on-time the more metal is removed, but at the expense of precision.

So I cant say I 100% understand the circuit you drew up for me, but I am a hell of a lot closer than I was when you first posted it.  So with your circuit, once the power supply is on, should I expect constant current & constant voltage.  Or is it constant current with an oscillating voltage? I ask because prior to fancy computer controlled systems, RC circuits were used to the pulse the current.  The system is simpler, but tuning the setup requires changing the R and C parameters...so its not as flexible.  I see something like an RC circuit feeding the inverting input of the op amp, but op amps are new to me so I am not sure thats what that is.

allanhurst

Don't pulse the gap supply - the spark itself will do that.


Just use my circuit. It'll be fine. Pro units do it like this.

Allan.

mtraven

i have your pretty much done, so I do intend to try it.  If it works, great, but my research indicates commercial units are either RC or Pulse machines, never always on at the gap.  Here is a site that I found useful:

http://edmtechman.com/about.cfm?pg=2&chap=3#a1

allanhurst

Hadn't seen that.

Try my basic circuit for a start.

If you'd like to add pwm to the spark current, it's a pretty easy mod.

Allan

mtraven

#43
Apr 28, 2018, 04:57 am Last Edit: Apr 28, 2018, 05:35 am by mtraven
after burning 1 of my remaining 2 mosfets attempting Allan's circuit, I had to try something more familiar.  Similar to my original circuit, I am using a digital out from the arduino to drive a 4n25 opto.  The transistor side of the opto provides 12v to the gate.  The voltage divider is done as in Allan's circuit.  The arduino has a dedicated power supply that is not directly connected to the grounds of the other( there is a common ground when the mosfet is on, as in Allan's circuit).


so right now I am testing a pwm signal from the arduino with a fan as a test load, while reading the voltage.

the whole circuit seems to be functioning exactly as I intended, however, as soon I connect the usb to the computer, I loose my PWM and the mosfet goes fully ON.  I have tried changing the cables, and tested the cables, all appears to be fine(i can program the arduino and read/write to a hard drive with the cables in question).

To make things even stranger, the output pin from the ardunio remains @ its PWM voltage...and the same can be said about the transistor side of the opto (ie gate voltage).

also worth noting, disconnecting the dedicated arduino power supply and running from USB only makes the same problems.

also, if I disconnect the ground from the voltage divider -->arduino ground....the PWM comes back, but then the ADC values just float all over the place.

and fyi, I do need the usb for control during normal operation.

please don't ask me to draw the circuit, I can't stand fritzing and that's all I have...I think the verbal description ought to be enough.

TomGeorge

Hi,

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?

Also a picture of your project so we can see your component layout?

What is your power supply and do you have  a fuse in the power supply line?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up