DIY Mountain Bike trail counter

8 12 2010

Someone asked the other day for some stats on trail usage on our local trail system and while we were able to give them the number of laps done during club races, there was no data available for the amount of social riding that goes on there. Given that race days are run one day a month, I suspect that the vast majority of laps are ridden by social riders.

I spent a significant amount of time browsing the internet trying to find some instructions on how to rig up a DIY counting device but found absolutely nothing. There are several commercial counting devices available however they are several thousand dollars and priced completely out of the reach of a small club.

Thankfully, I had a local legend in the form of Kerry from K-lite to call upon who had some ideas of how we could achieve this and before I knew it, I now have a functioning trail counter. With a few parts from Jaycar, this was a ridiculously simple build (when you had Kerry telling you what needed to be done) and I couldn’t be happier with the results.

Parts:

Sensors

Counter unit

I briefly considered solar charging but decided it would be much simpler to just carry a new battery out there when you go to check the count.

How to wire it up:

1. The only tool you will need for this is a screwdriver and some side cutters. It really is that simple. Adding switches to turn off the status LED’s gets a little more complicated. I will put a ‘how to’ for this at the end of this section.

1. Take the cover off the two sensors.

2. You will notice that they are different. The receiver has a 7 port terminal block at the bottom while the transmitter only has 4 ports.

3. Start work with the receiver first. For this item, we need to connect the power as well as the counter unit.

The counter unit comes with a long cable which can be utilized for this. Firstly: Cut the cable to the desired length so you have a single plug on one end and exposed wires on the other end. The plug connects directly with the counter unit.

Feed the wire through the rubber grommet port on the back of the reciever unit.

Pair back the outer casing over the wires so the three individual inner wires are exposed and then strip a 5mm section so that the copper wiring is exposed. You will need all three wires to operate the counter.

Next you need to feed the power wire through the same port. I tied a knot in the wires so that it acted as a strain relief should the chord become entangled. I chose to use a middle segment from the counter power cable for this job. You only need two of the wires in this instance, so expose the inner wires and snip off the white cable so only red and black cables are left. Strip the remaining wires.

Now twist the red wires together from the power in and the counter. Repeat for the black wires.

You need an additional bridge wire. This needs to join between the -‘ve in the terminal box and the com in the terminal box so size the wire accordingly.

Twist one end of the bridge wire with the two black wires.

The red wires are connected to the +’ve in the terminal box.

The black wires (with bridge) are connected to the -‘ve in the terminal box.

The white wire from the counter is connected to the N/O in the terminal box.

The other end of the bridge wire is connected to the Com in the terminal box.

4. Now working with the Transmitter sensor – Feed another power wire in through the grommet and tie a knott to act as a strain relief. It doesn’t really matter what wire you use for this, however I again used a length from the counter chord. Remove the white wire as it isn’t necessary and connect the red wire to the +’ve in the terminal box. Connect the black wire to the -‘ve in the terminal box.

5. Power connectors. I used some battery clamps that I bought from Jaycar (I physically went to the store) for a couple of dollars each.

6. Waterproofing the system. It uses 12 V power and the car batteries are sealed so there are no problems there. The sensors are IP66 rated so will be fine unless you are mounting them under water. I added some silicon around the grommet where the power wires enter the sensor just to make sure.

The only thing that needs waterproofing is the counter unit. The cheapest way I found to do this was to use a waterproof Tupperware container. I added an IP67 cable gland to run the cable through and some silicone to make sure it was waterproof and since the lid is clear, you can read the count without having to open the unit.

Now you are all done. Put the cases back on and power it up and have a test run.

Additional instructions for dealing with the status LED’s.

The red LED on the receiver indicates beam alignment. It remains on while-ever the receiver can’t make a connection with the transmitter. When the connection is made, the LED will go out. Similarly, the red LED will flash when the beam is broken. If you think this red LED flash might make the counter a little too conspicuous, it can be removed permanently or a switch bypass can be put in. That way you can turn on the LED to assist in aligning the beam and then turn it off again once everything is set up. In practice, the beam is very easy to align over the shortish distances we are dealing with in a trail counter situation and it probably isn’t necessary.

To remove: If you’ve got skillz like Kerry, you can desolder the LED altogether and throw it in the bin. Alternatively, you can simply cut the pins for the LED if you don’t have the necessary equipment to de-solder. Make sure you cut them short enough so the pins can’t possibly short, I don’t really know what would happen if this was to occur but I imagine it wouldn’t be a good thing.

Since we weren’t sure how easy it would be to set up, we added in a microswitch so the LED could be turned on/off manually. We simply de-soldered one side of the LED and added the switch in serial with the LED with enough wire so the switch could be positioned out of the way inside the case.

The same thing can be done with the power LED: i.e desolder and throw in the bin. In this instance, we decided to make use of the tamper switch which was already located on the board. Simply de-solder one of the LED pins, and connect a joining wire from the LED pin to the tamper switch terminal block. Join another wire from the other port in the tamper switch terminal block that runs back to the hole in the PCB where the LED pin was previously soldered. When this is done, the power light will remain on while ever the tamper switch is held so you can quickly press it to confirm you have power and then it will default to being off again. On my model, the portion of the case which is designed to hold down the tamper switch while-ever the case is closed didn’t seem to be lone enough to actually do the job properly. You may need to trim the casting from inside the case should yours actually depress the tamper switch.

Where to install? The things that need to be considered are:

1. Visibility – Keeping the system out of site is fairly important for the integrity of the count and prevent vandalism. Thankfully, this particular set of sensors has a broad range (around 20m) and allows you to get creative with placement. Another tip is to mount the sensor on an area of track where riders are concentrating on obstacles/terrain so there aren’t as many wandering eyes to see the sensors. It is also important to mount the sensors behind obstacles so they aren’t readily visible on the approach.

2. Sensor height – The coutner isn’t infallable and will give artifactual readings. The ideal height to set the sensor is at shoulder height for an average sized rider. If you mount the sensor too low, you tend to find you get multiple counts for a single rider passing the sensors. This is usually because the arms break the beam, then the beam is broken again by the riders torso.

3. Status LED’s – LEDS’s are pretty visible for anyone night riding. Kerry was clever enough to re-wire the status LED’s to include switches which meant they could be turned off to reduce battery drain and keep the whole system hidden. Alternatively, you could just remove the status LED’s entirely as it isn’t that difficult to set the system up.

4. Artefacts: Ensure there is a clear line of site between the sensors with minimal chance of shrubs waving about in a breeze and triggering a reading. There will always be animals recorded in the readings (wallabies in our case) however this tends to be partially mitgated by mounting the sensor at shoulder height. If you have giraffes on your trail system, then you are sorely out of luck.

After a couple of weeks of field testing, I have been very impressed with this unit. I did a small calibration where a group of 17 riders came past and I got 18 hits. Since the sensors are mounted fairly high, I would expect some younger riders will probably be too short to trigger a reading so the inaccuracies in the system will probably be self canceling. So far, the unit has run for 3 weeks on a pair of car batteries. I knew someone who worked in a garage and asked him to give me a call when he got a spare battery from a car he was working on. This particular battery would still turn over a v6 engine but didn’t quite have the amps left to actually start it …. perfect for what I need.

During an 8 hour race that ran shortly after the unit was installed, it clocked 2540 hits during the day so it is generating some useful statistics.

I hope this post helps someone to solve the same problem I had and hopefully help someone acquire some grant money somewhere along the line.

A massive thanks to Kerry for figuring out the design of this, without him, it simply wouldn’t have happened.

DIY sensor with DIY mounting bracket. It looks fairly conspicuous but even people who had a rough idea where it was located had difficulty finding it.

Power - it is now hidden under some branches and leaves and is very hard to spot.


Actions

Information

3 responses

13 12 2010
fwoark

Very nice work. I may have a go and see if I can building one for Glenrock over xmas. How many riders are we averaging at Awaba per day?

13 12 2010
pi11wizard

Not 100% sure at the moment. In a bad weather week it got a couple of hundred riders.

I really need a non race week to get a reasonable estimate.

Sent from my iPhone

27 02 2011
Treadly

I’m guessing you could make a two way counter by having two of these next to each other and having a blocking signal between the two. You would need a small pulse generator, (maybe just a capacitor and resistor circuit or maybe a 555 Timer IC), which would block one from operating when the other one is triggered. Make the pulse, say two seconds long, so that the rider has time to pass through the second counter without being counted.
That way you could count how much traffic was headed in each direction, (on a cycle path for example.)
I haven’t looked at the circuit closely but I imagine it could be done.

Leave a comment