Some of the fancier guns have an electronic firing mechanism that can be configured to fire 1, 2, or more balls per trigger pull and/or release. The only moving parts would be hard to attach to as they are either moving very fast, or enclosed in the gun body. Of course, this is dependent of what type the OP has...Why try to use light to measure the balls?
I would just use a mechanical switch on the gun mechanism, surely there is some moving component that cycles once per ball fired?
Well, as you said, there are a number of routes you can take in terms of the controller.Tshuck your exactly right, that's why I don't really want to use a feather switch or one activated by the trigger pull. The gun I'm using does have an electronic trigger too. I believe the most accurate way to measure the shot count is by measuring the amount of paintballs leaving the barrel. I don't mind what hardware I use. I figured it would be a PIC but I have also heard of the arduino or raspberry. Whichever is easier and can accomplish my goals of using the opto sensor and a 3 digit led display. Which do you suggest.
Character LCD's are one size( I think usually 8x8 pixels?), You can define custom characters and, possibly display one big character using multiple custom ones, but the distance in between character positions might make it look odd...I think ill go with the sensor at the very bottom of the hopper.
The PICAXE sounds like the way to go, you guys make it sound a little easier.
With the character display, can you change how large the digits appear or are the one size?
You are going to but 2000 of them!?Is it more complicated to use an led display or a character display? I would like to use an led display as it looks like the size that I want, but if its way more complicated its something I can compromise on.
http://www.google.com/imgres?num=10&hl=en&tbo=d&biw=1280&bih=939&tbm=isch&tbnid=0RNTcPUn7KGa5M:&imgrefurl=http://www.diytrade.com/china/pd/9088403/3_Digit_7_Segment_LED_Display.html&docid=GyYYhhm2tY-umM&imgurl=http://img.diytrade.com/cdimg/1488638/22121130/0/1309161193/3_Digit_7_Segment_LED_Display.jpg&w=500&h=500&ei=NHYBUYt5ke-JAv7rgMAI&zoom=1&iact=hc&vpx=627&vpy=515&dur=425&hovh=225&hovw=225&tx=122&ty=107&sig=114339358555650608930&page=2&tbnh=137&tbnw=133&start=35&ndsp=42&ved=1t:429,r:39,s:0,i:209
Hmmm... I've never used the PICAXE before...didn't think the speed would have been sacrificed that much from a bare PIC...You would need 10 I/O lines for the 3 7 segment LEDs, plus 1 output and one input for the detection. That is the limit of a 14M2, but a PICAXE may not be fast enough to catch two projectiles fired < 1/20th second apart.
You may want something faster with fast hardware interrupts for timing better, and 2 more I/O + 2" spacing between sensors (if using both past end of muzzle) to determine velocity in addition to counting rounds.
The code gets a bit more complex, but since you are new to controllers, an Arduino may be a more expensive, physically larger, but more "plug and play".
PICAXE at 8Mhz runs about 500k Basic instructions per second (bootloaded OS/Interpreter). They do clock up to 32MHz, so they blow the Basic Stamp out of the water, but they aren't the optimal choice for microsecond level timing. The ability to directly use the CCP module is limited in making the chip easy to use for absolute beginners.Hmmm... I've never used the PICAXE before...didn't think the speed would have been sacrificed that much from a bare PIC...
@thatoneguy, what is the reason for the speed discrepancy?
Is the program interpreted on chip?PICAXE at 8Mhz runs about 500k Basic instructions per second (bootloaded OS/Interpreter). They do clock up to 32MHz, so they blow the Basic Stamp out of the water, but they aren't the optimal choice for microsecond level timing. The ability to directly use the CCP module is limited in making the chip easy to use for absolute beginners.
PICAXE is far cheaper and essentially zero learning curve to getting started in microcontrollers. Once that is understood, an informed choice can be made for what is needed, rather than thinking "must have 32 bits and a lot of RAM!".
Yes, but more efficiently than Basic Stamp Basic, it's not as good as native C on any platform.Is the program interpreted on chip?
If that is the case, then the Arduino might be better suited for this project as the Arduino code is compiled to native assembly.
Well, I know C is a compiled approach as opposed to the interpreted approach that the PICAXE, uses apparently. Compiled will always be faster than interpreted.Yes, but more efficiently than Basic Stamp Basic, it's not as good as native C on any platform.
The Arduino would be better for the speed requirements, and has easy to libraries for the 7 segment display and interrupts. The only downsides are cost per project and the size, unless you use the board to program, then use it out of circuit with a separate power supply and crystal.
The PICAXE advantage is very low cost (<$5) per chip, and extremely easy to get going for most projects (no crystal, no programmer needed, just a USB->RS232 cable), this project may be past the edge of speed if wanting to measure velocity or count 2 paint balls shot at the same time.
by Jake Hertz
by Duane Benson
by Jeff Child
by Aaron Carman