Hey guys,
I'm driving a couple of 7-segment displays of a 2s lipo, in a nerf rapidstrike, with a max7219.
The blaster fires darts with two flywheel motors, and when I rev them the max7219 sometimes gets corrupted.
I have the capacitors on the max7219, and the cable for clk/load/din is 24 AWG silicone hobby wire, it's about 15-20 CM I'd estimate to the arduino.
I tried putting capacitors on the motors, and I've currently got a .1 mf ceramic capacitor between each terminal and the motor case, plus an additional .1 mf ceramic between the motor terminals, but it still happens.
I also tried adding a 47 mf, and a 470 mf electrolytic capacitor right before the motors, and it seemed to help a bit, but still happened.
Using a separate power supply for the arduino is possible, although undesirable, space is constrained, and it'd be a pain to have to maintain both batteries.
I was currently thinking about getting a LM2940CT and putting that before either the vcc line of the arduino, the max7219, or both.
Will that help, or would I be wasting my time/money.
Thank you for any advice!
>>1087864
If there's a rat's nest of wires in there, there might be some crosstalk going on that's throwing things off. Clean it up, maybe add some grounded aluminum foil as ghetto shielding.
Without a scope, only other thing I can suggest is adding some LC filtration in addition to the normal bypass cap.
>>1087879
It is a rats nest, but it doesn't corrupt unless I rev the motors, and if I use a different blaster with the same kind of motors, and rev it right next to it, it also is unaffected, so I didn't think it needed shielding.
Perhaps I need a bypass cap on the arduino battery pads also? Although I thought it already had one.
By LC filter, do you mean something like this?
http://www.ebay.com/itm/RTF-LC-FILTER-3AMP-2-4S-FPV-DC-Power-Filter-Noise-Eliminate-/131557375492?hash=item1ea16e3e04:g:qvsAAOSw~gRVpmH7
I'd just put that right before the arduino power hookup, right?
As a last resort, I can just drive the mosfets with transistors, and then run the whole thing off a separate small battery. It'd be a lot nicer to just run it all on one battery though.
I do have a waveforms DAD which has a digital oscilloscope, I can try using that.
I'd want to measure right on the motor leads, right?
It's late now, but I can try measuring it tomorrow.
Thanks for the help.
>>1087864
>The blaster fires darts with two flywheel motors, and when I rev them the max7219 sometimes gets corrupted.
maybe during revving the battery voltage dips down below your digital electronics minimum required voltage causing glitching
>>1087916
Hmm, I didn't think so, since the arduino itself didn't turn off.
My voltimeter has a max function, but not a min, so measuring that would be hard.
>>1088065
Hmm, actually, the arduino does sometimes get reset.
Would capacitors before the arduino help with that?
>>1088071
cram a few thousand uF of caps across the logic supply and see if that helps
>>1088076
How does a single 2,200 one sound?
>>1088086
its worth a shot, just make sure the rated voltage is greater than the bus voltage
>>1088088
It's rated for 25, which should be fine.
Hmm, I also just had a n-chan mosfet die, I wonder if that's from a voltage spike, or because I let it get really hot when soldering it.
It was being used to break the motor, so It was
Bat Vcc -> Pchan mosfet -> nchan mosfet D, motor -> nchan mosfet S, other motor pin -> gnd
The nchan mosfet has it's gate hooked directly to the arduino, the pchan had a transistor controlled by the arduino which connected a path to gnd.
>>1088094
Also seems like the arduino got locked up the same time the mosfet failed.
IT failed by connecting al
>>1088096
It failed by connecting all three pins together.
I'm about to hook up a capacitor before the arduino, I'm also wondering if maybe I should add a larger non ceramic capacitor and flyback diodes to the primary motors.
Would that be
bat + bat -
| |
1000 uF cap + -> - diode + -> 1000 uF cap -
| |
| motor |
Ok, putting a capacitor on the arduino seemed to help with the arduino freezing.
The display is still corrupting, but with the arduino resetting the display it's not too bad.
With the capacitor, I couldn't get the arduino to freeze with my nimh test battery, but it did freeze with the better lipo battery.
I was only holding the cap on the arduino with alligator clips though, so maybe it came loose for a second.
>>1088113
Testing a bit more, without the cap, it seems to get frozen fairly easily, with it, it's hard to freeze it.
I think I'll try two of those caps in parallel then.
Could the caps also perhaps be smoothing out spikes?
Ok, I think flyback diodes and the caps made it a lot better.
I'm not getting any crashing arduino atm.
The display does corrupted a decent amount still, but I can just reset it with the arduino on a regular basis, and live with that. As long as the mosfet doesn't die, and the arduino doesn't crash, I can live with it.
The diodes I'm using are woefulyl underpowered though, so I ordered some Schottky 15A diodes off amazon.
Right now I'm using 1N4001s for both motors, which is way over their specs.
I imagine the Schottky diodes will also conduct better, and get rid of even more surge.