opto sensor, microcontroller, led display

Thread Starter

akramer08

Joined Jan 23, 2013
113
I believe the max is 15 per second. I suggested measuring the balls per second earlier ONLY if we go with the 16x2 display. I figured it was something else that could take up some room on the display. But the balls per second are not an absolute must. My absolute bare minimum that I want is the ammo count. Everything else would be a bonus depending on what hardware we use, if that made any sense.
 

thatoneguy

Joined Feb 19, 2009
6,359
That is slow enough for a PICAXE to count easily.

I'd strongly suggest the Serial OLED Displays, as they are as bright as a 7 segment, more compact, and only require 1 wire. You could display any statistics you want, add a button and you could cycle through count, shots per second, total shots, shots this fill, etc... Depends on how much you want to program (which can be done with a flowchart in a PICAXE).

This means you could use an 8 pin 08M2 Picaxe, 2 I/O for sensor, 1 I/O for serial out (and power/ground for uC and LCD), and have spare for a button input. Run off 3 AAA batteries.

Going to 7 segment, you'd want to add a tinted lens over the front so the unlit digits don't glare so much, resulting in a dimmed display, in addition to 9 more wires to hook up. Batteries won't last as long, either.
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
What do you guys think the easiest way to go is.

If we go with the 3 digit ssd, I only need the ammo count.

If we go with the 16x2 display, I would like to add some more info to have on the display. Ammo count, maybe balls per second, battery level, or any other possible suggestions.

If the second option is not incredibly crazy do to, that would be awesome. If you guys think its too complicated for a newby, then I have no problem only going with the first option.
 

MMcLaren

Joined Feb 14, 2010
861
Hard to say... I like LEDs. FWIW, I just threw together an old 3 digit CC display plus three 2N3904 NPN transistors connected to a 20-pin 18F14K22 and it looks pretty nice for an old low luminosity display (below). I was thinking of adding a rotary encoder with built-in push button switch on the shaft. I thought maybe press the switch to go into edit mode, rotate the knob to set the count, followed by another press to lock in the count. When not in edit mode you could rotate the knob to change the display brightness level. Anyway, looks like you could use a 14, 18, or 20 pin PIC quite easily. Don't know about PICAXE though (sorry)...

Cheerful regards, Mike


 

Attachments

Last edited:

tshuck

Joined Oct 18, 2012
3,534
What do you guys think the easiest way to go is.

If we go with the 3 digit ssd, I only need the ammo count.

If we go with the 16x2 display, I would like to add some more info to have on the display. Ammo count, maybe balls per second, battery level, or any other possible suggestions.

If the second option is not incredibly crazy do to, that would be awesome. If you guys think its too complicated for a newby, then I have no problem only going with the first option.
I don't think it would be too much trouble. Especially, like, thatoneguy said, the flowchart thing is pretty handy...

At the very least, you could leave it for a later revision. You are kind of limiting your ability to improve later if you stick to the SSD.

I always like my battery powered devices to have a battery level display, so I don't need to poke around with some measurement tools just to realize the batteries are dead.
 

ErnieM

Joined Apr 24, 2011
8,377
Big bright easily seen LEDS have the drawback that on the battlefeild they are big bright easily seen.

LCD screens can display a wide amount of information giving your enemies time to sneak up and shoot you in the back of the head while you read it all.

Between the two, the LCD is much much easier to do.
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
Good deal. I'll go with the LCD display. How complicated would it be to add some data on the screen along with the ammo count, such as the battery level, balls per second, etc.
 

thatoneguy

Joined Feb 19, 2009
6,359
Depends on how fast you want to learn programming.

If you use the big font at end of This Video the display will be the same size as 3 7 segment displays, but in blue.

The rest of that video shows the amount of information that can be displayed.
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
Looks pretty good. If we go with the larger display, how can we measure the balls per second? Could it use the same sensor for the ammo count and balls per second if it was mounted inside the barrel?
 

thatoneguy

Joined Feb 19, 2009
6,359
That display is only 1" wide and about 9/16" tall with board, size of a quarter. 128x64 pixels to draw with (1 line of 3 characters to 8 lines of 26 characters, depending on font choice).

Most of the thread has been about the specifics of the display, the hard parts will be creating the sensor and testing different locations for mounting to see if they'll work or not. Start by just getting a beam-break sensor working that counts your finger passing, and work up from there.

There's a lot of pros/cons to consider either the PICAXE or Arduino for this project, depending on how far you want to take it, and if you are generally interested in electronics or just want to get this one project done. The Arduino library that comes with that display simplifies things a bit, but the manual is there for the commands to send to do different tasks.

If you want to get into advanced animations on the graphic display, or measure velocity, then go with the Arduino. For a basic counter, either would work. There's a lot more support and existing code around for the Arduino, but you can download the picaxe editor/programmer/simulator for free to see if you like it. Arduino doesn't have a simulator as part of the package, or a debugger, which is a downside. The upside to not having the Arduino Simulator/Debugger is all the existing libraries and code already written if you google for it.
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
That display in that video looks pretty nifty. Whats the average cost on that?

I dont mind doing either the picaxe or arduino. Whichever will be easiest and as compact as possible.

I wouldnt mind learning some programming. It looks interesting and I could see doing project every now and then. Of coarse, I would like to get this project done as soon as I can.
 

tshuck

Joined Oct 18, 2012
3,534
That display in that video looks pretty nifty. Whats the average cost on that?

I dont mind doing either the picaxe or arduino. Whichever will be easiest and as compact as possible.

I wouldnt mind learning some programming. It looks interesting and I could see doing project every now and then. Of coarse, I would like to get this project done as soon as I can.
Well, the Arduino comes on a board that is a bit bulky, you could always program the microcontroller and move it to a new board, but that requires you to make your own board, which you'll have to do using PICAXE anyway.

Looks pretty good. If we go with the larger display, how can we measure the balls per second? Could it use the same sensor for the ammo count and balls per second if it was mounted inside the barrel?
do you mean balls per second(how fast you are using balls), or feet per second (how fast the balls are traveling)? If the former, you can measure this with the same sensor you are using to count how many balls are left in the hopper, otherwise, you'll need another sensor(probably two IR emitter-detector pairs on the barrel to determine the difference in time between the ball's measured position for each of the sensors). If you use the barrel sensor, two Ir emitter-detector pairs could do all of the measurements mentioned(fire rate, fps, and remaining count).
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
I think ill do the picaxe, just for the smaller size.

I dont really need the additional info, other than ammo count of coarse and battery level if possible. I was only thinking of other things to put on the large screen. With adding additional data to display, would all the info be on the display at once, or would you have to maybe click a button to get to the next screen of data? In other words, would I be on one screen looking at the ammo counter, then hit a button and it would display fps, etc.?

Regarding the display. I have a broken camcorder laying around, but the screen works. Would it be possible to use that? Or is that a whole new can of worms? I have no problem getting a new display, just figured if I had on e laying around that would work that would be nice.
 

tshuck

Joined Oct 18, 2012
3,534
Regarding the display. I have a broken camcorder laying around, but the screen works. Would it be possible to use that? Or is that a whole new can of worms? I have no problem getting a new display, just figured if I had on e laying around that would work that would be nice.
Can of worms! Big, fat can of worms. Actually, more like a can of snakes. In short, probably more trouble than it's worth.

I dont really need the additional info, other than ammo count of coarse and battery level if possible. I was only thinking of other things to put on the large screen. With adding additional data to display, would all the info be on the display at once, or would you have to maybe click a button to get to the next screen of data? In other words, would I be on one screen looking at the ammo counter, then hit a button and it would display fps, etc.?
However you want to implement it works. It's up to you, but be aware that this may be more involved, though it could be pretty easy, depending on how you want to do it.

I think ill do the picaxe, just for the smaller size.
I'm not trying to dissuade you, believe me, I have a burning disdain for the Arduino, but the size of the microcontroller on the Arduino is the same size as the PICAXE(DIP 8/14/16/20/28/?), once you pull it out(literally, you just pull it out of its socket, no soldering required). I just don't think you should make your decision based off of data that isn't applicable...
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
A burning disdain huh? That's pretty intense, lol.

You and other posters on here have mentioned the flowchart for the picaxe. Everything Ive researched on it make it looks pretty user friendly, which I definitely need. But I have no experience with any programming(unless you count excel macros?). Whatever an experienced programmer tells me is the easiest and will accomplish what Im looking for I will do.

Is an opto sensor and the IR transmitter/detector the same thing? If they are different, which would be better for this project, keeping in mind size is a big thing.

Whichever controller is the best for this project I will gladly try to work with.

Do the 16x2 lcd only come in one size? If they come in a size that isnt a wide, is the text smaller? The only data I want to show it the ammo count and the battery level. Do I need such a wide display for only a few characters?
 

tshuck

Joined Oct 18, 2012
3,534
A burning disdain huh? That's pretty intense, lol.
I dislike when people who should know how to use a proper microcontroller use an Arduino instead. I think it's a good tool for people to learn with, but too often people are using it as their only option in embedded system design, instead of moving on to more advanced stuff. So, it isn't really the Arduino, so much as it is the way people use it.:p I recommended it here because you don't have any experience and the learning curve is pretty small...;)

You and other posters on here have mentioned the flowchart for the picaxe. Everything Ive researched on it make it looks pretty user friendly, which I definitely need.
I'm just saying size shouldn't be the deciding factor since they are the same... I think the flowcharting is a good tool.

But I have no experience with any programming(unless you count excel macros?). Whatever an experienced programmer tells me is the easiest and will accomplish what Im looking for I will do.
I'm pretty sure they're written in BASIC, right? That's programming! A small subset of it, anyway, but programming nonetheless! If so, the PICAXE uses the same language, so the learning curve is even smaller. Sounds like a good option for you...

Is an opto sensor and the IR transmitter/detector the same thing? If they are different, which would be better for this project, keeping in mind size is a big thing.
Opto sensor isn't very scientific, it means the sensor is using some form of light. An IR emitter-detector pair, depending on the application, is called a optointerruptor(this case as the balls would interrupt the beam)aka, break-beam sensor. Basically, the IR emitter will shine its light(invisible to humans) on the detector. When that light is no longer detected, it registers as a ball leaving.
Do the 16x2 lcd only come in one size? If they come in a size that isnt a wide, is the text smaller? The only data I want to show it the ammo count and the battery level. Do I need such a wide display for only a few characters?
Depends on what you display....
-------------------
| AMMO: 123 |
| BATTERY: 100% |
-------------------
Note: posting seems to have changed the formatting...
this will use almost the whole 16x2 display....
 

Thread Starter

akramer08

Joined Jan 23, 2013
113
The whole BASIC thing makes me feel a little more confident.

So I guess all the main issues are settled. IR trans./det., picaxe, 16x2 lcd.

Could you give me the specifics on what I will need for the entire project? I don't want to buy all the stuff and it turn out that they aren't compatible or the wrong sizes or anything.
 

tshuck

Joined Oct 18, 2012
3,534
The whole BASIC thing makes me feel a little more confident.

So I guess all the main issues are settled. IR trans./det., picaxe, 16x2 lcd.

Could you give me the specifics on what I will need for the entire project? I don't want to buy all the stuff and it turn out that they aren't compatible or the wrong sizes or anything.
We aren't quite there yet...

We now need to know what PICAXE is going to be used.

Really, we need to know if the device has a fixed-voltage reference module that most newer PICs have, and whether or not we have access to it from the PICAXE interface...also, we need to know if we have access to the ADC
This is so we can accurately measure the battery level. If not, we just need to add an external voltage reference and/or ADC.

Also, depending on the placement of the sensor, we may need filtering(I'd suggest it anyway, but it may not be absolutely necessary) to ensure minimal interference. So, where are you going to mount the sensor?

Did we abandon the fps / balls per second? If not, the sensor will need to go onto the barrel...
 

thatoneguy

Joined Feb 19, 2009
6,359
I also dislike Arduino, but realize they have their place. I believe in minimal capable item for task to save costs, but for general hobby, that doesn't really apply as much.

For deciding, were you looking at the 1" graphical display, or a 16x2 character display? Coding for the graphical one seems to be mostly Arduino libraries, while both are easy to write default size text to through a serial connection (TX wire on uC to RX wire on LCD, ground wire for reference).

They are about $15 each (1" Graphical OLED or 16x2 Serial LCD) to $20 each (16x2 OLED w/Serial Interface).

Different form factors are available from 8x1 (8 characters, 1 line), 0802 (8 characters, 2 lines), 16x2, 20x2 40x2 and 40x4. Then there are the 128x64 GLCD going up to 240x128 in resolution, with full color as an option, but they get expensive.

If you are only sending text characters to a character (not graphic) display, PICAXE is fine.

If you want to expand into animations, displaying more than one font size at a time on the display, etc. Go with Arduino (there is a ton of code already written to download for cool effects).

Size-Wise, An Arduino will dwarf the LCD and battery pack, while a PICAXE and display would be smaller than 3AA batteries. (using a 16x2 OLED). Think about how you want to mount the end circuit to the paintball gun. I'd suggest screws, and an enclosure that has some shock reducing features to avoid breaking the display or connections when dropped (It WILL be dropped, and abused, a LOT).

I'm a "Get Both" kind of guy, where you can see the benefits of both PICAXE and Arduino side by side, along with limitations. Total project cost: $60 getting both (without plastic windowed enclosure.) PICAXE Only - $25, Arduino Only $35. PICAXE is only higher because initial serial cable and proto board are a high NRE (Actual PICAXE Chips < $5 once cable/connections are in possession). Arduino needs only a USB cable (I'd suggest the Leonardo, most I/O and cheapest Arduino made at $25/board).

For the sourcing, search amazon for "Serial OLED", same for eBay. This one meets your request for SMALL, but it uses an I²C interface (both PICAXE and Arduino speak I²C, it's simple, just not as simple as UART)

--ETA: You'll also want a 2.5V reference voltage to compare for battery level, since the ADC (Analog to Digital) on both PICAXE and Arduino scale to supply voltage, a separate known reference (independent of supply battery) is needed to measure supply voltage.

Materials:
uC - Arduino or PICAXE
Enclosure - Clear acrylic if you are good with a heat gun (can be purchased later after prototype works)
Sensors - IR or UV LED/phototransistor pairs (if opposing team uses NV, use UV so you don't glow in dark)
button to choose display mode
proto board to move final IC (Arduino or PICAXE) to when design is complete. (can be purchased later after prototype works)
IC Socket to match final uC choice. (can be purchased later after prototype works)
Battery holder with power connector for proto board (I'd stay away from a 9V battery, suggest 3 AAs)
Assorted resistors, a few 0.1uF Multi Layer Ceramic (MLCC/Mono) capacitors, etc.
Chunk of Cat5 network cable for wire, can be found free if you know a networking guy.
Choice 2: rainbow wire with stranded core wires for interconnections (colored ribbon cable).
Soldering iron, solder.
 
Last edited:
Top