Jump to content


Photo

Arduino gun controller mk3


75 replies to this topic

#26 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 08 March 2016 - 07:27 AM

The little red one is the FET motor driver. Uses the PWM signal from the arduino to drive the motor directly from the battery.


  • 0

#27 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 08 March 2016 - 08:49 AM

Pwm?
  • 0

#28 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 08 March 2016 - 09:18 PM

Pulse Width Modulation. Basically a digital square wave signal with a variable frequency. Feed that to a motor via a FET and lets you control the speed by controlling the voltage through the FET.


  • 0

#29 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 09 March 2016 - 06:56 AM

OK that is what I suspected though I thought w was wave.
  • 0

#30 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 09 March 2016 - 11:15 PM

I've decided to wire in an extra switch, using the one that was the safety for the jam door.

 

Figured since the arduino will be controlling the firing, it will be possible for it to shoot 3 rounds, or full auto, with that access open. Could be hazardous to fingers, so going to add it back in as a safety, and add a box to the lcd display saying "Jam Door" or similar.


  • 0

#31 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 10 March 2016 - 06:40 AM

That's a good idea. How's the firing speed and such with the original motor?
  • 0

#32 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 12 March 2016 - 02:11 AM

SONOFAM!@#$%&*$#@#$%^&_*&)%^*$@$%!!!

 

I zapped the arduino accidentally while hooking things up. Fried it :(

 

Rebuild time.


  • 0

#33 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 12 March 2016 - 08:32 AM

At least it shouldn't be to hard to replace it, since your using a secondary board for all the connections
  • 0

#34 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 12 March 2016 - 09:13 AM

Except I'd soldered the Nano onto it.


  • 0

#35 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 13 March 2016 - 08:11 PM

Except I'd soldered the Nano onto it.

desoldered isn't hard if you don't right. Use a can of air or a earwax removal squeeze ball
  • 0

#36 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 13 March 2016 - 08:40 PM

Yeah i have a solder sucker and de-soldering braid as well, but of course i have to rip all the wiring off to get to it.

 

I've ended up just separating the boards out, makes working on it easier. I did accidentally fire it up briefly while testing the battery connection. I think it fed full voltage to the motor, must have been firing at at least 4 rounds/s. Scared the crap out of the dog!

 

Got sick of soldering/wiring though so put that aside and did some physical work cutting a hole in the shell to mount the screen etc. 


  • 0

#37 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 14 March 2016 - 03:35 AM

These look interesting for a nano. The size is about the same as a Uno, but the good part is that where each pin is broken out to the headers, they also have a +V and GND for each pin.

 

Handy when you want to connect multiple extras.

 

28858-2.jpg


  • 0

#38 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 14 March 2016 - 05:50 AM

These look interesting for a nano. The size is about the same as a Uno, but the good part is that where each pin is broken out to the headers, they also have a +V and GND for each pin.
 
Handy when you want to connect multiple extras.
 
28858-2.jpg


That'd be super useful for mods like ours, from the looks of it.
  • 0

#39 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 14 March 2016 - 06:28 AM

Assuming theres space to fit one. Wouldnt want to try and fit one in a Stryfe or a Rayven.


  • 0

#40 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 14 March 2016 - 07:54 PM

Not unless you were using a stepper motor or servo for the pusher with a really short arm so the entire back end was clear (would only work for a stryfe) and might still require going to a external battery pack.
  • 0

#41 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 15 March 2016 - 11:28 AM

These look interesting for a nano. The size is about the same as a Uno, but the good part is that where each pin is broken out to the headers, they also have a +V and GND for each pin.

 

Handy when you want to connect multiple extras.

 

28858-2.jpg

When you get this post a underside picture, cause then we can work on a schematic for making our own which could be useful for anyone using the nano, since it makes replacement easy, and if we can get it sized right might be able to make it small enough to work in any gun.


  • 0

#42 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 19 March 2016 - 04:20 AM

Right, so i got another nano wired in, tested and the screen wouldnt work. Swapped wires around and all sorts, just refused. Tested the screen on a MEGA, worked fine. Can only conclude one of the pins it uses on the nano wasnt working. So scratch that nano.

 

Grabbed the next one out of my parts box, decide i'll test the screen on it before hooking it up. Plugged it in to usb to load the sketch, wouldnt even power on. Dead as a door nail.

 

Grabbed ANOTHER nano from the box, plug it to test, and hurrah! powered on! Hooked up the screen, and works! yay! So thats 3 nanos down (those 2 plus the one i blew up). 

 

Hooked it all up, and all the switches, sensors, screen, and all that work! yay! Next step, hook up the motor and driver. As soon as i turned it on it went to full power. Did some testing and its looked like the FET had failed closed, so just sent the whole battery voltage straight to the motor. Went and got a replacement (luckily only $7 locally), tested it and seemed ok. Wired it in, and slowly started to power it up, and all of a sudden, it went straight to full power as well! Checked the FET and it was red hot! Tested and lo and behold, failed closed again. Its rated to 5A 24V, and i'm only using a 1500mAh 11.1V battery yet it cooked.

 

I'm going to order a couple of decent H bridges to use instead, so until they arrive the actual motor drive is on hold.

 

The wiring and software are there for it though, so until they get here, i'll concentrate on getting all the rest of it put together, functional, and tweaking the software to how i want it. Then just have to add the bridge when it arrives.


Edited by Kingbob, 19 March 2016 - 04:21 AM.

  • 0

#43 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 19 March 2016 - 07:47 AM

Holy crap bro, that's crazy. Hopefully a h bridge fixes the problem. Might just need to regulate the voltage with a actual voltage regulator though.
  • 0

#44 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 19 March 2016 - 10:02 AM

Its lucky i had a bunch of nano's in my parts box. Down to just 4 spares now! Though theres no reason i couldnt use a pro mini, a Uno or even a Mega would fit in the battery compartment of the Stampede.

 

A H bridge basically is a regulator. Just takes the pwm signal and outputs the proportional voltage to match. The stampede runs on 6x D cells so the motor should run on ~9V anyway, so 11.1V shouldnt be a stretch. I'm guessing the motor controller i was using was designed for an analog signal input instead of a PWM input. Basically fried the FET's input.


  • 0

#45 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 19 March 2016 - 10:09 AM

That sounds about right as to what prolly happened.
  • 0

#46 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 20 March 2016 - 06:36 AM

Found a h=bridge locally!

 

Current state:

stampede9.jpg


  • 0

#47 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 20 March 2016 - 07:55 AM

Updated version of the schematic.

 

stampedeschematic.jpg


  • 0

#48 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 21 March 2016 - 06:56 AM

Found a h=bridge locally!

 

Current state:

stampede9.jpg

 

Are you not mounting the boards in the battery tray anymore???  It looks really clean, didn't think you were keeping the mag locks installed.  What kinda switch is that back on the battery tray end {if it's a switch that is.)  

I'm concerned your access door wire getting damaged by he recoil{reset} spring on the plunger tube also, is there a way to route it underneath that??


  • 0

#49 Kingbob

Kingbob

    Member

  • Members
  • 133 posts

Posted 21 March 2016 - 07:06 AM

Nah i wasnt happy with having the tray going in and out with all the parts in a decent way. So ended up removing the rear of the tray from the main part and just used the bay instead.

 

Yes that is a switch, just a dpst, but only using one side.

 

That wire on the spring isnt fully fitted yet, was just laid on top for sizing by length. It will go underneath the spring and be glued down out of the way.


  • 0

#50 DjOnslaught

DjOnslaught

    Member

  • Members
  • 350 posts

Posted 24 March 2016 - 08:36 AM

Nah i wasnt happy with having the tray going in and out with all the parts in a decent way. So ended up removing the rear of the tray from the main part and just used the bay instead.
 
Yes that is a switch, just a dpst, but only using one side.
 
That wire on the spring isnt fully fitted yet, was just laid on top for sizing by length. It will go underneath the spring and be glued down out of the way.


The tray thing makes sense, what's the switch for power on off? It's really coming together, can't wait to see it finished
  • 0


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users