Arduino Airsoft Controller with Display

Have questions about a SparkFun product or board? This is the place to be.

Moderator: phalanx

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Mon Mar 05, 2012 9:51 am

fistlo, I completely missed your post, my apologies.
The kits you linked to at GMW look to be current sensing systems, similar to the Allegro breakout board that I'm using. In fact, they look to be superior to the one that I'm using, with the exception of one issue: Cost. A similar Allegro breakout board is 3.5x less than their board. Taking a look a DigiKey found similar prices, which shocked me. The ACS714 Allegro board that I bought from Pololu was under $10.

You may be right, in that I'm trying to duplicate the effects of a DC brushed motor control board. I hadn't thought about that before. I'm looking at the one I've got here, and it doesn't look like it offers current sensing (It's also a stepper motor controller). I'm going to continue mulling it over. You may have a good point, but I'd need to find cheaper parts.

I'm getting ready to start from scratch on the display/Arduino interface. I took a break yesterday and started building the Nano backpack. I grabbed almost enough parts to build multiple backpacks/shields. I forgot the female headers (can't someone come up with a better system for cutting those things??). I only have enough for one backpack, right now.
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Wed Mar 07, 2012 8:53 am

Hey, just an aside. What kind of airsoft equipment do you folks have?
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby dkulinski » Wed Mar 07, 2012 10:27 am

I'll let you know around May, when I purchase a couple AEGs for my son and I. He has a couple cheap toy airsoft guns and almost all have ceased to work after 2 months of play.
dkulinski
 
Posts: 216
Joined: Tue Apr 05, 2011 12:36 pm

Re: Arduino Airsoft Controller with Display

Postby Mee_n_Mac » Wed Mar 07, 2012 11:59 pm

StaticDet5 wrote:Hey, just an aside. What kind of airsoft equipment do you folks have?


My interest stems from trying to make a real precision target pistol. Something I could use to shoot a good approximation (~real size targets at ~the real distances) of the Steel Challengewith. Hopefully not trying to make a sows ear into a silk purse in the effort. It seems not that unlikely (though perhaps the 100' targets need to be pulled in a bit) to accomplish given what I've read at the AirSoft Trajactory Project. So many of the AS pistols aren't as concerned with accuracy as they are with trying to mimic the appearance of their real firearm counterparts (at an affordable price point). Test results of so-called accurized pistols have been mixed and I really am not "up" to spend $700+ on a AS gun. So I've selected a simple NBB CO2 pistol as a test mule. Improvements would be to first remove the trigger from the cocking action (so as to lighten the trigger) and then to better control the gas flow so as to get high repeatability (of velocity) even as the ambient temp changes and in the presence of the cool-down effect. Then it becomes a job of trying to get a consistent hopup, the biggest cause of inaccuracy. A chrony built into the gun serves, not so much to accurately measure true speed, but to precisely measure average speed so as to get some feedback (to change the gas flow/timing). Temp sensors would allow preadjustment of the velocity.

I've not settled on the best way to implement an electro-mechanical control of the gas flow/timing. The simplest method is to just emulate what an AEG does, though in my case the spring is just driving a "firing pin". The compressed gas, which is released by the pin, does all the hard work. This method would reduce trigger pull but unless I can find a way to incrementally and selectively compress the spring and then release it partly compressed, it won't help that much with the intrinsic accuracy. This release mechanism seems more a mechanical task and I'm more an electrical guy. Best method (theoretically) would be to implement a solenoid or speaker driver and smack a lightweight firing pin into the gas valve and then hold it there with sub millisecond timing, controlled by an MCU. I'm not sure this can realistically be done though it's conceptually the simplest and probably the easiest to package into the small space available. Thus an intermediate approach is my thinking ATM, whereby I use a small motor to drive a "cam" that activates the gas flow valve. Slow the timing of the motor and the gas flow last longer, yeilding a faster BB. Speed the motor up and there's less gas flowed and thus a slower BB.

And if I can really achieve a very fine control of the gas flow, I think I can change the way the hopup is done ... to get a very consistent backspin. And thereby the desired 75'-100' accuracy (a 3" grouping).

Maybe. :mrgreen:

/end_of_OT_post
Mee_n_Mac
 
Posts: 4334
Joined: Thu Apr 28, 2011 4:10 pm

Re: Arduino Airsoft Controller with Display

Postby leodi » Thu Mar 08, 2012 6:54 am

Hi,

Very interesting post, I was looking for the same project, and I found yours !

1) I'm sorry but I didn't found what ADC you choose ?
I found this : http://www.sparkfun.com/products/10643 but I don't know if the refresh rate will be efficient for an AEG
1.1) 30 amps is enougth ? (depending of the spring/motor I suppose)

2) What is the rate of fire of your testing gun ?

3) Could you share a shematic /picture of your setup ?

4) I'm not sure about the hall effect sensor (first time I heard that), you want to place a magnet on the P90 magazine to detect if the magazine is empty ?

Btw, thank you everyone for this great topic
leodi
 
Posts: 9
Joined: Thu Mar 08, 2012 6:33 am

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Fri Mar 09, 2012 1:00 pm

I can't believe we blew threw 100 posts. Wow.

First, the current sensor: http://www.pololu.com/catalog/product/1187
I'm using the ADC's on the Arduino's to convert the analog signal to a 10-bit number.
I've yet to see an AEG take more than 30amps, using a multi-meter with a peak hold function. Let me amend that: I've yet to see a HEALTHY AEG take more than 30amps. There may be surges and spikes, but I think a consistent 30amps is plenty. Case in point, my P90 mechbox seized and blew and only registered 25amps.
There are tons of people out there claiming that their AEG's push more than 30amps, routinely. I'm going to bet they're basing this off of blown fuses. Slow blow fuses are what's needed in these systems. Too often, folks are putting in "fast fuses", and wondering why they're blowing at 50 amps. The initial spike of current when the motor engages the piston can be massive, but is incredibly brief (milliseconds or less).
The breakout board that I'm using is spec'd to 5x over-current conditions, for under one second.
Even holding the trigger down, it looks like the majority of the time the gearbox is drawing less than 20amps. Granted, this was started on an indoor gun firing at less than 250fps. Now, the last round of tests included an AEG at 400+ fps (My friend can't remember the spring in it, but I'm pretty sure it's a 130).
The P-90 that I first test was around 28 rounds per second (I think), test with Audacity (I think I mentioned that earlier somewhere). I need to check the current test beds with Audacity, but I don't currently have a battery (It's on the way.... just VERY slowly).

On the very first post of this article there's a schematic. I've got a couple of pictures tossed in throughout. I've had a tough week (I'll get into that in a bit), but I don't have the originals right now. If the photos aren't there, let me know. I see them when I look at the board, but perhaps Google+ isn't letting me share pictures that way.

Originally, the Hall Effect Sensor was going to be used to determine when the gearbox had completed a firing cycle. This would then tell the Arduino to stop powering the motor during single shot operation, or increment a counter for burst fire. It became an engineering nightmare, and the parts from Pololu arrived, allowing me to look at current sensing. After poking around for a bit, I was able to resolve the times when the motor was under load. When that load ceased, I knew the gearbox had cycled, and I could turn off the power. I was working on implementing burst fire when I left the LiPo plugged into the Arduino for the weekend, ruining the battery.

However, I am still looking at using Hall Effect Sensors and magnets to identify the type of magazine in the P90 (Eventually this is all going to be built into a P90). Using rare earth/neodymium magnets, I'm going to put one magnet into each magazine that I have, all in the same place. My standard capacity magazines will only have that one magazine. My medium capacity (Mid-caps) and high capacity (High-Caps) magazines will get an additional magnet in another location. Finally, the High-Caps will get a third magnet in a third location. This will allow me to not just detect the presence of a magazine in the AEG, but also to tell what kind of magazine it is. I'll also have "admin" room to add additional magazine types in the future, all without significantly modifying the magazine or increasing the cost too much (I have a dozen magnets right now, so that helps).

Mee_n_Mac, good luck. Big time good luck.
One of my original projects was to build an electrically controlled airsoft gas rifle, for range. I ran in to too many hurdles. First was the ammo. I wanted to use custom made ammo, and that wouldn't have worked on the fields I typically played on. For my team, it would have been great, but that's about as far as that would have gone. Second was the gas control system. I found a great looking valve (good flow rate, 12v electrically controlled, max PSI of 300, etc) for $70. Then when I finally had the money, I couldn't find it anymore. Tragic. I still eyeball pneumatic control valves every once in awhile, but the issues just kept stacking up against the project.
The final issue was one that I can't fix: The sport relies on people feeling their hits and registering them. I had a really nice spring rifle that could put rounds down range. When everything was right, I could get a round to go almost 100 yards (250 feet being the longest, paced out hit on the field). I actually had "gun cam" footage of a guy being repeatedly hit, but not realizing that he was being hit. Every couple of seconds this poor guy stopped, or slapped at his clothes, or something. Seven hits over the space of a minute and a half. Maybe he was shrugging, but I'll give him the benefit of the doubt, and believe that he wasn't "feeling the hit".
Hop-up is the death of the long range shot. I used to give safety lectures on this topic (You can also find me on YouTube, talking about other safety aspects). With no wind at all, an airsoft pellet can go one hundred yards, according to physics. Hop-up doesn't really help with range (don't yell yet), it helps make the round move in a flatter trajectory, thanks to something called the Magnus Effect or Magnus Lift.
When these little BB's get out there, they're sacrificing velocity for lift. They run out of velocity, they literally fall out of the sky over an incredibly short distance. It's also really hard to see it, from the shooter's point of view (Your eye tries to "follow" the round in a flat path, but misses the sudden drop).
During this terminal "drop" period, the round is almost floating in air (it only weighs around .2grams). Wind, foliage, even a thought bubble (ok, maybe not that last one) will alter an airsoft pellet's trajectory, but during this terminal period, they're exponentially more influential.
Finally, during that terminal period, the round has almost no forward energy. Even if it does hit the target, they're going to have to be working real hard to feel it (.2gram projectile moving at under 5-10meters per second. At that speed, your clothing will stop it before it hits skin, never mind all the gear they're wearing). Couple it with the issue that these shots are fired very slowly, a couple of rounds per minute, and they're easy to write off.
If you don't believe the "terminal period" premise, go out, and have your friend shoot you (wear the safety gear!!!). It should be easy to find this friend, all of mine just line right up for the opportunity. Then go out PAST the range when they have any chance of tagging you, and start walking in as they shoot. You'll get to a spot where you can leisurely watch the rounds coming in, and fall in front of you. It stunned us when we saw it, but you don't really hear my guys saying "Call your hit" anymore.

All that being said, if you get a long range system working, PLEASE post up about it. I personally think hop-up is the devil, and learning the ballistic drop will get you where you need to go. A spin stabilized round would straighten the trajectory, but also introduces some very real safety concerns. I'll try to find my old tests and documentation, but I think they all went away in the big hard drive crash of 2010 (My computer blew a gasket DURING the backup process. Two drives entered.... none left. Twenty years of data...)

OK, progress on my end:

This week sucked. I pretty much shouldn't touch electronics. When I first injured my foot, a friend gave me an XBox, so that I would stay on the couch (I have awesome friends. Jim-Jim, if you ever read this, you saved my sanity). This week, after committing to having an XBox (I paid the fee for XBox live), I got the dreaded Red Ring Of Death.
While researching how to fix that, my laptop just stopped. No BSOD, no warnings. Full stop. THE SAME NIGHT the XBox went down.

I still tried to fix the XBox (Someone else had already cracked it open. The insides were a little comical), but to no avail.

Now we come to the current issue on the AEG Computer... I can't get this display and the Arduino to talk to each other. I can get either one to talk and respond over my desktop's terminal program, but I can't get them to recognize serial communications to each other. I've tried different baud rates, different communications methods (Decimal, Hex, etc). I've started from a clean slate three times now. Nothing.

Frustrating to say the least. If the battery gets here, I'm going to go back to the firing control system. I'm hitting a brick wall with the display, and I need to step back from it.

In the meantime, as a distraction, I built a cool "Pulse Laser" add-on. I don't really like laser sights, but a pulsed laser just looks cooler. Eventually I may give up an Arduino pin to drive one on the final build. Again, not horribly functional, but they look cool.

I'm not defeated, I'm just going to have to work on another part of the project. More updates as they come, and thanks for tuning in!
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Fri Mar 09, 2012 1:03 pm

Holy crap, that post was WAAAY too long. Sorry folks. My big apologies about the airsoft rant.
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby Mee_n_Mac » Fri Mar 09, 2012 10:36 pm

StaticDet5 wrote:I Mee_n_Mac, good luck. Big time good luck.
One of my original projects was to build an electrically controlled airsoft gas rifle, for range. I ran in to too many hurdles. First was the ammo. I wanted to use custom made ammo, and that wouldn't have worked on the fields I typically played on. For my team, it would have been great, but that's about as far as that would have gone. Second was the gas control system. I found a great looking valve (good flow rate, 12v electrically controlled, max PSI of 300, etc) for $70. Then when I finally had the money, I couldn't find it anymore. Tragic. I still eyeball pneumatic control valves every once in awhile, but the issues just kept stacking up against the project.
The final issue was one that I can't fix: The sport relies on people feeling their hits and registering them. I had a really nice spring rifle that could put rounds down range. When everything was right, I could get a round to go almost 100 yards (250 feet being the longest, paced out hit on the field). I actually had "gun cam" footage of a guy being repeatedly hit, but not realizing that he was being hit. Every couple of seconds this poor guy stopped, or slapped at his clothes, or something. Seven hits over the space of a minute and a half. Maybe he was shrugging, but I'll give him the benefit of the doubt, and believe that he wasn't "feeling the hit".
Hop-up is the death of the long range shot. I used to give safety lectures on this topic (You can also find me on YouTube, talking about other safety aspects). With no wind at all, an airsoft pellet can go one hundred yards, according to physics. Hop-up doesn't really help with range (don't yell yet), it helps make the round move in a flatter trajectory, thanks to something called the Magnus Effect or Magnus Lift.
When these little BB's get out there, they're sacrificing velocity for lift. They run out of velocity, they literally fall out of the sky over an incredibly short distance. It's also really hard to see it, from the shooter's point of view (Your eye tries to "follow" the round in a flat path, but misses the sudden drop).
During this terminal "drop" period, the round is almost floating in air (it only weighs around .2grams). Wind, foliage, even a thought bubble (ok, maybe not that last one) will alter an airsoft pellet's trajectory, but during this terminal period, they're exponentially more influential.
Finally, during that terminal period, the round has almost no forward energy. Even if it does hit the target, they're going to have to be working real hard to feel it (.2gram projectile moving at under 5-10meters per second. At that speed, your clothing will stop it before it hits skin, never mind all the gear they're wearing). Couple it with the issue that these shots are fired very slowly, a couple of rounds per minute, and they're easy to write off.
If you don't believe the "terminal period" premise, go out, and have your friend shoot you (wear the safety gear!!!). It should be easy to find this friend, all of mine just line right up for the opportunity. Then go out PAST the range when they have any chance of tagging you, and start walking in as they shoot. You'll get to a spot where you can leisurely watch the rounds coming in, and fall in front of you. It stunned us when we saw it, but you don't really hear my guys saying "Call your hit" anymore.

All that being said, if you get a long range system working, PLEASE post up about it. I personally think hop-up is the devil, and learning the ballistic drop will get you where you need to go. A spin stabilized round would straighten the trajectory, but also introduces some very real safety concerns. I'll try to find my old tests and documentation, but I think they all went away in the big hard drive crash of 2010 (My computer blew a gasket DURING the backup process. Two drives entered.... none left. Twenty years of data...)


I agree with all the above but ... I'm not looking at Airsoft for the normal (in the US) usage. My focus is as a practice tool (and for the fun of it in it's own right) for "practical" shooting, as in IPSC. There are a number of people that do that, or compete in the practical AS meets, but that number is small here. In Asia it's large, no doubt because they can't own real firearms. In my case I used to (PM, pre-marriage) go to the range every weekend and toss 500 - 1000 rounds downrange (I reloaded). I got reasonably good but having a shared range meant that resetting pins or plates was tiresome for all there. So I made an electronic set of targets. FF to now and I don't get to spend my weekends at the range, and even with my wife's passing, I doubt I'll get to spend as much time as I used to (I have a weekend place on a lake). So what to do ...

Re-spin my targets and shoot at them with AS. So I'm not looking to hit people and have them call the hit but rather do a full scale version of the kind of AS competions that are large in ... say ... Japan. But shooting at scaled down targets at just over an arms reach in distance isn't quite shooting to me. Now they do that because AS won't carry very far w/o hopup, at least w/o having to figure out how much hold over the target you need to have. This is unlike real firearms, at least at the normal handgun distances. Out to 100' the trajectory is pretty flat. 100 yards does require some lift. So to get the flat trajectory, I'd need hopup. But varying "hop" causes wider groupings so from what I have learned, the good shooters don't use it ... which is one reason the distances are so short compared to what's common in IPSC. One thing I don't want to do is train myself using AS to aim differently than what I'd do with a firearm. Thus I need to keep the hopup but try to find a way to reach out to 100' (I'd settle for 75) with reasonable accuracy. Reasonable not being what my comp guns can do but what's good enough that the target doesn't have to be too oversize ... or too close ... or that I have to aim "that" much tighter to center to score a hit.

So I need a test mule to start down the path to see what can, and can't, be reasonably done. While I've invented (in my mind) all new manners of gas valving, the reality is that I can't do that type of machining. So I do what I can and I'll see where that ends up. I do believe I can hold velocities to be no more +/-2% deviation from the expected. Then I can concentrate on how to get hop consistent. Even if I can't get to the desired end result, I may end up with a kewl toy to play with ... and one my friends kids can use at the lake and have fun while learning some of the basics of shooting and proper handling of firearms (he want's me to teach his kids). So it's a win - win no matter what.

Here's an AS version of "Smoke and Hope", one of the simplest, fastest and shortest of the Steel Challenge stages.
http://www.youtube.com/watch?v=MMwdGYlr ... re=related
These are the real steel distances.
http://steelchallenge.com/wp-content/ga ... e_hope.jpg
Do-able with a good AS pistol ? Perhaps ...
Mee_n_Mac
 
Posts: 4334
Joined: Thu Apr 28, 2011 4:10 pm

Re: Arduino Airsoft Controller with Display

Postby Mee_n_Mac » Fri Mar 09, 2012 11:01 pm

StaticDet5 wrote:Now we come to the current issue on the AEG Computer... I can't get this display and the Arduino to talk to each other. I can get either one to talk and respond over my desktop's terminal program, but I can't get them to recognize serial communications to each other. I've tried different baud rates, different communications methods (Decimal, Hex, etc). I've started from a clean slate three times now. Nothing.


But you do have your PC talking to the display ? So it's just a matter of getting the Arduino code to do the "translation" in the same manner as your PC does. Definitely can be done. First thing to understand is what's happening, exactly, when your PC talks to the display ... and visaversa. If you''ve been using a standard terminal emulation program, ie - Hyperterminal, then everything is being encoded as ASCII. My recommendation ... have too MaiTais and try again much later !
Mee_n_Mac
 
Posts: 4334
Joined: Thu Apr 28, 2011 4:10 pm

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Sat Mar 10, 2012 4:13 am

Awesome! I was really worried that I was going to go the wrong way with this, but I was leaning towards MaiTai's, I just needed someone with experience to tell me "It's Ok!"

When I first got into airsoft, I had just gotten into law enforcement. I was REALLY worried about muscle memory, cross-purposes-training, etc. They're very valid issues (in my experience).
However, there are also two competing training issues: Target shooting and stress fire situations. Nothing beats either of them for honing skills. Unfortunately, when you try to combine them (shoot houses, live fire training), your crank the risk to 11. Airsoft approaches the life fire aspect, and at least makes you think about tactical scenarios in real time.
Airsoft pistol shooting -can- help you with the short range training aspect, but I feel (personally) that you need to mix in a heavy doses of leaded training as well.
This is coming from a guy that hasn't airsofted in at least 2 years, so your mileage will definitely vary. Either way, all you have to say is "Cool Tool", and I want to see it in action.

Alright, gotta go hit breakfast with the family. I think today is my day to get distance, and look for another way to skin this cat...
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby leodi » Sat Mar 10, 2012 9:06 am

Hi,

Thank you for the answer.

This 9 pages english topic with long posts is blowing up my mind :shifty:

About the schematics and photos, it was if you have some at a more advanced stage.

I ordered my current sensor, I will do my own tests

My goal (m16A4, 25bb/s):
- step 1, motor control wit ADC
- step 2, burst
- step 3, auto if trigger pulled more than XX microsec
- step 4, bb detector for empty magazine : http://www.sparkfun.com/products/9299 in the hopup base
- step 5, infos on LCD 16x02
- step 6, infos on wireless NRF24L01 with lcd and buttons to change states, and some stuff on my arm.

good luck everyone with your projects !
leodi
 
Posts: 9
Joined: Thu Mar 08, 2012 6:33 am

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Sat Mar 10, 2012 11:26 am

That's the photo-interrupt sensor I grabbed for the barrel mounted chrony. The breakout board is nice, because it breaks everything down to just a few wires.

Mac_n_Mee suggested the "long-hold" auto-fire, and had some good ideas for that. My own tinkering suggests that it's easily do-able.

I keep going back and forth on a hop-up mounted BB detector. If it's in the feed-tube leading up to the hop-up, it will read false-positive "rounds", because the spring will press the last couple of rounds into the gun, but not necessarily feed them fully into the hop-up chamber.
If you mount the detector in the "firing chamber", you'll have the additional benefit of a "chamber indicator", but I worry about pressure leakage at that critical location. I guess I should consider it. A new hop-up isn't that expensive. Maybe I'll code it in, and add it later (The P90 is incredibly easy to change hop-ups on).

The wireless module you're looking at is pretty strong for a wrist mounted system, although looking at it, it looks like it only draws 90uA in low power mode. Have you looked at a Wixel board? I have a set here, but I haven't played with them yet. They're supposed to be very easy to use for serial transmission (says the guy that can't get a simple, wired serial system to work....)
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby leodi » Sat Mar 10, 2012 2:29 pm

1) Magazine feeding detection
Hum, for the interrupt sensor in the hopup you are right about it, it will not works : few bbs will rest in the feed-tube if the magazine is empty. And after, in the firing chamber, the isolation must be perfect, the pressure leakage will be too high.

In your setup, it looks like a silencer ?

Solution 1 : maybe a solution could be a tiny, and short range sensor : The bb is round, so we just have to check if there is any distance change.
Solution 2 : or with the interrupt sensor, (or something more thin/accurate), place the interrupt next to the border of the cylinder : it will interrupt on every "gap" formed between two bbs. Here http://www.sparkfun.com/datasheets/Comp ... HRJ00F.pdf the slit is 1.8mm, I think it's too large.

2) Long-hold
I didn't saw it in the topic (due to headache, I'm not used to read condensed things like this ^^), I will see later.

3) Wireless
Pretty strong ? For the waves ? I'm a beginner in electronic things, and At the beginning I worked with two bluetooth modules (haha), and try NRF because it as cheaper, and documented for arduino, I dind'nt looked at Wixel. So there is probably some wireless modules more adapted.
If it as about his size, it's very tiny and fits perfect on an arm.
leodi
 
Posts: 9
Joined: Thu Mar 08, 2012 6:33 am

Re: Arduino Airsoft Controller with Display

Postby StaticDet5 » Mon Mar 12, 2012 8:16 am

Right now, my plan is to sense a couple of things, with the Arduino's I/O pins. I'm planning on building this off of an Arduino Nano, so we'll run that down.
The Nano has 8 analog input pins.
One pin for a voltage sensor for battery monitoring (Speaking of which, the new battery is charging right now)
One pin for a current sensor for gearbox cycle monitoring (The sensor that tells us when the motor is pulling a heavy load or not)

We've got 14 digital pins, of which 6 provide PWM output.
Two pins are going to be left alone for the native serial communication. If used in the circuit, reading/writing to the Arduino can encounter problems.
The next two pins are going to be given over to a software serial communication with the graphics display.
One pin for the Trigger Switch
One PWM pin to control the MOSFET (This will allow us to "tune" the gun to fire faster or slower)

Six digital pins accounted for.


Right now, that's the build.
I'm going to be adding a thermal sensor to the MOSFET heatsink. That can be a digital or analog sensor, so I'm going to wait to see which has more room.
The chrony is going to take at least one pin, but probably two pins (In theory I could have two sensors wired to the same digital pin. I would just need to count the timing between two pulses. There is less potential for error correction using this methodology, and I think I'll have the extra pins). I'm using the two sensors you (leodi) mentioned (they're actually the same sensor). I have the breakout board and sensor. The gap between the sensor arms is a little bit bigger than the barrel. Nothing a little tape can't fix (for this build). Once the prototype is built and proof of concept is demonstrated, I'll find a tighter setup. With the breakout board in place, the assembly will fit down the barrel shroud.
With the barrel shroud in place (I don't like using the other term, it makes some forum owners and govermental agencies jittery), I should put on a UV tracer unit. That would take an additional pin.

Up to nine or ten of the digital pins accounted for.

I'm thinking about adding a laser sight (even though I don't like them, tactically), just because. I may also put this aside, and build a separate unit to connect to the system.

I really want to build a high intensity light system (If you've ever read Gibson's "Mona Lisa Overdrive", I want Turner's light projector) based off of an LED system for digital control. That build is probably a secondary add-on, and is going to take between 1 and 5 pins for the feature set that I want. I may just build the laser sight into the same housing.


I haven't done a lot of wireless projects, beyond home/small office networking. The nice thing about MOST WiFi is that you know the equipment already works, out of the box.
With the projects that I tend to do, in our current fashion, it's pretty RARE that the parts are doing what they should. I've been working almost everyday, for several hours each day, just to make the progress that I'm making. Trying to troubleshoot a wireless link, right now, would kill me. I'm going to build the wired components, first, then consider a wireless option. I'd love to make my display wireless and put a small HUD in the corner of my goggles. I worked on a project investigating that concept years ago, but it wasn't practical at the time (the goggle system needed to be semi-disposable, as it was going to be used in a HAZMAT environment). Now, the idea is very do-able, and wrist mounting it would make it easier from an ergonomics point-of-view.
Take a look at these screens:
http://www.4dsystems.com.au/products.php
I'm using their smaller displays (the 96 and the 160), but they have displays (With touch screen options!) all the way up to 4.3 inches. The bigger screens are over $100, with resistive touch, but that's really not a bad deal. The screens also incorporate tons of additional features (Audio port, uSD card port/support, I/O pins). When I get "flush with funds", I'm probably going to pick up one of the 4.3" displays, just for prototyping other projects.

I'll post up in a bit, when I try out dkulinski's software. I need to do a quick "project check" to make sure nothing was disturbed in the last couple of days, and then I'll get to it.
Static
StaticDet5
 
Posts: 205
Joined: Tue Oct 12, 2010 8:08 am

Re: Arduino Airsoft Controller with Display

Postby dkulinski » Mon Mar 12, 2012 10:42 am

Good luck with the new battery. Hopefully you can bump speed up to 115200 and get more samples per cycle. I think it will be interesting to see the curve you get and maybe figure out some of the quirks.
dkulinski
 
Posts: 216
Joined: Tue Apr 05, 2011 12:36 pm

PreviousNext

Return to SparkFun Product Questions

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests