Anti-Chop Eye Detection Methods ZDSPB.com > Tech index > Anti-Chop Eye Tech > Detection methods

This page highlights some of the programming concepts used when creating an anti-chop eye detection system.
Electronics and/or programming knowledge of any kind is recommended for this article, but not necessarily required. Again, I try to keep things simple but it can be difficult to do. If you have questions then I'd be happy to answer.

Eye Signal States & Detection Threshold:
As described above, the microcontroller on the circuit board (aka. MCU) is set up to receive a signal from the detector eye, telling it whether a ball is loaded or not loaded. The state of a ball being loaded or not loaded is inherently a digital occurrence. In other words, it's either on or off, one or zero, loaded or not (alternately, a marker won't let you fire if the ball is "maybe loaded", that makes no sense). The technology is designed to replicate this, however it goes about it one of two possible ways. The difference is how the microcontroller is programmed to recognize the eye signal.

Here's a synopsis of the microcontroller's eye detection programming and methodology. The signal from the detector eye to the microcontroller is called the eye sense, and it's tied into the MCU by one of the MCU's inputs. The MCU can be programmed to "check" the eye sense at any time, to see if it's on or off. Typically, the on-state means there is a noticeable supply of voltage being sent to the input, which in this case is coming from the detector. If the input is currently in the off-state, it means little to no voltage is being conducted. The actual qualities of being on or off are factors that allow some variance, and this is the origin of being analog or digital.

The eye sense itself will depend on the amount of light being received by the detector. For instance, in a reflective type-1 circuit, the detector may see these types of voltage levels at the eye sense:

Ball distance
from detector:
Eye sense
voltage:
1-cm (10-mm) 0-v
9-mm 0-v
8-mm 0.2-v
7-mm 0.6-v
6-mm 1-v
5-mm 1.2-v
4-mm 1.6-v
3-mm 2-v
2-mm 2.5-v
1-mm 3-v
The point here is that the eye's detection voltage increases as the ball gets closer and closer to the detector. The detector can't even pick it up until it reaches the 8-mm point. but the main underlying concept is that different situations can produce different detection voltages, so the microcontroller has to be programmed for what to consider loaded and what not loaded, and therein is the difference between analog and digital.

Most markers function using a digital circuit. In a digital circuit, the voltage directly relates to the choice between "on or off". As mentioned, this means the eye sense is either high or low, so it's either conducting little/no voltage, or it's conducting a positive[noticeable] amount of voltage. Example numbers would be between 0-0.5 volts when low, or 2.5-5 volts when high. The exact voltage depends on the circuit design, eye components, the amount of light being received, and other variables (although the main variables are the shell color/texture and the eye components).
The reason digital is a more common programming method is due to the fact that most microcontrollers already have a method for deciding if the input is high or low. This means, when programming the MCU, you simply tell it to "check the eye sense" then the MCU straight up tells you if it's high or low, which basically means "the ball is loaded" or "the ball is not loaded". The MCU does all the thinking for you, so all that's left is to tell it what to do next (either loop and wait for a ball to be loaded, or go ahead and fire the solenoid).
For illustration, here's a brief example of the code using assembly language. It shows how simple this section of the firing program actually is.

loop ; Return to this point if no ball is loaded.
btfss EYESENSE ; Check the eye sense, skip the next line if it's high (no ball loaded)
goto FIRE_SUBROUTINE ; If the eye sense is low (ball loaded) goto the subroutine "FIRE" and energize the solenoid.
goto LOOP ; If the eye sense is high (no ball loaded) loop and check it again until a ball indeed loads.

Obviously this is very simple and doesn't take much time to program (5 seconds?). However, there's an inherent problem with this...you have to rely on the microcontroller's definition of being "high" or "low". This usually works okay....but not always. For example, if a microcontroller is designed to recognize the eye sense being high if it goes up half a volt, it'll work just fine for all the instances where a ball loading produces much higher numbers like a 1v or 2v increase. If you were to graph out the different voltage levels for a series of ball loading instances, it might look something like this...
Good load voltages
As you can see in the diagram above, all the instances of a ball loading produced more than enough voltage to be detected by the microcontroller. And life is good! However, what happens when an instance of ball loading produces voltage below the detection level...? (below)
Bad load voltages
In this diagram above, some of the instances of a ball loading would be detected, but not all of them. Specifically, numbers 4, 5, 7, 8 would have been ignored. This is exactly what occurs in problematic eye detection systems; all the instances where the ball loading produces a very small change, enough that the resulting voltage isn't above the detection threshold, are ignored. This means the ball would sit loaded in the breech but the marker would refuse to fire it since it doesn't think it's actually there.

Why doesn't it think it's there? Why not just have the detection threshold some nice low number like 0.1 volts? Well that would be confusing to the micrcontroller because that small of a voltage change happens all the time, automatically, just while the board is sitting idle. The digital detection method consists only of "yes" or "no", so it has to take the extremes of both cases. The digital detection method knows that there will be a change in voltage somewhere across the input, but it doesn't know exactly where it will occur....thus it's designed to monitor the entire range of voltages and only recognize a change if it produces the difference of more than a certain amount. The detector eye will be picking up all the light around it, so the change in voltage has to be high enough to disregard all those natural light changes that happen all the time. It wouldn't work so long as the marker's breech isn't completely devoid of all light (which it isn't).

This is where the analog signal comes into play. An analog eye sense is different in that it isn't "on or off" but rather anything in between. The microcontroller is able to magnify a very small portion of the eye sense and see just how much voltage difference is being caused. Effectively, the analog detection method adjusts the detection threshold and turns it into a range of voltages. When a ball loads, the microcontroller will observe it and judge whether or not the change in voltage is due to a ball loading, or just background noise. So even if a ball produces a 0.1 volt difference when it loads, a properly-tuned microcontroller can recognize this and allow you to fire the ball like it should.
Analog eye detection works by zeroing in on a specific range of voltages, and amplifying them so they're more discernable. Using the same diagram concept from the above examples, a graph of several ball loading instances across an analog eye detection circuit would look something like this...
Very good load voltages
This type of voltage change perhaps wouldn't be recognizable with a digital detection method. However, since the analog detection method has been tuned so it knows exactly where to look, it's able to accurately observe the voltage difference and fully recognize it as a ball loading, allowing you to fire. In this regard, analog systems are superior in detection, however the drawback is they can only observe a specific "range" of the input spectrum, so you would have to change a setting on the board in order to switch to a different color paintshell.

Ideally, digital circuits can be used for just about any eye type, however in practicality an analog circuit would be much more inclusive in terms of performance. The microcontroller is able to gather more information when using an analog eye system. The disadvantage is, however, that analog eye systems are MUCH more difficult to correctly design and program. The vast majority of markers out there use digital eye systems just for this fact. A few boards use advanced analog eye programming, including the Equalizer Impulse board, KM2 Predator SFT board for Shockers/Nerve, Tadao M7 board for Shockers/Nerves, and I do believe that's it.
The obvious trend above is that all those boards are for products that use reflective eyes. This is because different shell colors will cause a different signal voltage, so the signal will be ignored if it lies outside the microcontroller's detection threshold. Using analog eye programming cures this ailment because the microcontroller is able to recognize the signal with better clarity.

Altering Digital Threshold States:
Different boards are oftentimes suited for one particular type of eye (detector). This means you may run into problems if using other components with boards not suited to recognize them. If this is the case then you can sometimes create more clear detector sense readings by using a different resistor in tandem with the detector.

Again, here's a schematic of the two possible circuit designs used for an anti-chop eye system.
Electronics circuit

For type-1 eye circuits, the exact purpose of the pull-down resistor is to control the threshold for the detector resistance. When the eye signal goes high (no ball loaded if beam-break eyes, or ball loaded if reflective) the resistance of the signal needs to pass below the pull-down resistor value in order for the microcontroller to notice it. Any resistance above that value will be ignored by the microcontroller, such as when using a detector that operates at a higher resistance, since the pull-down resistor will "steal" the signal and grond it out. This is how the board tells the difference between a breech that's loaded and one that isn't loaded, and this is what determines the detection threshold.

If using a detector eye that operates at a higher resistance, such as most of the small "square" eyes (DM6/7/+, Egos, Invert Mini, some others). There are pictures of these on the ACE electroincs theory page. In order to choose a new pull-down resistor value, you should figure out the detection threshold of the circuit board. This can be done using a potentiometer (adjustable resistor) or by contacting he board's developer, if possible. You also need to know the resistance of the eye sense when the eye is being hit with power from the emitter. If you're unable to deduce the threshold value then assume it's somewhere around 4.7-Kohm for a beam-break eye set. Your new threshold will have to be higher in resistance to compensate for the higher sense resistance from the detector.

This can be calculated using the resistor values, or simply by experimenting with a 10-Kohm potentiometer in place of the pull-down resistor. Adjust the potentiometer until the board recognizes the eyes as being signal-high, and find the middle value for that range (verify using a multimeter). This method will lead you to the new detection threshold value required for your new eye elements.