Both involve sensing a .175 in brass object falling through either a clear or black tube with an ID of .375
or a square molded black sleeve .5” x .5”
So far I have tried IR Obstacle Avoidance sensor misses 50% of the dropped objects.
So I am looking for ideas how to do this project. I was looking at QRD1114 optical detector or the SparkFun Micro Proximity Sensor. any help would be appreciated.
Can you please give some context?
Avoid language like ‘object’ and ‘project’ and simply say what you’re doing.
Your project secrets are totally safe with us.
Example: I want to detect lost fishing hardware in a bait cutting basin drain pipe.
Example: The brass valve seat sometimes breaks loose in my basement brewing setup.
Are they rigid pipes or flexible hoses?
Does the same technique for the clear tube need to be used for the black one?
Can you interact with the tubes, contact, modify, drill, clamp?
Are the tubes empty when there’s not brass inside?
Do you have power available?
Ok Yes I have power and this will be connected to an existing arduino nano r4 that I already have running. It is on a reloading press its function is counting ram strokes, opening an air valve and warning of no powder. I got a more robust reloading press and now need another error detector. The first stage is resizing brass an punching out the spent primer (.175 in brass cup) that falls into a 1/2” x 1/2” collector connected to a 3/8” ID tube. So far I have tried an IR obstacle avoidance sensor module mounted in the side of the tube, an IR emitter and Photo Transistor mounted in the 1/2” x1/2” collector and IR slotted opto coupler mounted in slots on sthe side of the plastic tube. The avoidance sensor worked about 5% of the time and the slotted oto coupler worked about 50% if the time. I have been messing around with and IR detector (SKU: SEN-19018) and IR emitter (SKU: SEN-18772) which I cant get to work. So that where I am at. I ma looking for some help. Thanks
It appears the industry uses 2 pairs of IR sensors (emitter& receiver), in an “X” to detect the primer cup no matter what orientation the cup is in as it falls.
I know about there products (Mark 7). The sensor is $200 and designed to work with there auto drive. Mine is manual. I am pretty sure its optical but I cant find out what the pinouts are for it and dont want to risk burning one up.
I thought about metal detectors when I was considering food objects yesterday. Those and xray inspection instruments are often used for in-motion foreign object detection but not as much routine piece positioning. Here’s a manufacturer using xray imaging for sugar clumps in breakfast cereal.
Beyond the simple redundancy of a second occlusion detect (which may alone be enough for this application), an increase from one to two optical sensors can make loads more valuable data. Direction of travel, orientation, velocity can be fairly easily determined with some geometry assumptions, pretty easy in a tube with a known target.
Hmm thats a good idea. Multiple sensors. So f I took that tube and put 2 more of those IR sensors at 120deg intervals then I increase oy chance of picking up the primer falling through the tube. gona try it.
I was contemplating trying a capacitive proximity sensor.
The thing is I may have $200 bucks in this before I get to the final version working. But I would rather tinker then buy the $200 device from Mark 7. And the satisfaction of getting it working.
The emitter pairs are typically in 90° for simple single dimension measurements but you can complicate to your heart’s desire. An everyday example of this are the optical knob encoders for things like volume controls or automatic door openers. Inside is a miniaturized slotted wheel with the emitter detector pair and determine direction and speed of the input but without a potentiometer or any other contact parts. Quadrature encoding is the term to research:
Ha, capturing brass fall events in a conductive tube is close to the classic induction current classroom demonstration. It’s usually flipped around with a non-ferrous copper tube and a slower falling magnet but your apparatus should be able to create readily detectable events with a steady magnet (in a ring/cyl around the tube) but moving brass.
Still, you’ve got to wonder why your existing one is missing so many.
const int SWITCH_PIN = 2; // Pin 2 supports interrupts on most Arduinos
volatile int counter = 0; // 'volatile' is required for variables changed inside interrupts
volatile bool triggered = false;
void setup() {
Serial.begin(9600);
// Initialize pin with pullup
pinMode(SWITCH_PIN, INPUT_PULLUP);
// Attach interrupt: triggers when pin goes from HIGH to LOW (FALLING)
attachInterrupt(digitalPinToInterrupt(SWITCH_PIN), countPrimer, FALLING);
Serial.println("READY - Interrupt Mode");
}
void loop() {
// Check if the interrupt set the flag
if (triggered) {
Serial.print(counter);
Serial.println(": I saw the primer");
triggered = false; // Reset the flag
}
}
// The Interrupt Service Routine (ISR) - keep it fast!
void countPrimer() {
static unsigned long lastInterruptTime = 0;
unsigned long interruptTime = millis();
// Simple debouncing: ignore triggers within 50ms of the last one
if (interruptTime - lastInterruptTime > 50) {
counter++;
triggered = true;
}
lastInterruptTime = interruptTime;
}
I think I am going about this the wrong way. I am using an off the shelf IR boards. I think what I may have to do is build my own circuit using a detector and emitter that measures the voltage from the detector find the constant where there is no object obstructing the beam and then look for changes in the voltage as a primer drops. I think that the off the shelf boards are not sensitive enough to see that slight change. Then use the arduino to look for the change and report it. Its just a thought.
I have 3 of those as well as 3 LTE-302 and 3 IR798-7C-F. Need to figure out a mount. First i’ll test it out. One question I have is the spacing between the emitter and detector. I only have about 1/2”, will that imped the results?
That should enhance them in my mind…closer = higher variance when something is blocking IR vs full-blast unoccluded IR spray, so you should observe large differences in the output
I’m a little late to this party, but I may have some ideas for you.
First, can you post your current code that’s doing analog sampling? I just want to understand how you are processing for detections as there can be a lot of inefficiencies here, particularly with the sample rate of the A/D converter.
Do you have the means to monitor your IR detector with a scope so you can correlate the output of the detector with your controller’s detection algorithm? You will need to do this in order to figure out of the issue is with the sensor’s ability to detect a falling primer, or if your controller has a latency or sensitivity limit that keeps it from detecting certain edge cases.
I personally would not rely on a bog-standard Arduino’s ADC to detect a discrete time event since its default time resolution is not that great. I would consider using a comparator circuit to monitor the analog output of the IR sensor and use it to create a nice clean logic level signal into your Arduino which can then be either sampled or trigger an interrupt. The sensitivity of the comparator can easily be adjusted and tuned to your system.
If the time resolution of the A/D conversion is what’s causing your occasional miss, you could also try redesigning your tube to have some sort of feature that slows the primer down when passing through the IR sensor’s field of view which would give the Arduino a better chance at detecting the event. This may take some experimentation, but it could be as simple as a small bend.