Im working on a little project that involves an hbridge at frequencies up to 1Mhz, im using a .01 ohm resistor for current sense, I figured id get away with just putting it on the lower half of the bridge at the connection to vss I think it'll work just fine but I wonder if I will have a problem with the frequency affecting my read, im using a opamp to amp it to a 5v range to read with a 328p, now because technically since both sides of the hbridge use the same path I should have a nearly continuous value to read(assuming resistive load I know), but does anyone see any potential problems?
I don't think that will work as both outputs of a H-drive can change polarity depending on the direction control you send to the board. Many H-drive boards already provide a current sense voltage measurement point, perhaps a link to your board will surface something on the order you could use?
Well that's partly why im asking, im making my own board with discrete mosfets and I wanna monitor the current to mainly just to make sure the wattage stays within reason and if its too high it'll shut it down asap, I wish I could attach a shematic but my phone can't do that and I don't have my laptop around, im using a regular all nchannel configuration hbridge, and instead of monitoring the output im monitoring the vss of the bridge
I figured id get away with just putting it on the lower half of the bridge at the connection to vss
That should work ok. If you look up the datasheet for the L298 h-bridge, you'll see that's what they show for measuring current.
With a .01 ohm resistor, you'll need a lot of gain in the opAmp, plus an opAmp that has 0V in its input common-mode votage range. Many CMOS opAmps should work. Also LM324 [LM358] family in bipolar devices, but you won't get a full 5V out [3V out will be plenty good].
You should use a low-pass filter between the .01 and the opAmp, say 10K feeding into 100nF or more.
Actually small mistake, just checked and its a .1 ohm resistor, my planned draw wont be more than a few amps so it will be fine and ill only need like 25x gain , but the low pass filter is a good idea, especially since the arduino can’t read a value that fast anyway
.1 ohms is no problem for a couple of amps. I use 0.25 ohms all the time with the L298.
There will be a lot of noise on the current signal, so the low-pass filter is mainly for quenching it.
Just thinking but would there be any need to protect the opamp? Normally it should be all low voltages across the resistor, but say in the case of something inductive, could it be damage by a voltage spike or would the. 1ohm resistor absorb all of that?
You'd only be at risk if the current went high enough to fuse the resistor - but since you are monitoring current you should have shutdown before that point!
Ok, that's good, I think I got a 5w 1%precision resistor so id have to draw more than 7 amps to fry that, and with even a low vdd the mosfets will burn out first,(not thatthey will since im watching that lol) now tho about that lowpass filter, how would that affect the response time?
the 4 reverse-diodes across the h-bridge outputs are there to quench inductive spikes. [you gotta have these, always].
secondly, all properly-designed h-bridges also have bypass caps and LARGE value [eg, 470 uF or higher] electrolytics across the h-bridge input power nodes. These will also be large physically.
the current sense R is so small the spikes across it will be relatively small.
the said low-pass filter will further reduce any fast spikes before they get to the opAmp.
the responsiveness of the low-pass filter can be controlled by changing the cap size.
in general, you usually don't need high responsiveness in measuring motor currents - why would you need it?
Im making my own kinda benchtop hbridge unit where the voltage and frequency can be controlled, the current monitoring is just for safety reasons to prevent fire and hopefully save the relatively (to me) expensive mosfets Those diodes would go by each of the mosfets you mean? Also I've got a 600v 4700uf cap across vss and vdd and also probably an inductor that I will make, mainly. The larger. Cap value since the vdd/vss can come from a rectified ac source
If you look at all of the "good" designs here, they show the reverse diodes on the h-bridge output. MOSFETs already have such diodes internally, so you'll probably be alright there, but some people add the externals to be safe. The diodes need to be more robust than 1N4148 or 1N400x, in general.
Umm, 4700 uF at 600V is a wopper. What the heck are you building? If you want a 100-Amp h-bridge, you're risking a lot by trying to build it yourself. For info,
In regards current responsiveness, a 10K, 100nF low-pass has a 1-msec time-constant which should be fine for almost any motor controller.
Not nearly a 100 amp lol, aiming for around 50w peak, 30w continuous(more if I bought more expensive mosfets or massive heatsinking) but designed to work from 1hz to 1Mhz from 12v to 500v, just something to play around with and mainly experience in buidling something like it would the built in diodes be able to handle the spikes without damage over time? Or is it just always better to include my own, I didn't really think of that but since im still laying out the pcb it wouldn't be too hard to add more
1hz to 1Mhz from 12v to 500v,
Oy. You might do well to go over to the Open Source Motor Controller place and talk to them.