Well since getting a 3D printer I've finally managed to finish off the project and put it in a case, it's not often I actually put things in a nice case.
The first case with the Nokia display, it was a bit clunky and easy to break, when I dropped it that is!
Second attempt, this is the one I've been using. This one uses the Bluetooth module to talk to an app on the phone here
Collection of bits held together with heatshrink |
The end that screws on with the USB connector below and the front view with the on/off switch and battery charge connector |
Side View |
This one uses the Bluetooth adapter and connects to an app on the phone and has an internal lithium Ion battery than can be recharged using an external supply and charging module, you can leave out the battery and use the USB connector of the Nano to power the chronograph from your laptop or a battery pack with a USB power output. (if you do this then the switch doesn't do anything)
The enclosure is essentially two parts, a carrier, that holds all the electronics and a slide on cover.
Both parts are a push fit onto the aluminium tube (16mm Dia. x approx 100m long)
Parts list: -
Item |
Source |
Approx. cost |
3D printed enclosure - Thingiverse | www.3dhubs.com www.shapeways.com |
£10 - £20 |
Arduino Nano (could be mini pro etc.) | Ebay | £2 |
Slide switch | Ebay | £2 |
Battery (Turnigy Nano-Tech 600mah 1S 3.7v 35-70C Lipo E-Flite) | Ebay | £5 |
Aluminium Tube - 16mm OD | Ebay | £5 |
Bluetooth Module | Ebay | £4 |
3V to 5V converter (NCP1402-3.3V STEP-UP BREAKOUT) | Proto Pic | £4 |
JST wired plug connector | Ebay | £3 for 10 off |
IR Emitter x 2 | Ebay Farnell RS Components |
RS= £2.25, 5 off |
IR Detector x 2 | Ebay Farnell RS components |
RS=£5, 5 off |
Arduino Sketch | Here | Free |
Android App apk file (from Aptoide store) | Here | Free |
So around £44 to put together, £24 'ish if you can 3D print your own enclosure.
You could also do away with the battery and 3 to 5V converter if you powered it from you laptop USB or battery with a USB socket on it.
More images
Battery and PCB modules in place with the tube |
Barrel end showing the USB connector |
Front end showing on/off switch fitted |
Inside the cover |
The Bluetooth module wired to the Nano |
Nano and BT module in the carrier |
Everything wired up... nearly. 3 to 5V converter top left under the battery |
Fritzing schematic
As usual feel free to ask questions and comment below.
71 comments:
Hey, now I can comment. Cool. I'm copying my comment from thingiverse, it's not about the 3d printed part.
The reading of the sensor is an analogue-digital conversion and that takes a lot of time and the time the pellet passes one sensor is very short. The polling of the sensor must be happening when the pellet is in front of it to be registered.
I don't know how an interrupt works on these sensors, but I assume that also includes an AD conversion, or not? Or the interrupt happens on an analogue signal change? I have no idea really.
Glad to get your comment.
I didn't use standard IR detectors because of the overhead, I used detectors with a digital output and a response time measured in nS, the detectors feed into D2 and 3 which are both interrupt enabled. when the beam is broken the detector pull down the input to ground.
The original sketch just sat in a loop checking the first detector and then started counting uSeconds until the second detector is triggered. In the latest version I've used the interrupt function so that I can do some other stuff in the main loop.
Great, I didn't know detectors like that exist. Thanks.
No problem, Follow the link in the post :-)
Would you be willing to make one for sale as I have no aptitude to understand a lot of this blog,but your ability amazes me. Would love one with its own battery.
Stuart,
I don't really have the time to go into production with these, it's aimed more at a DIY project, having said that I've agreed to build a batch of 5 for some guys on an airgun forum.
Would you be interested in a kit of parts to assemble? just a bit of soldering?
The other problem with selling them is they are not production quality I consider them to be prototypes and as such I could not offer the guarantees that most people would expect when buying things.
Cheers
Where can I find arduino code and schematics for this project? Thanx
There is a link in the post to the sketch and the schematic is in another post somewhere, search for chronograph.
I've updated the post with a representative Circuit of the Chrono, the only thin missing is the charging lead and power switch but this should be obvious, if not let me know
I'm going to be having a go with a NodeMCU... bluetooth and wifi on board for less than a fiver, I'll let you know how I get one. :)
Chrono_with_interrupts.ino also missing from dropbox
Hey, the Arduino Sketch dropbox link is still dead.
Sorry, I will fix it but I have a problem accessing my blog, I changed the template a while ago and now I don't get the "sign in" option
Links now fixed .... I hope
Well, the link isn't dead now, but it's the very barebones Serial communication version. I was curious about the interrupt version, and the bluetooth code so I could use it with your Android App.
Ah OK! I can add a link to the interrupt based version but when I did the accuracy testing with an oscilloscope
https://gadjetsblog.blogspot.co.uk/2016/06/diy-chronograph-accuracy-testing.html
I actually found that the interrupt driven version was less accurate ..... Go Figure!
I don't know why, do you still want it it's here
https://www.dropbox.com/s/jz9btar1ow81l9q/Chrono_with_interrupts.ino?dl=0
As for Bluetooth, there's no Bluetooth code, the BT interface just takes in the serial data and sends it via BT to the phone, the sketch you have will already work with the BT module and Android app.
Hi!
I am now making something like this, but wondering... What would be the maximum nozzle speed, using a 6 cm space between the two sensors? I mean, will it work with an airgun (not airsoft)?
Hi again! Another question; in your wire diagram you use resistors. What is the value of the two resistors?
HI,
I've never tried them at any distance apart greater than 15mm, the problem is being able to ensure that the pellet obscures enough IR light from the emitter to trigger a detection.
It may work OK if your detector is down at the bottom of a hole so it's directional in the IR it receives and ignores the scattered IR from around the pellet.
The usual method to detect pellets over a distance is to use several IR diodes in series/parallel (Analogue) to detect the shadow of a pellet passing over them like the Chrony F1 etc.
Sorry, I should have added the value, the resistors have the colour code brown, grey, brown = 180 ohms :-)
hi, gadjet. would you mail me full schematic chronograph with nokia display with pellet weight input and the sketch for me, thank you for your attention sir.
Hello, the project is very good, I would like to know how it would look with a Nolia 5110 telephone screen in this project here
Is the scheme the same? just adding the screen? thank you
Hi,
There is a post on the blog regarding the Nokia 5110 display.
https://gadjetsblog.blogspot.co.uk/2013/07/diy-chronograph-nokia-display.html
You can also see how to connect it in this video on youtube https://youtu.be/RAlZ1DHw03g
There is a link to the sketch in the post let me know if it doesn't work.
in sketchup file.zip there is 2 files with .skp and .eps extension, how do i open both files, using what kind of application sir?
schematic please sir :)
The schematic of the basic chrono for all display types can be found in this post https://gadjetsblog.blogspot.ro/2013/05/chronograph-update.html
The only thing is that you need to add series resistors with the LED IR emitters of about 180 Ohms.
The connection for the display can be found int the reply I made above this morning, the youtube link. I used a Nokia 5110 UNO shield for mine but the youtube video uses a simple screen mounted on a PCB, if I remember right it uses the SPI bus to communicate so the connections should be obvious.
The two files are the 2D drawings for the laser cut acrylic to make the enclosure, the .skp is a google sketchup file, now trimble sketchup and the eps file is the postscript file that you send to the manufactures, google for an online EPS viewer.
Hello,
Good website and good idea.
For your chronograph :
Could you replace the Photo sensor - OPL-550a withIR LED Infrared Receiver) ?
( https://www.ebay.co.uk/itm/10Pcs-5mm-940nm-IR-infrared-Receiving-diode-LED-Lamp-Infrared-receiver-CF/272041594368?hash=item3f56f14e00:g:sHkAAOSw4hdXICw6)
If yes, could you post the schematic in order to plug them on the ardino nano ?
Could you give me the valu of the two resistor ?
Also, with bluetooh module and a phone, do we need to program the arduino to use the chronograph ?
Thank you
Hi,
Thanks.
technically you could use the IR receivers but they do not have a digital output that can be fed directly into the Arduino, you would have to use external circuitry to convert the analogue levels of the IR sensor to logic levels to work with the arduino also you would need a receiver that has a fast enough response time to be triggered by the shadow of the pellet, I don't have a circuit for this, I would have to work it out, Google may help.
The resistors are 180 Ohms.
The sketch for the Arduino sends a serial value to the BT module which then sends it to the phone where the Android app converts it to power using the other info entered into the app.
I hope that helps.
Gab,
I just had another look at that Ebay add and I suspect they are IR emitters not receivers, it's a bit confusing.
Lord Kaos,
By all means, the more information the better :-)
Lord Kaos,
It's probably because the response time of you receivers isn't fast enough to react to the pellet shadow.
Hello, thank you for your answer.
I discover arduino and your work is fantastic becuse you can do a chronograph for less than 20 €.
Could you confirm me the reference Optek OP240A, 890nm IR LED and Optek OPL550 IR Phototransistor ? (i don't find them on ebay);
Regards
You need to get them from RS components, are you in the UK? I did see them on Ebay once but they were three times the price than RS, unfortunately though I think you have to buy a pack of five :-(
I am not in the uk. Price is higher in France..
Hello,
very interesting project, thankyou for share all informations.
I would like to make my own chronograph with 16x2 display (HD44780)
Unfortunately I'm an absolutly newbie in arduino and code writing.
Could you please share your code for a 16x2 display? I found your code
for a 8x2 display, will this working too in my case, or what I have to change?
Thanks for any help.
Btw, I want to download your PC-software too, but the dropbox link seems to be broken.
Fred
Here is a working link to the PC software https://www.dropbox.com/s/ikbdk0k3bf9lx7w/PC%20Chrongraph%201.30.rar?dl=0
Let me know if it doesn't work.
As for the LCD, check the pinout definition matches your LCD and I think you can just use the same library and use the extra characters, it's been along time since I used the code, look at the arduino.cc site in the learning section for the Liquid Crystal display examples, there's even one in the examples in the Arduino IDE I think.
Thankyou for your answer and your advices.
Yes the link is working. Today I've ordered all parts and soon I will start this nice project.
hi gadjet, may i use TL1838 instead OPL55 for the sensor ?
I don't think so that receiver is specifically for IR transmitters for TVs modulated at 38KHz
opl55 is hard to find, may i use regular phototransistor to replace the sensor.
hi gadjet, may i use BPW34 photodiode to replace OPL55C
In theory you can use any IR photo diode you like but there are a couple of things that would need to be achieved: -
1. It has a fast enough response time to be able to detect the progress of the pellet.
2. You can add the extra circuitry to interface the analogue output to the Arduino.
Other people in the posts above had the same problem, has anyone successfully used an IR photodiode?, if yes please post the details.
That would be good, some photos and a circuit would be great :-)
Fantastic project! I'm watching it since beginning. Can you please change in the app that Pellet weight is in grams not grains? Tnx
Thanks, I'll see what I can do
Hi Gadjet,
Thanks for sharing your DiY project. I live in Argentina and I've not found the OPL550A, so I'm try to use other receiver (digital) but is slower than OPL550A, see http://dalincom.ru/datasheet/AX-1838HS.pdf is arround 500microSecond, what is your opinion about use it? Thanks a lot!
Javier
You're welcome, glad some people find it useful and try to build it.
The problem with these sensors is they're designed for a TV remote control and use a modulated IR signal from the LED transmitter (38Khz) I don't know what the reaction time is for the LED to sense when the IR signal is blocked by a passing pellet and even if it could detect it.
Other people have used standard Photo diodes, I know they would work as other commercial chronographs use them They just need more circuitry, "Lord Kaos" (posts above) was going to feedback his results here but so far he hasn't.
In short, they may work but I can't tell you if they will or not.
Phil
Thanks a lot Gadjet! I'll try to buy you recomend...
Hi Gadjet, I'd like to add RPS to the calculation did you make this in your app? If not, I'll try to add this calculation. Thanks!
I assume you are making this for Airsoft, I was interested only in an air pistol/rifle so I never needed RPS. If you can add it then fine, if you struggle then I could look into adding it as an option maybe.
Yes, I'm making this for Airsoft. Well, I'll do it to use in a version I'm making using a Oled display.
That sounds interesting, which OLED display?
a small one 128x64 I2c Ssd1306 Oled display. It seems to be price/performance/consumption the best option.
On the other hand, for RPS calculus I will measure the time difference (only in the first sensor) between one BB/pellet and the second one and then calculate how many interval like this fits in a second. My understanding related to OPL550A is that needs 25ns to detect the new state (changing from LOW to HIGH) so I guess it won't be a problem the calculation I will implement to detect each BB/pellet movement only in the first sensor. What is your opinion?
That sounds like a good way to do it, I would average the value over several shots, I don't know what your fire rate is per second but could you just count how many shots were fired in 1 second?
Hi Gadjet,in 1 second normaly arround 20 rounds, the maximun number should be 35 (changing some gears) that means a interval from one BB an the other of 28,570 microseconds. So thinking in one sensors the BB would pass from it each 28570 microsecond and the arduino should detect those LOW/HIGH changes.
The only thing to consider is how much processing you are doing in between the trigger detection, as it works in a fast loop to watch for the first trigger and then the second trigger and does little or nothing else.
If you have to start processing calculation in between shots it might not catch a trigger, you might want to use an interrupt routine so you always catch it or just count triggers in a given time, ie 1 second instead of calculating the average time between multiple shots .... just things to think about, itmay jest work fine though, you'll never know until you try :-)
Yes, you are right, I have to try using differents approaches and conclude which is the best...first of all I have to receive my sensors I bought in eBay from UK store and then test it. Thanks a lot, I'll keep you informed!
Abrazos
Javier
Hey Gadjet, it works! I did all the parts in 3D Printer (including the tube) and works. Now I will soldering everything and I will buy an aluminum tube becuse the PLA is not BBs resistant :). I want to thank you for your post and If you want to my code and the 3D parts models, please, let me know and I'll send all.
Abrazos
Javier
El_Mago_Ilusionado,
Great news, maybe you could add your 3D models into thingiverse and post the link here? Or maybe do your own blog or instruct able maybe.
@Lord Kaos, los mismos que Gadjet utilizó, los compre por eBay y me vinieron por correo.
@Gadjet, sure, I will share all my experience till now. I you have an email address I can share with you all the material I've used (stl files and code) to share in this post.
@Lord Kaos, soy argentino tambien, de capital federal y me llego a las 3 semanas, a mi domicilio directo. Suerte
Hi Gadjet,
I use the chronograph with your Android app. It is working very well and accurat.
But, would it be possible, to make an update with mm and m/s?
Hi,
I did start to make a metric version sometime ago but I admit I put it to one side and forgot all about it, I will have another look at is soon.
That would be great, thankyou :)
Regards
Blobber
Any progress with a metric version? :)
Sorry, it's been a very hectic 6 months, I will try to have a look at it early in the new year, I will need to try and figure out what I did as it was a while ago since I wrote it and my phone now runs Android 10 which doesn't like the old app.
Hi Gadjet,
your chrono APP was working very well for me, but I lost the last version of your APP, after a reset of my phone. Could you please share the download link?
Kind regards
Fred
Ah OK, it looks like the APPtoIDE site has failed!
I will find the APK and add a new link to the blog.
That would be so great, thankyou 😊👍
I have a problem, I can't seem to access my MIT appinventor project anymore in fact all my projects seem to have disappeared ! not sure why!
I will see what I can do.
Post a Comment