OpenBikeSensor Measures Close Calls

An OpenBikeSensor

Cycling is fun, healthy, and good for the environment. But unfortunately it’s not always the safest of activities, as inconsiderate drivers can be a significant hazard to cyclists. Several countries, including Germany, France, and Belgium have introduced legislation mandating a minimum passing distance of at least 1.5 meters between cars and bikes. Enforcing such a rule is tricky however, and without accurate data on average passing distances it’s hard to know how many drivers are following it.

Enter OpenBikeSensor, an open-source hardware and community science project designed to gather exactly this information. Currently in its prototype phase, it aims to make a simple bike-mounted sensor that measures the lateral distance to any passing vehicles. The resulting data is collected online to generate maps highlighting danger zones, which can ultimately be used by city planners to improve cycling infrastructure.

The hardware is based around a set of ultrasonic sensors that measure the lateral distance to any large object. A GPS module keeps track of the bike’s location, while an ESP32 reads out the data and stores it onto an SD card. The user interface consists of a handlebar-mounted display that shows the system’s status. There’s also a button that the user needs to press any time they are passed by a vehicle: this will trigger a measurement and log the location. Once back home, the user can connect the OpenBikeSensor to their WiFi network and download their trip data.

The initial results look promising, and any project that gets people cycling and tinkering with electronics at the same time is worth looking into. It’s not the first time we’ve seen bike-mounted sensors either: people have designed their own sensors to measure air pollution in South America, or simply their own bike’s speed or tire pressure.

54 thoughts on “OpenBikeSensor Measures Close Calls

  1. very cool technology-wise and aesthetically pleasing in its own way.
    Might I propose a low-tech solution. a 1.5 meter dowel or which has a permanent market attached to it. Flexible enough to bend easily, and to break when someone is far too close. If a significant number of cyclists did this, you could find little marks on the cars of the overly aggressive drivers. Makes it easier for sane drivers and cyclists to quickly identify the problem drivers.

      1. have same problem as a runner. When I had carbide tipped poles stored in a running rucksack so they protruded only a couple of inches, that still didn’t stop the odd car hitting me.
        But it did give me satisfaction, because if they complained, they have broken two laws – hitting a pedestrian and failing to stop at the scene of an accident.

    1. Funny enough, people are already doing that with pool noodles over here in germany.

      But that’s just yet another reason to get showered in washer fluid. Or have it kicked by motorcycle riders.

    2. I have a “Lupin” magazine from the 1980s (Argentina) proposing a car antenna (those made with steel wire= attached to the side of the bike and with a tiny red flag on the end.
      And I quote “Naturally, car drivers will be more worried about scratching their car than hitting a cyclist, so they will overpass you at a safe distance”

  2. Few years ago I found a scythe in a garage sale, and I had nothing else than 2 velcro straps to put it on my recumbent, so it was standing up on the luggage carrier, the blade horizontaly facing backwards…
    I had to go 2 km uphill, it was in the french Alps, and recumbents don’t go fast when climbing (but downhill is another story ;o), and I’ve never been passed by from so far away any other time, there were thunder sounds around the montain, so I wasn’t very quiet (didn’t want to have fun with big sparks at that time), but the faces of the drivers of the cars coming from frontwards made me laughing nearly all the way ;oD.
    Best bicycle hazard spacer ever !
    It’ 1,5 m on roads but 1 m in town for french regulation, there’s no such tthing in Swizerland, and I felt very unsafe riding in Lausane.

    1. That’s stupid and dangerous. If you’d clipped a car tyre you could have killed yourself, and if another cyclist overtaking you had to pull in suddenly, you could have killed them. Not to mention the risk of cutting an artery open whilst just waking around your bike.

      1. It is worth noting that he was not suggesting it as option, merely recounting a time when he needed to transport the tool. From the sound of it, the scythe was also arranged so as not to extend to the sides of the bike at all. I obviously don’t know for sure, but I wouldn’t expect it to be an order of magnitude more dangerous than biking on a mountain road, or handling a scythe, normally is.

        1. Fair point, think you might be right on re-reading.
          But cyclists still have a duty to carry stuff safely, and it sounds like this might be borderline – though if it was being transported back from a garage sale hopefully it was fairly blunt.

  3. I got hit on purpose while biking in Vancouver,and had to fend off
    a jeep full of (words fail),biking,in Portland,scared them so bad they almost flipped the jeep ,big D bike lock,figured if im going down one of them is chewing crome molly,in New York City there are no people pedaling,but the motorcycles have guards on the handles and foot peggs so that when they get squished it doesnt pin them.
    Gizmag used to feature so much cool bike stuff,lot of it hacked or
    one off,or prototypes,like a laser grid projector that would show potholes and other hazards,in pitch dark,now they are newatlas and feature million dollar hohum

  4. I see a problem with this setup, an human problem, since the user needs to press a button to measure the distances, he can alter the data gathering at will by only collecting data that he feels favorable and avoiding unfavorable data. A “bad” user could aproach cars at will to make a road to seem more dangerous, or pass almost touching stopped cars (i.e. cars waiting in a stop or a traffic light) to make the car drivers to look like psychos.
    To be trustworthy, this sensor would have to be automatic, and also take pictures of the ground and/or the surrondings to prove the user is complying with traffic regulations.

    1. Trust me, there is absolutely no need to falsify that data. The majority of drivers over here pass _way_ too close, with extreme instances being less than 50cm.

      Also, cyclists here are trying to make a point, that of being actively and willingly endangered by motorists. Falsifying data would be too obvious and counterproductive.

      1. Yeah, but even in the case the data is not fake, since the non millitary GPS accuracy is not enough to give an exact location, the administration could distrust the gathered data because there isn’t any guarantee the users that gathered the data were respecting traffic regulations and circulating where they are supposed to.
        So that’s why I think the system should gather more info (pictures) If they ever want the city council (or any government organism) take that data into account in order to improve cycling infrastructure and/or legislation.

        1. There are already a few cities here in germany, which use the collected data, e. g. Stuttgart, or have announced that they will do so.The GPS accuracy is more than enough, because the aim is not to investigate individual incidents but to identify dangerous sections of roads. Therefore, it is also unnecessary (or even forbidden) to take pictures.

    2. To be useful, it needs to be recording all the time so we can tell the difference between a road where someone was passed by 100 cars closely and a road where 1 car passed 100 cyclists closely. As is, we end up with https://xkcd.com/1138/ (you know which one this is without clicking by now)

  5. More useful probably would be this sensor on the front/side of cars, as a standard feature. I’ll bet most drivers can’t easily judge how close they aware to cyclists. This would help no end.
    As would wider roads. So many roads were built for the occasional horse, not 2 cars and a cyclist passing.

    1. Overtaking a bike in a car is very simple: if you can’t use half the other lane, don’t do it.
      Does not really require sensors. On the other hand, I’ve “met” my share of drivers, some even cutting it close on purpose. So coupling such sensor with brake assist does make sense. Aren’t there anti collision sensors in the show-off class of cars? Do they handle bikes?

      But I’ve also seen a lot of cyclists swerving onto the drive lane without so much as a backwards glance…

      1. Or even better: A bicycle is equal to a vehicle. If you want to overtake a car or a tractor, you’ll go into the opposing lane, hence: do that with cyclists aswell. It’s not only safer for them, but also for you. If a cyclist falls while you’re overtaking them and theres witnesses, you’re screwed. Even if there was no contact, because the argument will still be you passing too closely.

        1. There are rules to be considerate to all users of the road. That means cyclists and tractors should pull over to let people past then when it’s clear they are impeding the flow of traffic.Just as there are inconsiderate car drivers there are many inconsiderate cyclists. Far too many here in the UK that cycle at night with no lights and dark clothing – idiots – but it’s your fault as a car driver if you dont see them for their stupidity. There are also people that walk their dogs at night on country roads with no footpath doing the same thing. Or horse riders expecting you to give them a wide berth but are on their phone thus not in control of the unpredictable animal.
          But it’s always car drivers at fault.

          Yes a cycle should be equal to a vehicle. They should pay road tax and require insurance and a test to ride the cycle, should require helmet to be legal and lights at night along with high vis or protective clothing. Just like motorcycles and all the illegally ridden electric bikes.

          1. There is no such thing as road tax. It’s a car tax. “Vehicle Excise Duty”. You’re not paying for utilizing the road, you’re paying for utilizing a vehicle.

          2. @Phrewfuf

            All the more reason why a vehicle such as a bicycle should be taxed.
            And you’re wrong, I only ned to pay road tax if I use my vehicle on the public road. If I use it on my private motor circuit I dont have to pay. Yes its’ called VED but that is a tax to use a vehicle on the road, not for the vehicle itself.

          3. No-one pays road tax in the UK. But for Dave’s information, owners of electric cars in the UK don’t pay vehicle tax anymore than bicycle owners. It’s the government’s way of encouraging vehicles that pollute less.

            Many cyclists will be covered for third party liability by their household insurance.

            The Vienna Convention on Road Traffic means you can’t impose licences or test on bike riders, at least not ones coming from abroad.

            Lastly, cyclists should of course respect the legal requirement for lights and reflectors; failure to do so will guarantee that the cyclist is partly or wholly to blame in the eyes of an English court. However, I see more cars being driven at night with no or defective lights than bikes without lights. If you have any difficulty seeing an unlit cyclist in front of you with your car headlights, consider getting your eyesight tested or surrendering your licence because you won’t be able to see any other obstacles in your path : roundabouts, T-junctions, trees, etc.

          4. What you’re proposing Dave, is a tax on poor people and children, and discouraging alternatives to cars as a mode of transportation. As someone driving a car you should be happy there are people using alternative methods of transportation because that means there are less cars on the roads to cause traffic jams. Nobody has any kind of duty to yield the road to you and you would never yield the road if you were only able to drive at the speed of a tractor. You do not own the roads, they are available to everyone as a means to get somewhere, and if you drive a car that damages them more than a thousand cyclist ever could you should be expected to pay more taxes for their maintenance. Less cars means, less pollution, less noise, less children being run over, more space for people in public spaces.

        2. I accept your terms. Let’s treat bicycles as equal to vehicles.

          Drivers must get a license.
          The bicycles must be submitted to a safety inspection every year and pay taxes for tags.
          Bicycles must have all required safety equipment: Headlights, tail lights, brake lights, turn signals, mirrors, etc.
          Bicycles must adhere to any minimum vehicle speeds for a road and also must not impede traffic.
          No lane splitting or passing on the right–even if normal traffic is stopped at a light or other traffic control device. Wait your turn like a vehicle.
          And so on and so forth…

          1. As a cyclist, sure. I’m happy. Road tax would be zero for bikes as they’re zero-carbon (in the U.K. at least)

            Bikes already should have working brakes, and requiring lights during the day also (in case you don’t get home before dark) would be fine. Helmets, yes. Turn signals and wing mirrors aren’t actually required for cars, and would be absurd for bikes.

            Bikes adhere to minimum speeds – sure – there’s no minimum speeds in the U.K.

            No passing on the inside (I assume that’s what you mean by right? You drive on the right?) – absolutely. It’s a stupid move. But cars do need to be aware that cyclists might overtake them. In heavy traffic I used to often be overtaking a line of cars which were only doing 15mph. They could be… surprised.

        3. That rule will not work for the simple reason that bicycles cannot run at nearly the speed of cars. If we implemented that rule we would be slowing traffic to roughly the rate of the slowest bicycle and causing all sorts of passing accidents. The real answer to high traffic cycling areas is a bicycle lane.

      2. Here in my part of the US, overtaking a cyclist who is in the gutter isn’t particularly difficult whilst maintaining your lane, if you have a narrow car like my Honda Fit. Snug up to the double yellow and pass at a few MPH faster than the bike – that way the air wake from your car doesn’t affect them. Just always check that there aren’t any hazards in the gutter like storm drains or roadkill before passing.

      3. Sadly, drivers who use the opposite lane when overtaking bikes are basically just cyclists and motorcyclists.

        Besides, it’s often not necessary to use the opposite lane to pass safely. I used to cycle commute along a major road, cars doing 60. The lane was plenty wide enough for lorries to overtake me without crossing the middle lane.

        In other places where the road wasn’t wide enough for them to pass me safely without using the other lane, I’d unapologetically place myself dead centre on the lane to prevent them. But I would be doing 20+ mph – these smaller roads almost universally being 30 limits. As soon as there was a gap or it widened, I’d move left to let them pass.

        It’s more an issue on small roads where there’s solid traffic and parked cars blocking the road etc. and with many cyclists plodding along at 5mph or being idiots, I’ve got sympathy for drivers who want to pass without waiting for a gap in oncoming traffic.

  6. This project could benefit from a dynamo and bluetooth connection to a smartphone.
    The mounting position on frame makes me wonder if there is a software compensation for the distance to pedal (or hip). The 1.5 m must be from the closest part of the bicycle or person…

    1. Cycling NEEDS to adhere to the rules of the open sea. Larger vessels have the right of way. If you flaunt (and the ones here in DC do indeed flaunt) your “I have the right of way” as an excuse to run stop signs and red lights because you think it’s safe because you’re on a bicycle, and you get clipped or hurt, that’s your fault.

      I’ve installed a dash camera because of the idiotic pedestrians and cyclists in this town. I give both plenty of room, but both sets seem insistent on going against common sense in how they operate because the law is written by idiots who don’t bother to take physics into account. No matter how careful the drivers are, a cyclist or pedestrian who fail to adhere to common sense will eventually get hurt.

      If I’m the vehicle in question, my dash camera will be used as evidence to exonerate me from the problem.

      I rode a bike like crazy as a kid. I knew the rules of the road and never had a problem, but I also never did stupid crap like they do today. I knew I was hundreds of times less massive than a car and that it could easily kill me if I wasn’t careful.

      I could go on, but I won’t.

  7. Here in the Netherlands, we solved it the other way round. if there is a accident with a car and a bike, the car driver is always liable. that rule did not make bike riders more reckless as a bike rider puts his own life int the scale, but it made the car driver more aware of bikes.

    but then again, I live in one of the few countries where biking is absolute normal. not in the least because of the relative flatness of the land.

    1. Doesn’t this “car driver always liable” rule enable insurance scam opportunities? Car has it’s front end sticking out a bit for a turn… cyclist deliberately nails the car, rolls over the hood and plays hurt like an expert football (soccer) player. Pay me! Just seems like a lower common denominator, rather than raising the skill level bar.

    2. Unfortunately that might work for you but it’s down to the level of maturity that your fellow countryman have.
      For the UK, the general maturity of cyclists is somewhere near the maturity if gun owners in the USA.
      So crash for cash bikers would become the norm.

  8. I’ve made one of these previously based on the nearmissometer by GreyCells which included a gps module. I also made a different version based on an openmv board and a nir TOF distance sensor vl53l1x, this was fast enough to allow the recorded distance to be written as an overlay on the video and saved into the video frames directly. https://twitter.com/fyinnertube/status/1175038793709215744?s=20&t=jQ42RIhPcbKcX9U37IvmXQ Both the ultrasonic and NIR Tof sensors worked reasonably well but the use of the openmv H7 allowed for a visual sanity check in case of a spurious distance measurement (which both sensors did occassionally produce).

  9. From my experience as an avid cyclist, most cyclists are just normal road users, they do stupid things just about as often as car drivers. While it doesn’t excuse their stupidity, one needs to notice that stupid cyclists usually only put themselves at risk, whereas stupid car drivers endanger others, especially when these are not in a car themselves.
    Discussions about who’s to blame for what nonwithstanding, I think it’s a fairly good idea to catalogue distances of cars to cyclists by using sensors. That way, we’ll be able to figure out where people pass at a potentially unsafe distance and will then be able to do something about it. Without data, we can only rely on some intuition that might lead to planning decisions that ultimately serve neither cyclists nor motorists. However, if we have data, we can figure out the reason for the data being how it is. Ultimately, promoting bicycle use also serves people who love driving cars, as there will be fewer cars on the streets (thus smoother traffic) and you’ll also finally be able to find some parking space close to where you’re driving to again. If you want to drive fast and recklessly, please take your car to a race track.

    1. The post starts logical… Can’t argue with having data. But determine a “safe separation distance” seems arbitrary. Is it 1.5m? Why? or 1m? Different jurisdictions have different separation requirements. When I grew up there was NONE specified. Just… motorist, avoid cyclist. Cyclist avoid motorists. And motorists don’t DOOR a cyclist. I made it thousands of kms in a very dense city! And if the car missed me be 30cm, well, it didn’t hit me so it was evidently safe, even if it didn’t FEEL safe. But then f___ make their position clear… “drive fast” is equated to reckless. There is data to elaborate this conclusion? I really think that with our technology and safety orientations these days, we are indeed going back to horse and buggy speeds. Maybe motorists will have to figure out if driving backwards might be acceptable to people that don’t “feel” safe?

    1. There is, or at lest was, an app for the Edge head units that did gather passing distance, speed, speed delta, and how many cars passed you vs. how many you passed. You could even replay it on a map with the GPS coordinates.

      What I don’t understand is why it’s a third party app and not a built in feature on the Varia/Edge system.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.