tag:blogger.com,1999:blog-2340563362173739234.post874843157607952587..comments2022-04-07T10:32:32.715+01:00Comments on Team Barnato: Laptimer Arduino SketchMatt wallhttp://www.blogger.com/profile/05731373794003740610noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-2340563362173739234.post-1903522157425580152018-03-17T08:32:35.518+00:002018-03-17T08:32:35.518+00:00Hi Matt,
I really like your post, thanks for shar...Hi Matt,<br /><br />I really like your post, thanks for sharing.<br />Me, i do a lot karting and i'm interested in building a lap timer for some while. I have some ideas which i would like to discuss with you. Is that possible?<br />Anonymoushttps://www.blogger.com/profile/09843820002681438800noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-31321287458750091812016-05-04T12:59:24.009+01:002016-05-04T12:59:24.009+01:00The reed switch I have on order which looks very l...The reed switch I have on order which looks very like the one on my cheap timer is sealed in a plastic block with 2 mounting holes. Needs to be mounted using plastic bolts and rubber grommets to absorb the vibration, will only work if the flooring is non magnetic.<br />The laptimer I have is very basic being a handheld stopwatch with the reed switch wired in parallel with the lap button so it couldn't handle multiple strips. Being able to set a number of strips per lap would be a solution but you would probably need a reset button in case a strip is not detected. Anonymoushttps://www.blogger.com/profile/03872120445535053096noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-39051195059728767542016-05-04T10:37:36.639+01:002016-05-04T10:37:36.639+01:00I've always stayed clear of the reed switch fo...I've always stayed clear of the reed switch for the reason above but I've never cut open a pro system, I always assumed (wrongly) that they would use a Hall Effect. This is good news. I think I'll look into this a bit more as this would simplify things a bit. Would just need a small box to house the reed switch and velcro it it the kart floor pan (or some more permanent method if its to stay on one Kart). <br />On your cheaper lap timer how do you set it for more than one magnetic strip? My latest version is using a 2.7" touch screen so some menu options are possible. I've got a few thoughts on how to do this by pressing the touch screen just before crossing the start finish line and then using the lap time minus 3 or 4 seconds so switch the sensor back on again maybe? Will have a think as the intermediate timings may also be useful if the track supports it.Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-19598167523707207432016-05-04T07:17:52.594+01:002016-05-04T07:17:52.594+01:00I also thought Hall sensor but I have seen picture...I also thought Hall sensor but I have seen pictures of the Alfano sensor cut open for repair and it does in fact use a reed switch. I also have a cheap latimer and that uses a reed switch and it works on my home track.<br />The gps may just become a logger for analysis afterwards, the intention is to use it at 10hz for accuracy. What I have found when using a 5hz logger in the past is that although the absolute accuracy is as you say mot very high, the relative accuracy is,so that points within one lap are very accurate relative to each other so I think lap times should be quite accurate. Anonymoushttps://www.blogger.com/profile/03872120445535053096noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-26667279349009213712016-05-03T14:26:10.803+01:002016-05-03T14:26:10.803+01:00Hi Dave,
Its definitely a good idea to try and use...Hi Dave,<br />Its definitely a good idea to try and use the tracks magnetic strip. I've looked into this as well before opting to go with the IR system. What I found was that a Reed switch was too slow (being mechanical) and your speed over the strip is too quick for the reed switch to react, also I'm not sure there's enough magnetic strength in the strip to operate a reed switch even when stationary but I've never checked this. The pro systems use a Hall Effect sensor (an electronic reed switch) to detect the strip but again I wouldn't know how strong the magnetic force is from the strip to specify the right hall effect switch. Another thing to consider is how many magnetic strips the circuit has? Some have 1 which keeps things easy but some have 2 or 3 strips around the track for intermediate timing etc. You would need a way to tell the timer how many strips are in the track and which one is the start and finish strip. E.g. if you leave the pits you may hit an intermediate strip first, but if you start from the grid then you may hit the start/finish strip first. Maybe have a button to press just before the start/finish line? <br />GPS systems are probably the lowest accuracy (and the most difficult to build) as a good GPS sensor will only achieve around 2-5 meters accuracy at best (My 6ms accuracy works out at 17cm at 60mph) and will only really work on outdoor tracks. It’s still better than hand held stop watches by a considerable amount though. There are GPS lap timers available for smart phones so you could always buy a cheap smart phone with GPS (or use a standalone Bluetooth GPS unit) and use that as your lap timer?<br />Which ever way you decide to go, keep us posted as its always good to share knowledge and I’d be very interested to see if you could get the magnetich pick up option working?<br />Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-21774619504230338962016-05-03T11:50:25.936+01:002016-05-03T11:50:25.936+01:00Thanks for your response, I have no idea where I g...Thanks for your response, I have no idea where I got the 40ms from,as you say it's 6ms which is not a concern. I have actually decided to try a magnetic reed switch as the trigger since the track I normally go to has a magnetic strip but if that fails I will look again at your ir version. Also looking at gps timing but suspect that might be a bit more challenging, might make for easy sector times though. Parts aren't the post so I will let you know how I get on.Anonymoushttps://www.blogger.com/profile/03872120445535053096noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-17952207823345705012016-04-22T09:01:12.766+01:002016-04-22T09:01:12.766+01:00Thank you very much for sharing your information.....Thank you very much for sharing your information.. You are the man. <br /><br />Im using 20x4 lcd. I think your code is just keeping last lap info and shows difference between last lap and current lap. im planing to do some improvements, <br />-store and show Best lap<br />-create a new file for each start on SD card<br />-warning sound for new Best lap <br /><br />I'll share them here if I succeed.<br />Best regardsAnonymoushttps://www.blogger.com/profile/13646087336669543972noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-3696326348133847422016-04-22T07:42:48.018+01:002016-04-22T07:42:48.018+01:00OK, so I did some more checking last night and I g...OK, so I did some more checking last night and I got my accuracy figures slightly wrong. I'll try to explain.<br />When you first enter the beam you need to count 3 identical length pulses. This takes at a minimum (with my code) 3.6ms, however this is the same every lap so the trigger point would be in the same place. The accuracy of the system is set by the maximum break between pulses. If you enter the beam at the start of one of these breaks then the system will wait until it receives the next pulse before starting to count. In my code the maximum break is 6ms currently, so the worst accuracy is 6ms. As stated above this 6ms could be reduced to 1.2ms to match the other breaks and the accuracy would then be at worst case 1.2ms. <br />By the way, professional systems (AIM) use similar code and has a maximum break of 9.3ms so they are not as accurate.Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-35697944040253987532016-04-21T19:49:29.531+01:002016-04-21T19:49:29.531+01:00So a good set of values for the second transmitter...So a good set of values for the second transmitter would be as follows:-<br />Change the transmitter to:-<br /> pulseIR(780);<br /> delayMicroseconds(1000);<br /> pulseIR(780);<br /> delayMicroseconds(1000);<br /> pulseIR(780);<br /> delayMicroseconds(5000);<br /><br />Then change the receiver sketch as follows:-<br />#define MAXlowPULSE 45 // the maximum pulse count we need. 900us / RESOLUTION = 45<br />#define MINlowPULSE 35 // the minimum pulse count we need. 700us / RESOLUTION = 35<br /><br />This should be enough difference between the 2 cars<br /><br />Hope this helps<br /><br />Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-34888390647376373202016-04-21T19:36:31.535+01:002016-04-21T19:36:31.535+01:00Hi Dave,
The 40ms is only a reset time if transmis...Hi Dave,<br />The 40ms is only a reset time if transmission stream isn't received (its not the time for the receiver to get 3 pulses). The total transmission time for each repeat is just under 10ms, so the accuracy would be 10 thousandths of a second.<br />This could be shortened by removing the 6ms break and replacing it with another 1200us break. Then the total time for each repeat would be under 5ms or 5 thousandths of a second. A further increase could be to reduce the 1200ms breaks to 600us and then your accuracy would be in the order of 2 thousandths of a second. Beware though, reducing the LED of time will significantly increase the power consumption and reduce battery life. My example code has the LED on for about 7% of the time so the batteries can last in the order of 40ish hours. <br />The transmission graphs can be found here http://teambarnato.blogspot.co.uk/2016/02/ir-laptimer-using-arduino.htmlMatt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-50963278903601171212016-04-21T19:29:44.742+01:002016-04-21T19:29:44.742+01:00This comment has been removed by the author.Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-38356206871274401322016-04-21T19:15:34.928+01:002016-04-21T19:15:34.928+01:00Hi, glad this was of some use. I assume your speed...Hi, glad this was of some use. I assume your speed should have read 60kph not 60kps? the maximum speed will depend on what IR LED's you use (beam angle) and how far you are from the transmitter. You can easily expect 200kph to work so you should be fine. I assume you have the transmitter mounted on the car and the receiver on the trackside (opposite to my example)? I would recommend dropping the 6ms break in the transmission to 1200us and this will help with faster signal reception, but it will use more power from the batteries.<br /><br />If your running 2 transmitters the yes you'll need to change the code in both the 2nd transmitter and receiver. just use some values outside the range of the first one. I'll have a look at the code and recommend something shortly.Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-16279150918823638462016-04-21T13:09:51.894+01:002016-04-21T13:09:51.894+01:00I presume that due to the fact that on each lap th...I presume that due to the fact that on each lap the receiver could pick up the transmitter at a different point in the pulse stream, this has an inherent inaccuracy of around 5 hundredths of a second? If that is the case is there any way of reducing that such as by leaving the signal high rather than low for the 40mS and then recording the time at which the signal was first detected before then validating the signal by counting the off pulses? By the way this is the perfect solution for me if only I can convince myself that it is accurate.<br />ThanksAnonymoushttps://www.blogger.com/profile/03872120445535053096noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-32878902349389898732016-04-21T10:32:36.413+01:002016-04-21T10:32:36.413+01:00Hi Matt, First of all thank you very much for your...Hi Matt, First of all thank you very much for your sharing. <br /><br />I have been looking for lap timer for a while. So everything was ready and waiting on my table, i updaload your sketch and wired up everything, it started to work in 5 minutes. Great !!! .. <br /><br />But i cloudnt test it yet. may be you can answer these quesitons before..<br />- How much fast can i go without reading problem? im using traxxas erevo, average speed is 60km/s. <br /><br />- if one of my friend decided to use same code i think i have to change a value both receiver and transmitter side, right? which value should i change for another user? <br /><br />Anonymoushttps://www.blogger.com/profile/13646087336669543972noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-64338260663110839542016-03-20T16:28:09.693+00:002016-03-20T16:28:09.693+00:00Matt thank you so much !! your are amazing!!Matt thank you so much !! your are amazing!!Anonymoushttps://www.blogger.com/profile/02327842456246381933noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-41091911109530420082016-03-18T08:55:43.213+00:002016-03-18T08:55:43.213+00:00Hi Jorge,
There is a link at the top of this page ...Hi Jorge,<br />There is a link at the top of this page which will take you to all the images I have, or click here<br />http://teambarnato.blogspot.co.uk/2016/02/ir-laptimer-using-arduino.html<br />Matt wallhttps://www.blogger.com/profile/05731373794003740610noreply@blogger.comtag:blogger.com,1999:blog-2340563362173739234.post-74872533155659803842016-03-18T03:39:28.952+00:002016-03-18T03:39:28.952+00:00Hi, is there any image with the wiring, its been i...Hi, is there any image with the wiring, its been impossible for me ive burn a few sensors without success, can you sir help me out, thanks in advanceAnonymoushttps://www.blogger.com/profile/02327842456246381933noreply@blogger.com