Our kids are off to college now but I could not stay away from the Science Olympiad fun. So I plan to play the Event Manager for theimg_20161017_235808Division C – Electric Vehicle” @ the San Joaquin County Event.  That will be my first time to run an event, so it will be quite interesting.

The event does not need to much preparation except for a pretty far reaching timing setup. Schools might have the Vernier Photogates which can be used with a laser pointer as a long-range solution. But I wanted to try to build my own `lower cost’ solution for people outside the Vernier eco system;-)

I build some little photogates earlier for testing our Maglev vehicle for 2013. They worked fine for that setup, but they would not work for the Electric Vehicle event because their short range.

So I knew, I needed some laser diodes as light sources and a receiver side which would work with them. For the diodes, I found little diodes @ebay, for instance 5* 5mW for Arduino for < $8 , but there are many choices out there. 5mW is what the normal laser pointers are using and it is more than enough for the distance we need. I did choose a red beam to make the lines visible. With a IR diode, I might have been able to use my original detector, but it would be very hard to aim:-(

laserreceiver_schemFor the receiver side, I choose the SFH 3310 photo transistor. It’s relatively cheap @ $0.83/per and it seems to work pretty well. I added another transistor and some resistors and LED from the parts bin to the receivers to that I can quickly see that the link is closed. The final circuit is shown in the schematic. Overall electronic parts cost for two gates is < $10.

I designed little enclosures for the receivers to hold the electronic pieces and also help to keep ambient light away from the photo transistor.  They were 3d-printed but needed a little bit work to make them fit as I wanted. I also printed little adapters for the laser diodes to fix them to LEGO stands. 3d

On the software side, it’s almost the same as the original gate setup. The receivers interface to an Arduino which does the timing. The laser diodes have an Enable pin, but so far, I left them simply on. The updated sketch is here: lasergate It also includes some local LEDs on the Arduino to see how it sees the receivers and a little display to work without a big laptop/display. Both are not really needed, but nice to have.

 

I also rebuilt my adapted dclock widget dclock-2-2-2 and it still seems to work on Ubuntu 14.04;-) I was running it on my laptop, but it should be easily buildable on a Raspberry Pi or similar;-)

Overall, I’m very happy with my setup. I tested the beam range to > 4 meters (the length of the wires I was using) and they worked just fine;-) So, that setup should work just fine;-)

As always, have fun exploring;-)

Update 11/09/2016: It turns out, my original scetch was sometimes slow to react. So I updated it to limit the LCD updates to about ten per second. That helped a lot. I now reliably pick up a 6mm (1/4″) obstruction at more than 6m/s (13mph). That’s fast enough for me;-) If it’s still a problem, I would remove the running updates for the LCD completely and show only the final time.

The new sketch is here: lasergate_20161109