Monday, 8 July 2013

DIY Chrono Shopping list

A few people have expressed interest in making a DIY chronograph so I said I'd put together a shopping list.

There are quite a few options for the display type so I try to give the pros and cons at each step.

Firstly, the processing power.
All my projects are done using the Arduino family, including the many clones out there, I've used original Arduinos and Clones from China all without any problems. (A PIC Micro will do just as well with the same hardware)


Arduino Mini Pro

Arduino Nano



These are available in 5V 16MHz and 3.3V 8MHz versions, I used the 5V versions @ 16MHz to get the best uSecond resolution, I believe that the 5V versions can be run at 3.7V and still run at 16MHz.
This device needs an external USB to serial adapter to allow programming but, once progr ammed, can be fed from a 7V source via the on-board regulator (RAW input) or a regulated 3.3 to 5V supply on the VCC pin.
I bought mine on Ebay from here for less than £3 but it took 27 days to arrive.
Others on Ebay search
These are the boards I've been using, mainly due to the USB connector for both programming and supplying 5V.  I use an Eveready unit that uses 2x AA batteries and steps up the voltage to 5V, I connect this with a standard micro USB lead.
Apart from the on-board USB and the in-circuit programming connector (far right) the specs are the same as the Mini Pro.
These can be bought on Ebay for around £4 from China and around £10 from the UK, they're a little more expensive due to the on-board USB.

Display Options

This is the top of the range display £7 from China but has the advantages of being colour and also touch screen.
I didn't go very far with this display but I think it would be good in a larger Chronograph that has a large detection curtain.

This is an I2C connected display and can come in yellow, blue, white and red.
This is my choice for my portable sensor.
It's very easy to program and is a similar size the the sensor tube so is a good fit, see this post.
You can only really display one value, I chose FPS because that doesn't require you to input the pellet weight, you can generate a little look up chart for you pellets.
I dug out an old Nolia 5110 phone display that was set into an Arduino UNO shield and added it to the DIY Chronograph family, it works pretty well and has a very good contrast for outside readability and the 5 way switch at the bottom centre allows for a menu system to enter the pellet weight.
I can't get the shields any more but the screen can be bought off Ebay for a couple of quid from China and around £7 from the UK, these displays not on the shield work on 3.3V only so require some level shifting when used with a 5V arduino.



A cheap and cheerful display that can be bought in many webstores an Ebay, they're nearly all the same connection standards and have Arduino Libraries readily available and can come with or without backlighting.
Similar to the 2 line 16 character display just a bit smaller, easier to package and can come with and without backlight, the non backlight versions tend to use an LCD technology that means they're a good contrast  and can be good in sunlight.


Fancy using your Android smartphone as the display then this is what you need, available from £5 in China to £15 in the UK.
Be careful, this board comes with and without the back PCB, without it is a bit fiddly to use and works of 3.3V only.
Ebay search

Other parts


I chose Aluminium tube because I wanted to thread it to fit my 1/2" UNF silencer adapters on my rifle and pistol but you could use any tubing you liked, depending on how you want to fix it.
I bought mine on Ebay from here.

You will need to get it cut to length and threaded if you want to do as I did.

Maybe you have an old silencer that you could modify.  See this post for assy. details
The sensor LEDs were bought from RS components, they are available on Ebay but at a huge markup

Photo sensor - OPL-550a
Ebay
Farnell
RS components

IR Emitter LED OP240A
Ebay
Farnell
RS Components

Software

Arduino
Android
I have quite a few version of the various sketches so if you would like a particular version just request it in the comments and I sort out a link.

Nokia 5110 shield sketch
Nano with 7 segment display
Chrono with 8x2 LCD

 Here

Aptoide store download


68 comments:

Anonymous said...

I'd love to see some sketches for the arduino. Save some coding time. I think the framework is probably enough. There will end up being changes needed from gadget to gadget anyway.

Gadjet said...

Links to some sketches added at the bottom of the post.

RAKESH said...

How did you set the pellet weight in the arduino sketches?

Gadjet said...

RAKESH,
It depends on the sketch, the Nokia display allows you to set the weight using the joystick after powerup, the 7seg display doesn't use the weight it only displays the speed and you do the calculations yourself.

Daniel D said...

Hello writes translator so sorry,] I have a problem I used your code from 18/04/13 everything plugged in accordance with the post "Chronograph update" but something is not working. I have Arduino Leonardo trigger 1 & 2 Connect to pin d2 and d3. Saying that the plate must support interrupt but I do not see any commands? eg attachInterrupt
detachInterrupt
interrupts
noIntrerrupts

Daniel D said...
This comment has been removed by the author.
Gadjet said...

Daniel,
I can confirm that interrupts are not used in that code, I was thinking about using interrupts but haven't done so yet, it's just a fast loop checking the inputs.
Can you check the inputs with a scope to check the sensors are working.

Daniel D said...


The sensors are working as they cover my finger voltage falls to 0V. but I have one question I check the operation of the system by putting some small object into the tube, it can be wrong with the system for low speed does not work basically the system is to be a name to use for air rifle .22 cal

Gadjet said...

I tested my setup by dropping a .22 pellet down the tube and I get a reading in milliseconds.

One thing is the IR sensors, have you used the same ones I used, it can be that they are not detecting the object, how far apart are they, are they lined up together....

One thing I tried was two switches connected to the trigger inputs and pressed them together one slightly before the other to see if I got a time transmitted.

Can you share some images of your setup, do you have dropbox. google drive etc.

Daniel D said...


I'm not home right now but I throw in fritzing evening schedule and some pictures

Gadjet said...

OK,
One other thing, I used my phone camera to look at the IR emitters, they glow a purple colour when powered up, just to make sure they are on.

Daniel D said...

Okay now all ready asking for your login to Dropbox

Gadjet said...

Daniel,
Sorry, not sure what you mean, my login?
If you have a dropbox account I can give you my email so you can share a folder with me or you give me your email and I can share a folder with you.

Daniel D said...

ok so tell me your email and I've shared folder on the

Gadjet said...
This comment has been removed by the author.
Daniel D said...
This comment has been removed by the author.
Daniel D said...

released about Dropbox folder on the e-mail address

Gadjet said...

Daniel,
OK, I've had a look at the pictures and firstly, the sensors are probably too far apart, try a much smaller tube, to have the sensors so far apart I think you would need more than one pair. Try dropping something larger (20mm) down the tube, this should trigger it, a .22 pellet probably wouldn't.

Daniel D said...


Ok I'll try to reduce the diameter of the pipe and then we'll see. And how to connect a second set of sensors you can convert my project fritzing?

Gadjet said...

Daniel,
Did you try a larger object or use your camera to check the IR emitters were working?
Also, looking at the pictures it looks like the emitters and detectors may not be absolutely parallel to each other, they have a 40 degree angle on the emitters so at 25mm they would need to be lined up perfectly to work.

Gadjet said...

I just uploaded the IR emitter spec to the dropbox folder and it looks like 25mm would be too far apart, see graph on page 2.

Daniel D said...

I checked the IR LED camera light very clearly. Today I will try to tube 15 mm

Gadjet said...

Hi Daniel,
Any progress, have you got it working?

Anonymous said...

Hi, is any chance to get chrono sketch with Bluetooth support?

Regards,
Chris

Gadjet said...

Chris,
There is nothing special about the Sketch for bluetooth, you just send the value of the time difference via the serial pins and it gets transmitted by the bluetooth module. If you can see the data on the serial monitor of the Arduino IDE on you PC then just disconnect the USB from you PC and connect the TX/RX to the bluetooth transmitter, that's it!.

Hope that helps.

Anonymous said...

Hi,
yesterday I connected my hc-06 with arduino pro mini and it worked perfectly with my Galaxy S4 :) (used 2 switches instead of phototansistors - as I don't have any of them yet).
Do you thinking about upgrading chrono APK? Will be nice to have velocity in m/s and energy in Joules. (can be changed between FPS/m/s and FPE/J).

BTW. do you know any cheaper replacements for ir elements?

Regards,
Chris

Gadjet said...

Hi Chris,
I'm moving the app over to app inventor 2 a bit slow going but when I do I'll add m/s and joules as an option.

Anonymous said...

Great news !!! Thank you Gadjet.

Regards,
Chris

Gadjet said...

Chris,
Sorry but I forgot to answer your question about cheaper IR parts.

I know one one person that tried to use normal analog IR emitter/detector and had quite a lot of trouble trying to use the analog output.
I used the digital output IR receiver because It doesn't require and signal modification and can trigger the input directly. You can use anything you like as long as you can get a reliable trigger into the Arduino input.

Cheers.

Anonymous said...

Hello Gadjet,
I already bought IR parts recommended by you. They has been delivered yesterday and in Monday I'll try connect all together.

Gadjet said...

Good news, post the results, good or bad........

Anonymous said...

Hi Gadjet,
I've bad news. I burnt out both or emitters :( is my fault because I didn't check dataset and feed them 5V :/ BTW. on yours photo showing pcb for emitters both leds are wrong placed ( long leg is - not +) and 150 Ohm resistor is a must for 5v. Now I'm waiting for new pair.

Regards,
Chris

Anonymous said...

In LED diodes long leg is always + and short is - .
Sorry Gadjet- my fault. Chris.

Anonymous said...

Hi, any news regarding the new release icnluding Joules and so on?

Gadjet said...

Sorry I've not really been doing anything with the chronograph for a while now other projects on the go, I'll have a look at it sometime soon though, do you mean the APK file from the appinventor gallery?

iman rezaei said...

Can I use OPL-550 ALTERNATIVE, for example TSOP1138 or HS0038 PHOTOTRANSISTOR?!
TANKS ALOT

iman rezaei said...
This comment has been removed by the author.
iman rezaei said...

Hello again.
I have a problem, When attemp to Upload codes to nano arduino board, give this error: compiling.This terminated.exit

#include
after delete this line, compilation was compilation, but I have not any action on my 16*2 lcd

Gadjet said...

The includes specify the libraries to be used in the code, do you have the libraries installed that are called with the includes?

iman rezaei said...
This comment has been removed by the author.
iman rezaei said...
This comment has been removed by the author.
iman rezaei said...

tank you alot. the compiler problem with this code line:

*include EEPROM Anything.h*

after delete this line, compiling was complete but I khonw its wrong way.

Gadjet said...

I think you are OK to remove all includes except the LiquidCrystal.h as they are not used, I did use it some other code to save pellet weight values to the EEPROM.

iman rezaei said...

can you help me for reconfiguration this Micro skech for use only with a i2c 2*16 lcd?!
tank you :)

Gadjet said...

Have a look here
http://playground.arduino.cc/Main/LCDI2C

Jure Rebic said...

HY!
Kann mir jemand helfen!!!
Ich habe die chrono mit 16x4Lcd gemacht!
alles funtioniert aber Ich wolten die result in M\S und energy im J!!!
Please help!!!

Gadjet said...

I will have a look at the sketch and let you know.

Gadjet said...

Jure,
Edit the code: - Change Fps to mps and ftlbs to Jls in the variable section at the top.
float mps = 0; //storage for meters per sec value
float Jls = 0; //storage for powerper sec value

Then edit the void "output_serial_info()" function to

void output_serial_info() {

firstShot = true; //First shot has been fired so clear pellet weight adj. message
lcd.clear();
mps = float((SensDist)/(Trigger_2 - Trigger_1))*0.3048;
mps = constrain(mps,0,999); //limit mps tp plus value upto 999
Jls = ((pWeight*mps*mps)/450240))*1.35582;
//Send datat to LCD
lcd.setCursor(0, 0);
if (mps<999.9) { //Check for large no.
lcd.print("mps ");
lcd.print(int(mps));
//lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print("Juls ");
lcd.print(Jls);
}
I have not tested this but hopefully it will work.

Jure Rebic said...

Danke!!!
Nach dem kleine änderung funktioniert!!!
Ich habe noch pWeith in Gram geändert, Alles funktioniert SUPER!
Ich habe schnelle phototransistor eingebaut,,und ich hofen mich zum wird das auch am meine Airrifle funktioniern!!!
Haben sie schon am airrifle test gemacht oder nur mit CO gun???

Vielen dank Für deine hilfe!

Gadjet said...

Good news.
keep the weight in grains, the formula is expecting grains.

Anonymous said...

Hi... I am just working with my version of chrono. I try use seven segment but links to your sketches dont work anymore?

Gadjet said...

Try it again, Dropbox have changed their public sharing link policy and I will nee to update all the links in my blog posts ARGHHHH!!! thanks Dropbox!

kenan koc said...

Hi gadjet,
is important differences between opl550 or opl550a?
i bought opl550 model.
There is no mark 'A' end of part number.
is this matter for me?
Thanks

Gadjet said...

I think the only difference, according to the datasheet, is the 'A' version has a lower maximum power input of 1.4 mW/cm2 whereas the plain part has 2.4 mW/cm2.

John said...

Thanks for your great project, unfortunately the Android link does not seem to be working?

John

Gadjet said...

John,
The link was to the app inventor one site that has now closed.
I have added the link to the aptoide download store, you can download the app from there.

Jure Rebic said...

Halo Gadjet!
Ich habe das Chrono lcd schon gemacht,
Und ich wollte uber app probiern!
Bluetooth verbindung funktioniert ,
Aber das app bekommt immer fehlermeldung!
Wass kann ich machen!
Oder ist fehler beim app!
Danke im voraus

Gadjet said...

Haben Sie einen Screenshot oder eine Beschreibung des Fehlers, haben Sie das Pelletgewicht und andere Details in den Einstellungen eingegeben?

Jure Rebic said...

Ich become das fehler!
Bad argument to yail-divide!

Gadjet said...

Haben Sie das Pelletgewicht und den Abstand zwischen den Sensoren in den Einstellungen festgelegt?
Ich denke, das passiert normalerweise, wenn Sie versuchen, zwei inkompatible Werte wie Zahl und Text zu teilen oder durch Null zu teilen.

Jure Rebic said...

Ich Versuche nochmal mit neue sensor!
Die mache ich morgen fertig!
Und melde mich nochmal! Hast du noch die app mit Mps und Juls?

gab said...

Hello,
Finaly fantastic all work fine.
Could you do an update of your android APK file please ?

could you replace FPE (Energy) with velocity in Meter per second (in this case we can have the velocity in FPS unit ad MPS unit) or simply change FPS to MPS ? with this your apk will be 100 % better.

Regards and thank you foir your job.

Gadjet said...

Glad you got it going, I will have a look at the App to see what I can do but it will not be quick, maybe after Christmas.

Gadjet said...

Gab,
Just added an MPS box, not tested it, give the APK file a try and feedback.
https://www.dropbox.com/s/rnwi41ys4i50aqo/Bluetooth_Chronograph_AI2_with_MPS.apk?dl=0

gab said...

Hello,
thank you for your quick answer.
I will test it.
regards

gab said...

Hello, I test the two app Android.m'y chrono works.but on the two app, I think there is a problem, with statistic, velocity max is more actual measure velocity than maxi, I have a doubt about mean velocity and for delta fps i think it is delta between each shoot.
Standard déviation formulae is better and Has sens in statistic.
Listing of shoots on the lower screen don t work.
Regards and thank for your job.

Gadjet said...

Glad it's working, I haven't tried the app on my new galaxy 8 phone but I tried it this morning and it fails every time I start up ARGHH!
The problem is that App inventor is not the easiest tool to find out where the problems are.

There are a few people who've downloaded the app and they report it works fine so I suspect that it may perform differently on different phones/versions of Android !

Early feedback was that the Min/Max/Delta was the preferred method, I you wish to develop your own then I can send you the App inventor Code so you can make it do want you want :-)

Gadjet said...

Just having a look through he code and fixing the bug I found, currently the shot string data will only appear when the write to file checkbox is checked.

Hot water control using a Raspberry Pi Zero W

Following on from the first blog about the hot water heating control here's what I put together for the mounting. Whilst looking for a...

Popular Posts