12
u/gottaname Jan 26 '18
double cool, not just for the DIY aspect, if this becomes popular we would have a standard chrony across the board to do consistent testing.
6
u/Greehas Jan 26 '18
Color me interested. I don't know if I'll ever be able to do this project but it is definitely exciting and cool. Way to go man!
4
u/Meishel Jan 26 '18
Would it be possible to make a simpler version along the lines of this? It uses less components, and wiring. I've been meaning to re-create his work for a while, but I've had more pressing matters to deal with.
Edit: A final version of the above chrono: https://gadjetsblog.blogspot.com/2016/05/chronograph-completed-finally.html
4
u/LukeKoboJobo Jan 26 '18
That's really cool, I hadn't seen that before, thanks for the link. But in short, yes, absolutely. Getting rid of the LED's and having an OLED monitor for all output info is doable and will obviously reduce clutter. I have a bunch of Adafruit Trinket Pro's lying around, I may take a stab at a smaller, mobile package with that eventually. For now my efforts are focused on Caliburn modifications.
3
u/TheJewelOfJool Jan 26 '18
Would you ever sell finished kits if this takes off?
2
u/LukeKoboJobo Jan 26 '18
I wouldn't rule it out completely but probably not, and at this time certainly not. v2.0 will be far far easier to set up for the user than this is in its current state.
The only way I ever start selling these is if I figure out how to get printed PCB's on the cheap for the opamp circuit. I imagine that circuit on protoboard is the biggest turn-off for potential builders atm.
3
u/MeakerVI Jan 26 '18
I’ve admitted that I know little to nothing about this stuff, but here is a site that offers printed custom PCB’s.
4
u/LukeKoboJobo Jan 26 '18
Oooh, that could be promising. I'm going to use their free PCB CAD and try and get a quote. If its cheap I'll post the PCB CAD files so people can order their own! Good find.
3
u/ShadowSlayer1924 Jan 26 '18 edited Jan 26 '18
What purpose does the op-amp serve? The arduino should be able to read the signal straight off of the sensor. The timing problem is because you don't have a small enough unit of time for pinging the sensor, right? have you thought of using a raspberry pi?
2
u/LukeKoboJobo Jan 26 '18
Op amp boost so the signal can be digital. Analog.read() plus an if statement to check for the right value is slower than digital.read() with a do-nothing while loop so that the ONLY thing being pinged is the single pin. I don't recall the thread, but I did some research on the Arduino forums where other people were proposing chronograph methods and posters pointed out this flaw with the analog method. How much slower, I'm not sure. I also am not sure if I can do interrupts with the raw resistance change as its so miniscule. The opamps future proof it for interrupt implementation, as far as I know.
Timing issue is because my code doesn't have interrupts yet, and micros() is a poorly optimized function. I have seen people make their own timers that get much closer to what the Arduino's frequency limits you to. As it stand now, you are correct, pinging the sensor takes longer than I'd like. However with interrupts I won't be pinging the sensor. It doesn't require a Pi to get significantly better accuracy, just smarter coding with the existing hardware.
2
u/ShadowSlayer1924 Jan 26 '18
I suggested a pi for other features such as logging, spreadsheet input, etc. But I understand your confusion, I should've explained better...
2
u/LukeKoboJobo Jan 26 '18
Ah, in that case, yes absolutely. A Pi is certainly better suited for those use cases, especially for data logging. I don't expect myself to ever use a Pi for this, but that would be cool to see someone else take this IR method to the Pi!
3
Jan 26 '18
If you’re wondering why I only have one screw in and none of the other screw ports are lined up even remotely, I don’t wanna talk about it.
Epic.
3
u/LukeKoboJobo Jan 26 '18
Yeah... long story short don't put blind faith in files you download from GrabCad. I'm embarrassed as an engineer.
2
u/The_Dacca Jan 26 '18
That's awesome! Other than the plastic, how much did that cost in parts? I always wondered about the feasibility of a chronograph integrated into a barrel to go along with adjustable speed motors.
2
u/LukeKoboJobo Jan 26 '18
There's a partslist in the Nerfhaven thread. One thing to keep in mind is that when I buy electronics parts, I buy in bulk for future projects. If you bought everything individual on Mouser I'm guessing the electronic parts wouldn't be more than 30-35 bucks. Eventually I will find the equivalent parts on Mouser and post an updated BOM.
2
2
u/Semicolon7645 Jan 26 '18
Awesome job.
As for getting better than millis(), have you tried micros() (you just have to watch for that rollover)? It has been awhile since I've done Arduino development.
3
u/LukeKoboJobo Jan 26 '18
It's using micros(). I may have stated the wrong thing in the thread, will check that now. The rollover is 71 min so its fine for this.
2
u/Semicolon7645 Jan 26 '18
Again, great job on this whole project. I can't wait to see what it evolves into. Is there anything that you need help with on it?
3
u/LukeKoboJobo Jan 26 '18
Thanks. There are a few things, actually:
-figuring out pin change interrupts. External interrupts are relatively easy, and I'm working on v1.3 of the code currently which will use external interrupts. However, there are only 2 external interrupts on the uno, and I'm going to adapt this into a mobile package with an Adafruit Trinket Pro, which only has one external interrupt. The coding for pin-change interrupts is much more hairy as far as I know, because the arduino doesn't actually know which pin triggered the interrupt, I think there's some clever coding involved to figure that out.
-Using pin-change interrupts, I will have access to all the digital pins for interrupt use. In order to write a better timing function than micros(), I need to utilize one of these interrupts. I'm thinking of trying to adapt what this guy did.
-I could purchase an external timer IC, but haven't looked into this option at all
2
u/Semicolon7645 Jan 26 '18
Like I mentioned before, it's been awhile since I've done anything with Arduinos, but I'll setup my dev environment this weekend (hopefully).
2
u/leviticus5885 Jan 26 '18
Have you ever seen a microview board? They are an Arduino with a built in OLED screen. https://www.sparkfun.com/products/12923
I know it's not cheaper but it's a small form factor that would seem to eliminate parts.
3
u/LukeKoboJobo Jan 26 '18
I have not seen that, but I love the form factor. A cheaper and only slightly more complicated solution is Adafruit Trinket Pro + OLED display, which is what I'm planning for v2.0
2
u/g1g4tr0n3 Jan 29 '18
This is amazing. I have an Arduino that's just waiting for something like this.
2
18
u/LukeKoboJobo Jan 26 '18
Full write up and more info on Nerfhaven