Having just purchased a half decent bicycle, and living in a city with a bike theft rate almost as high as New York, I wanted to have some peace of mind that if a thief with an angle grinder were to cut through my U-lock I could still catch them.

My main design constraints were as follows:

  • The device has to be Arduino based so that if I run into trouble I can easily search the forums for help
  • Whatever I make has to be able to fit into a small bag that goes under my seat
  • The battery must last for a very long time, at least a few weeks. I don't want to have to plan my bike rides around my lock being charged or not.

This project is pretty cheap, especially if you compare it to the cost of replacing your stolen bike! I've outlined the cost of all the components used in my design below. I was able to use some old parts I had lying around and hopefully you will too. If I had bought everything needed brand new this would have cost about $225.



  • 2S Li-Po Battery Charger
  • Soldering Iron
  • Wire Strippers
  • Philips Head Screwdriver
  • Flat head screwdriver (or some other good prying tool)
  • Digital Multimeter

Step 1: PNP Transistor Circuit

The transistor is a device that is used for switching. A very small input can enable a very large current output. In the case of the TIP127, it can handle 5 amps and has a gain of 1000. Roughly this means that if you were to need to drive 5 amps your effective input would need to be 5/1000 amps.


The PNP transistor is "off" when you connect the base to the positive side of your circuit and on when it is connected to ground.

The way it is used in the bike lock is pretty clever I think, the steel cable of the lock will connect the positive side of the circuit to the base of the transistor. When the lock is cut, the connection is broken and the path of least resistance will be to ground. When the base is grounded like this power is supplied to the Arduino

This is the clever part of this design. It means that we will only be using full power power during the small amount of time it takes to lockup your bike. The rest of the time it will only be using the small amount of power used to supply the transistor.

Test out your transistor circuit on a breadboard before soldering to your Arduino prototyping shield. While testing your circuit use a switch in place of the retractable lock in the next step. With the TIP127 hook the circuit as per the schematic above. If you want to use a different transistor than the TIP127 the only thing that will change is the value for R1.

<p>ya I made it for my scooter....</p>
<p>If you were a cyclist in college, then you probably know the pain of a stolen bike. This guide is fantastic! At Bicycle Blue Book, we specialize in getting people an accurate idea of how much their used bike is worth. Keeping your used bike safe is an essential piece of responsible ownership, and this guide makes it easy! Nicely done.</p><p>If you're looking for a used bike to protect with this lock, <a href="http://www.bicyclebluebook.com/" rel="nofollow">check us out!</a></p>
<p>Hi stbennett, thanks for the posting on this project, I would like to try the similar project on the GPS and GSM tracking project as you have did.</p><p>Found that some one mentioned that the Arduino code you has post not working? can send me the working version to my email at <a href="mailto:armbeduino@gmail.com" rel="nofollow">armbeduino@gmail.com</a><br>I will try to get the HW and the code when have it to test out the project and see what can be modify and improve from there<br>Thanks</p>
<p>Hey, the code is working fine. People have been confused with the .ino extension on the file (Arduino for mac). You can just change the extension to whatever you want or I uploaded a .txt file so you can copy and paste into Arduino from your favourite text editor.</p>
Oh I see, if that the case, sure will try it out, thanks a lot
<p>Hi, I was hoping to feature this on another publication. If you're interested in answering some questions, could you message me here? - Thanks!</p>
<p>Plz send the code to my email... faiz_hijaukuning@yahoo.com.my</p>
<p>Hey can you please send me your biketheif code to my email.. the code you put here its not working..plz its bit urgent.. my email id- designbavi@gmail.com</p>
<p>and me too, please :) m.m.gieroba@gmail.com THANKS ! :) </p>
<p>me too can u give a sketch? thank you... jonellbalanay@gmail.com</p>
<p>Could you have used the Byonics Tiny Tracker ?? It's cheaper.</p>
<p>The Tiny Tracker is for licensed radio amateurs, as it use an APRS-frequency (144.390 in America, 144.800 in Europe). But it could be used on a freeband frequency from point-to-point (not much distance though).</p>
That's a great idea I was thinking of the same thing. <br>But its too conspicuous under the seat. Maybe having it within the tubes or something would do.<br>btw which bike is it? looks really sexy
<p>Maybe for V2 haha. But It would be more difficult to design the electronics to fit in there. Might require a custom PCB. Too work for a weekend project.</p><p>Its a 2012 Focus Variado, just bought it of Jenson USA. I'd defiantly recommend it, super fast.</p>
<p>Nice project, as an exercise.</p><p>But you can have a decent GPS/GSM tracker for 20-30$, just search on eBay. </p>
you could rig it to charge from a wheel mounted turbine, then it would charge while you ride.
<p>First, let me commend you on a job well done - this definitely looks like a project that is truly the spirit of what Instructables is all about. Working on some Arduino projects myself right now (one of which I have raised money to develop commercially), I have a deep appreciation for all the work that you did here.</p><p>Second, if for some reason you get a second bike, or this unit happens to get damaged (for some reason), there is a company out there that has something that might be a suitable replacement at $129: <a href="http://bikespike.com/." rel="nofollow">http://bikespike.com/.</a></p><p>Keep posting!</p>
<p>Or get the Spybike GPS Tracker for around $150 <br><br>Though, very interesting project. I would be a bit worried about the saddle bag getting tampered with before the bike getting stolen though. </p>
<p>They may search it for the keys</p>
<p>Big minuses - easy to remove and large size.</p><p>Better use small tracker and mount inside bike and only antennas outside (in bottle holder). For example https://www.indiegogo.com/projects/arduino-gps-gsm-anytracer</p>
<p>This is true, however bike thieves in my experience aren't the most careful. If something is identifiable as a commercial bike tracker they will defiantly try to tamper with it, e.g. bike spike, certain integrated tracker products and others. My DIY solution just looks like a saddle bag and my bet is that 9/10 thieves won't think twice about it.</p><p>Thanks for the comments!</p>
I'll have to forward this to my step son he was trying to come up with something like this last weekend. my best suggestion was an old smart phone concealed under the saddle and high capacity li-po cells to power in in the seat pillar

About This Instructable




More by stbennett:DIY GPS Tracked Bike Lock 
Add instructable to: