Since all the parts are in and working, its basically just software now. Should be finished by the end of the weekend!
Arduino gun controller mk3
#51
Posted 24 March 2016 - 08:40 AM
#52
Posted 24 March 2016 - 11:40 AM
#53
Posted 24 March 2016 - 12:20 PM
Its rated to 5A 24V, and i'm only using a 1500mAh 11.1V battery yet it cooked.
Just saw this post and wanted to share:
Asuming you are using LiPo 11.1V battery, it should have a "C" rating on the label. I'm going to guess yours is somewhere around 20C continuous (some packs will have two C ratings. One is for continuous output, the other is "burst" or momentary peaks of output, like if your flywheels jam).
The maximum amps that the battery (should) be putting out is its capacity (e.g. 1500mAh) multiplied by the C rating. So a 1500mAh, 20C LiPo could put out 30,000mA aka 30Amps.
I've never seen a spec sheet for the stock stampede motor (which is a RS360PH-3560, by the way), but for comparison the RS360SH-2885 draws around 13amps at stall. The stampede motor probably draws a little more than that.
Also, I thought Blastersmiths UK sold their kit with a FET but apparently they are using a relay to control the motor. Probably because of this.
Not sure if that would work here, but it's something you could look into if need be.
Good job on all this arduino work, by the way. You understand far more than I do about electronics.
-Jwasko, STILL Sole Surviving member of Steel City Nerf and Sober Sister of the Sex Dwarves
We NERF ON all day, and FUCK OFF all night
#54
Posted 24 March 2016 - 04:07 PM
#55
Posted 24 March 2016 - 11:07 PM
Yeah the battery i'm using is rated to 20C continuous, which is why i chose it. I used to competitively race RC cars so know all about batteries, but i didnt know the specs of the motor. The h-bridge i'm using is rated to 4A, and seems to be holding up fine atm.
Will have a look and see if i can find a higher rated one.
#56
Posted 24 March 2016 - 11:41 PM
Did a bit of research, the H-Bridge i'm using is based on an L298N driver, which will do 4A and seems to be holding up so far, though the max ive run it at is 60% power.
If (or when) it cooks, i'll replace it with one based on the BTS7960B which can handle 43A. Though I'm guessing thats combined both channels, but its still 21.5A per side.
Checked ebay and they can be bought for $10-12US:
http://www.ebay.com/...fsAAOSwd4tTsNEz
#57
Posted 25 March 2016 - 03:30 AM
Good progress on it today! Firing all works now, everything as intended.
Only issue ive discovered is that when the arduino is first turned on, the control pin to the h bridge goes high while it boots. Which means it fires about 5 times when turned on.
Only way i can think of around it so far is to route that signal pin through the safety switch, so wont fire with the safety on. But means i have to remember to turn the safety on every time.
Edit: occurred to me i might be able to just put a pull down resistor on it, might do the trick.
Edit 2: Yup, pull down resistor does the trick!
Edited by Kingbob, 25 March 2016 - 06:25 AM.
#58
Posted 25 March 2016 - 08:19 AM
Yeah the battery i'm using is rated to 20C continuous, which is why i chose it. I used to competitively race RC cars so know all about batteries, but i didnt know the specs of the motor. The h-bridge i'm using is rated to 4A, and seems to be holding up fine atm.
Will have a look and see if i can find a higher rated one.
Yeah, I kinda figured you would know about the batteries but put it in there just in case.
Unfortunately not sure of exact motor specs for you but I will say that I have seen 20A microswitches regularly used on Swarmfires (which have the same motor) and they run great so if you ever do need to upgrade that 21.3A BTS7960B should work well for you.
-Jwasko, STILL Sole Surviving member of Steel City Nerf and Sober Sister of the Sex Dwarves
We NERF ON all day, and FUCK OFF all night
#59
Posted 26 March 2016 - 02:40 AM
Made great progress today, had to do some switching around of what is connected to which arduino pin since i had used all the pwm pins for non-pwm functions.
The firing mechanism and detection is all done. Got the jam door open detection and firing prevention working (decided that was necessary after it tried to eat my finger during testing). Got the single/triple/full auto firing working, and stops at 0 ammo. And buzzes to let you know you're out.
Would you believe my biggest problem now is working out where to mount the joystick???
#60
Posted 26 March 2016 - 08:50 AM
"Use the golden rule: Don't be a dick."
NERF On
-Devil
#61
Posted 26 March 2016 - 10:44 PM
I actually managed to mount it just above the magazine release switch. That way it can be reached by the trigger finger without having to change grip at all.
And, with that, mechanically and electronically its finished!
The software is 95% done, everything works, but i'm just making some tweaks to the screen layout and getting it all working just how i want it.
#62
Posted 27 March 2016 - 12:35 AM
Here is a parts list. The ebay links are just examples of the types i used.
Edited by Kingbob, 27 March 2016 - 12:41 AM.
#63
Posted 27 March 2016 - 02:10 AM
Current working complete circuit diagram.
#64
Posted 27 March 2016 - 02:53 AM
The left side of the shell, has the safety switch, and 2x hall effect sensors for magazine size detection. There is an 8pin connector to disconnect it from the other side, makes it easier to work on.
The right side of the shell. You can see all the various bits and pieces. In hindsight i'd have used a nano extension board and put it in the battery bay, would have made hooking everything up easier. The joystick isnt visible as its under the magazine release mechanism, and the voltage/current sensor is mounted flat on the bottom of the battery bay so cant really be seen.
The magazine insertion switch, and jam door switch are the existing switches in the blaster, just re-purposed.
The paint needs finishing and detailing (and stripping in the case of the trigger), but here you can see the screen and joystick. The joystick can be reached by the trigger finger.
#65
Posted 27 March 2016 - 05:53 PM
#66
Posted 27 March 2016 - 06:17 PM
Sweet work
#67
Posted 27 March 2016 - 09:06 PM
this is the most impressive thing that I can barely understand that Ive seen in awhile, looking forward to a video showing it all off. props for putting up ebay links and schematics as well as your failures that other people might get if they follow along. god damn.
trans as shit because fuck you
#68
Posted 27 March 2016 - 10:01 PM
I'll have a video up later today.
The current monitor isnt currently connected. I double checked the specs after jwasko mentioned the motor current draw, and it wont handle that much. Plus there are warnings about using it for inductive loads like motors that have rapid starts/stops. So for now its just doing the voltage.
I also need to tweak the position of the firing detection switch. When i tested it unassembled i didnt know that part of the jam door stops the plunger. I'm only out by about 1mm though, so easy fix. Might be able to get away with just bending the lever on the switch a bit.
#69
Posted 27 March 2016 - 10:10 PM
Here is a copy of the current arduino sketch
https://drive.google...iew?usp=sharing
You'll also need the following libraries:
Adafruit INA219 voltage/current monitor https://github.com/a...Adafruit_INA219
Adafruit GFX library for LCD's https://github.com/a...uit-GFX-Library
Adafruit ST7735 LCD driver https://github.com/a...-ST7735-Library
#70
Posted 28 March 2016 - 03:36 AM
A couple of clips, showing the mag size detection working, the safety switch indicator, and the jam door indicator. The screen is a bit hard to read hence the better pic below. Can see the shooting mode joystick change the mode, and the relative shooting. Regardless of shooting mode it stops at 00. Also buzzes if you pull the trigger with no ammo or if the jam door is open. Note that its not shooting at full speed, it can go faster but i'm trying not to cook the underpowered h-bridge until the new high power one arrives.
A closer view of the screen, sorry bit hard to read on the camera. The flicker is also from the camera, not the screen.
The screen layout:
- The mag number at the top shows the size of the loaded magazine regardless of the number of rounds left. Works the same as my others, uses hall effect sensors to detect a small magnet on the magazine
- "LOADED" says "INSERT" when theres no mag, or flashes "RELOAD" when its run out.
- Jam door open, obviously only displays when the jam door is open. It also prevents firing while open so I dont chop my fingers off.
- The round counter, self explanatory
- The battery voltage updates every second. ( i need to tweak the redraw slightly, the 4th digit is a bit messed)
- The current draw as mentioned above has been disabled, but i havent removed it from the screen yet
- The mode 1 3 Auto sets the firing rate. This changes to "Safety" if the safety switch is thrown, and prevents shooting. Controlled by a small joy stick.
- Pulling the trigger when the safety is on, or it has no ammo makes a buzzer sound twice.
(the screen looks better than this IRL, remember its only 1.8" diagonal)
#71
Posted 28 March 2016 - 05:59 AM
Yours has turned out amazing and I'm glad I could help and thankful you inspired to change a few things I was gonna do.
#72
Posted 28 March 2016 - 06:03 AM
Yeah i wish mine was still on one board like it was to begin with, before i zapped it. In hindsight i really would have used one of those nano expansion boards, has a 5V regulator onboard too.
Feel free to use my code, might give you some ideas, though i dont claim its perfect!
#73
Posted 28 March 2016 - 07:55 PM
oh my god the little beep beep, I love it.
trans as shit because fuck you
#74
Posted 28 March 2016 - 09:31 PM
oh my god the little beep beep, I love it.
hahaha, well i figured it should have something to tell you its out of ammo or locked or whatever in case you're not looking at the screen.
#75
Posted 31 March 2016 - 06:23 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users