SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Mee_n_Mac
#140017
Well that's ... hmmmm ... intriguing. If the motor stalled and drew beaucoup amps, I'd have thought the fuse would blow first, the motor windings second, perhaps the battery third and your mega-amp FET last.
By StaticDet5
#140018
I just finished rebuilding the gearbox (I found a guide rod in my old box of spare parts. It won't last, but it will let me test it).

In the meantime, I also installed the Pololu -30a to 30a current sensor (http://www.pololu.com/catalog/product/1187). I wrote up some sample code, and I'll get set to test it tomorrow. I'm also going to check the motor, and also see if I can find some 20amp fuses. The fuses should be "slow blow" fuses, but I bought this gun used... I have no idea what's in there.
If the motor is binding, I'm in trouble. If the gearbox is binding... Well, I'm not sure what I can do with that. I know the Airsoft Evil Genius, but I'm not sure if he's able to troubleshoot my issue. I'll have to see.
By StaticDet5
#140020
I think I'm going to rebuild the MOSFET board as well. It's huge, unwieldy, and could incorporate additional functions. I may play around with a thermal sensor this week, and look at getting the voltage divider onto the board as well. I've got a fair amount of spaghetti across the prototype tray. I need to simply that.

With the current board installed, I may have the option of "recognizing" when the motor has stopped driving the piston (I'll have pics up, possibly tomorrow. I'd do it now, but I need to get my butt out the door for dinner with mom). If that's the case, I'm going to ditch the Hall Effect sensor for now. The engineering problems are too great, and no matter how I do it, it's going to entail modifying the gearbox/trigger assembly at the end. If I can achieve the same thing with a current sensor, this has the potential to be more of a "drop in" build.

Same thing with the potentiometer trigger. Right now, that's going to be a debacle. I'm running out of time to fiddle with this. If I can get the system firing correctly, I can work on the barrel mounted chronometer (and a couple of cool things to go with that as well). Once all that is up and running, the display will follow.

Looked up the fuse code. No wonder it didn't blow. It's a 30amp 250v (!) fuse. I would have done better to solder a piece of wire across the terminals. I replaced it with a fast blow 30amp. If that blows to quickly, I'll run out to Radio Shack... Or maybe I'll just put an order in tomorrow for some inexpensive fuses....
By StaticDet5
#140042
Blew out another MOSFET this morning. I can see bare copper on the board. I've got one 3205 MOSFET left. I'm thinking of looking at getting 10 beefier MOSFETs. Then I run into the issue of cost. GRRRR

On the flip side, I've got two donated guns that I just tested with a stock firing circuit. They both turn over with no problems. I may be able to just "inline" the circuit, and tape the trigger down for testing. As long as I'm not making and breaking the trigger circuit, it should act as a contiguous circuit path, no risk of arcing or bizarre fluctuations.

OK, an issue for the great minds here.
http://www.airsoftmechanics.com/images/ ... _final.jpg
What are the functions of these resistors? More specifically, are these values correct for a max 20v load at 20amps? If I'm reading the schematic correctly, this is on the "low current" side, so it shouldn't matter (too much) what wattage the resistors are rated for, correct?

When I redo the MOSFET board, I'm going to be building it from scratch (instead of using Sparkfun's). I'm trying to make sure I've got a better understanding of it.
By Mee_n_Mac
#140048
StaticDet5 wrote:http://www.airsoftmechanics.com/images/ ... _final.jpg
What are the functions of these resistors? More specifically, are these values correct for a max 20v load at 20amps? If I'm reading the schematic correctly, this is on the "low current" side, so it shouldn't matter (too much) what wattage the resistors are rated for, correct?

When I redo the MOSFET board, I'm going to be building it from scratch (instead of using Sparkfun's). I'm trying to make sure I've got a better understanding of it.
The resistor from the gate to the the source is there primarily to prevent false triggering on rapid changes in voltage across the FET (drain to source). The value isn't super critical, the 10k that's on the SF board should be OK. The resistor that's in series with the gate is there to tame any ringing on the wire running from the "driver" (in your case an Arduino) to the FET's gate. I don't think it's value is critical in your application as you aren't switching the gate on and off rapidly. Anything in the 10's of ohms to low hundreds of ohms will work. I'd also say, in your case, no resisitor is really needed.

In both cases because the current through the resistors is small, they can be low wattage devices. Standard 0.1 W resisitors are more than enough.

I'm going to look at the FET you're using to see if there's some obvious reason it's blowing.

The pic that doesn't seem to display in my prior post should be below. Do you have some "protection" diode or circuit across the motor as shown in it ?
FET_motor_circuit.gif
You do not have the required permissions to view the files attached to this post.
By StaticDet5
#140057
I have both a diode and a capacitor across the motor (in parallel). No resistor inline with the diode. I didn't think of that. I have no idea the rating of the diode, other than the leads are bigger around than the resistor that came with the MOSFET breakout board.
I need to think about that, if I'm going to order more parts.

I keep going back and forth on putting the last MOSFET back on the board. I think I may just give it a shot, and at least see if I can get some good readings from an AEG that is proven to work.

Right now, I'm going to have some wine, and look at this circuit diagram from folks who have "blazed this trail"...

http://extreme-fire.com/SW-COMPUTER/SW- ... -Schem.jpg
By StaticDet5
#140094
Some of the MOSFET conversions advertise an "active braking" component. Is that the second MOSFET with the opposite appearing gate (I'm guessing a P-Channel MOSFET)?

It probably is a braking circuit. But how do they know when to brake? I don't see anything in the schematic that could tell you what's going on in the gearbox.
UNLESS! Unless PB2/ADC1 (I'm betting ADC1 is Analog to Digital 1) measures.... something. It looks to me like it would only measure voltage. Is voltage going to change through the firing cycle?

For what it's worth, I've pulled their code and emailed the designer. I don't know if he'd want to give hints on this.

It's really hard for the sailor in me not to start swearing at moments like this. I'm so close...

I grabbed some terminal blocks from Radio Shack today. I'm going to build a big, blocky prototype system on a piece of 1x6. It will keep things organized, and give me a little more fun if everything catches on fire...
By Mee_n_Mac
#140097
StaticDet5 wrote:Some of the MOSFET conversions advertise an "active braking" component. Is that the second MOSFET with the opposite appearing gate (I'm guessing a P-Channel MOSFET)?
You're correct that Q2 is a P-chan MOSFET. When turned on it'll apply a pretty hard short across the motor. The motor, since it and the gear train have mass, has inertia. Even when the power is turned off (via Q1) it'll keep spinning until friction and the energy needed to compress the spring stop it (which I'd have guessed would have been sufficient). A motor (w/o power) and spinning makes it a generator. It'll produce a voltage at it's terminals. Any electrical load at those terminal will dissapate energy which comes from the inertia in the system. A big load, like a short circuit, "steals" that energy very quickly and so brakes the motor (and gearbox). I'm just surprised it's deemed necessary.
Looking at the circuit the brake can only be on for a short time, perhaps 0.3 secs or less. I guess that's long enough to do the job.
StaticDet5 wrote:It probably is a braking circuit. But how do they know when to brake? I don't see anything in the schematic that could tell you what's going on in the gearbox. UNLESS! Unless PB2/ADC1 (I'm betting ADC1 is Analog to Digital 1) measures.... something. It looks to me like it would only measure voltage. Is voltage going to change through the firing cycle?
Well obviously the brakes would be slammed on only after Q1 has been turned off (otherwise you'd place a short across the battery terminals and that would be baaaaaaaaaad !). So they might just apply the brake some short period of time after they turn off Q1 and be done with it. But I think you're thinking they brake to stop the gearbox at a good point, when the spring is relaxed. I don't know how they'd know that. I'm not sure what purpose(s) the R5/R6/C5/PB1 circuit does. With the motor off and stopped, it'll measure the batt voltage but that's an odd place to put it. Besides they already can do that via the trigger circuit so why bother to do it again ? With the motor on and running, Q1 should be shorting that - motor terminal to ground very effectively. The R5/R6 voltage divider would further reduce any small voltage present. I might guess there would be some spikes there as the motor turns but that would be indicative of the brushes making/breaking contact. I don't see how that would be useful. I guess it might be a failsafe ... to know that the motor has been turned off when commanded ? Or that the brake "engaged" ? But of what practical use would this be ? It'll already be obvious to the person and the MCU controller can't do more than it already has (command Q1 off, perhaps Q2 on). Got me on this. A peek at the source code might illuminate the thinking behind this circuit.
StaticDet5 wrote:For what it's worth, I've pulled their code and emailed the designer. I don't know if he'd want to give hints on this.
Probably not but no harm in asking. Perhaps ask if the controller intelligently parks the gearbox to save the spring. Right now I'll guess it does not.
StaticDet5 wrote:It's really hard for the sailor in me not to start swearing at moments like this. I'm so close... I grabbed some terminal blocks from Radio Shack today. I'm going to build a big, blocky prototype system on a piece of 1x6. It will keep things organized, and give me a little more fun if everything catches on fire...
So just take it in pieces, implement the easy and needed functions first and add in the neat and not-strictly-needed stuff afterwards. RIght now I'm more puzzled by how you've managed to smoke 2 of your FETs. There's nothing, obvious to me, that you've done wrong. Look at the basic circuit used by those guys, it's the same as you have now. Do you have an DMM/ohmeter ? If so measure the DC resistance across the motor + and - terminals with everything else disconnected. Perhaps rotate the motor so you have that measurement for several of the coils. This should be the limiting resistance in the motor drive circuit. It might be smaller (< 1 ohm) than your DMM can measure though.
By StaticDet5
#140098
THERE IS NOTHING NEW UNDER THE SUN!!!
http://forums.airsoftmechanics.com/inde ... pic=5450.0
Again, I'm swearing like a sailor.

So it turns out that someone else is working on this EXACT same project.

The gentleman from ExtremeFire did get back to me this afternoon, and sent me several links to Airsoft Mechanics.
http://forums.airsoftmechanics.com/inde ... pic=5459.0

The good news: The problems I'm working on have (largely) been addressed before.

The bad news: It looks like ExtremeFire's tech is strictly done through timers. I don't think that's an optimal solution. If the timing is not just right, the gearbox will stop in the wrong place. Further, if the timing is slightly off, the errors will build over time (these AEG's are fired hundreds to thousands of times in a game).

I'm taking a break tonight. Tomorrow morning starts physical therapy. When I get home from that, I'm building the jig for the last remaining MOSFET. I'm going to plan on testing it the day after tomorrow, so that I take the time to lay things out correctly.

It looks like the ExtremeFire group has had problems with mechanical debounce. I may be able to help them with that. However, they also seem to think that electrical noise is going to be an issue for the Arduino processor. That worries me.

I'm going to dive into their code more tonight. It's long.
By StaticDet5
#140132
Real quick, Mee_n_Mac, in your diagram, how important is D1? I don't have a diode from source to drain.
Looking at the IRF3205 schematic, it looks like one is included, but I want to be sure I'm not missing something.
By Mee_n_Mac
#140141
StaticDet5 wrote:Real quick, Mee_n_Mac, in your diagram, how important is D1? I don't have a diode from source to drain.
Looking at the IRF3205 schematic, it looks like one is included, but I want to be sure I'm not missing something.
The device you're using has the equivalent already incorporated. If you have a spare diode to put across the FET it won't hurt your application.
By StaticDet5
#140175
Success!!!

I skipped the diode, and also went with an "Inline" circuit design so that I could just "drop it in" to an existing AEG. I picked a G36, just because. This will not be good for a prototype "field build", as there is very little room in the system (I can't even fit my LiPo battery into it).

I just tested the system, and the gearbox is drawing between 12.45 amps and 21.88 amps during the firing cycle (Outside of the firing cycle, the system says it is drawing -0.30 to -0.56 amps... I think I need to tweak my equation). The voltage ranges from 11.48 to 11.83 volts during the firing cycle (it's 12.51-12.55 volts outside of the firing cycle).

I did a pretty long 30 round burst, and got some amperage readings during the burst down below 5amps. I don't have enough resolution in the serial monitor to see if this corresponds to the end of the gearbox cycle (when the motor is unencumbered by the compression spring). It seems logical, but I'm trying to figure out a way to test that. I've got an idea that I'm going to give a shot, before breaking for the day.

Right now, I'm doing a stability test of the system. It's just cruising along on the opposite table. I want to make sure the basic build is safe to leave up.

Finally, even during the extended bursts, the MOSFET didn't heat up appreciably. I think my previous rig had problems, or using the breakout board was the issue. The breakout board was certainly not rated for the amps I was pushing through it.
By Mee_n_Mac
#140177
Sounds goood !! What kind of cyclic rate does this AEG have ? I'd expect to see the motor current vary from some small (perhaps unmeasurable) DC value and spike up rapidly when the spring starts to compress. Then the value would ramp up as the spring compresses and eventually drop back to that small value when the spring releases.

ps - It occured to me that the mystery R5/R6/C5/PB1 circuit (in the Extreme controller) might be to detect a blown motor fuse. If the battery voltage isn't detected at PB1 when the motor isn't running, then the motor or fuse is blown. That detection might be worth doing and letting the operator know "what's up" so as to eliminate other failure-to-fire causes. It also occurs to me that your chrony detectors would be a good way to detect an empty magazine (or some feed failure).
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 32