Shop OBEX P1 Docs P2 Docs Learn Events
Motorcycle Collision Avoidance System — Parallax Forums

Motorcycle Collision Avoidance System

Bulslayer85Bulslayer85 Posts: 34
edited 2014-04-25 04:09 in Robotics
I am finally starting this project now that i have the means to develop it. I am working on a computerized safety monitoring system designed for motorcycles to help
Riders avoid accidents. This project was inspired a combination of love for motorcycles and robotics plus some unfortunate personal experience in motorcycle accidents.
Back in 2004 I wrecked going off a turn because i was not paying attention to road like i should of been. Now before i go into the details of my plan for development i need to hit a few disclaimers.

1. I had to modify some things to get some of this to work so i wouldn't suggest this kind of project for everyone.

2. Sensors like the Ping sensor i'll be using weren't exactly designed for this kind of operation so risk of damage is going to be an issue.

3. I am developing and testing this on a motorcycle.....the Mythbusters "Dont try this at home, we are experts" comes to mind here.

Ok, now that is out of the way, So first step is to find out what form of object detection is best suited for a motorcycle platform, i did some initial testing between the IR and Ping sensors and found the Ping has a farther more reliable range (about 10 to 12 feet). So i will start with the ping as Ultrasonic sensors are pretty common on cars now and days making them easy to get my hands on them. Today i will be setting up a wiring system on my motorcycle to allow me to plug in my boe - bot board. I salvaged a retired alarm system from my 89 camaro so i have an inline fuse that i will use for protecting the board. Once i have that installed i will add a red led light to my gauge cluster that will blink when objects are to close. I can't mount the ping sensor yet as i need to build a small box to put it in first for protection. After i do that i will mount it on the front of the bike. The Test i want to perform is to see how accurate the Ultrasonic sensor is at different speeds, any loss in echo pick up means the sensor is not a reliable detector.

For actual interaction with the bike this is where things get tricky, For those who are new to robotics, more cars today have setups like this installed. Problem is these setups use the brake system as a primary means of object avoidance. Telling the computer to just start applying the brakes on a motorcycle is a really bad idea, luckily most bikes today are still manual transmission and have a clutch the rider operates to help shift gears smoothly. My plan involves dis-engaging the clutch if an object breaks a Safe zone limit in distance, this disconnects power to the drive train causing the engine to rev up a bit.....hopefully grabbing the riders attention and causing them to slow down and increase distance or come to a stop if they need to. Third phase then would be potentially slow application of the rear brake (most of a vehicles stopping power is in the front brake and we don't want that one going solo). Not sure how i feel yet about even applying the rear brake with out rider knowledge, ill have to sleep on it a bit. Anyway, I think the clutch control is a good idea cause it also give the computer the ability to keep clutch disengaged when at a stop until vehicle in front gets to a safe distance, also helps detour accidentally dropping the clutch(happens to the best of us).

That is what i have planned so far, Post with your opinion, please be informative....if i'm over looking something i don't want to wait till i'm on the bike to find out lols.

Comments

  • pmrobertpmrobert Posts: 673
    edited 2014-04-11 12:15
    As a motorcycle enthusiast of 40+ years, I really think you should stick to perhaps alerting the rider of rear quarter lane incursions - those are the ones that you don't know about until too late if you're occupied with something ahead of you and not scanning the rear quarters. I can think of innumerable situations where any control intervention of the clutch or rear brake means disaster, especially in limited traction situations. If you pull clutch, most engines will go to rev limit cut and sit there - how do you reestablish power flow smoothly? Last thing I'd want is to have a redlined engine abruptly reclutch. The only automated interventions that are used by some manufacturers are ABS and Traction control - all these do ( very well in my experience, BTW ) is modulate braking and power in mostly severe, on-the-edge, perhaps panicky circumstances by pulsing the brake pad pressure to avoid lockup and definite transformation into an unguided missile or pull ignition timing or cut it all together when it detects front/rear speed mismatch and a bunch of X/Y/Z accel parms as well as yaw and lean angle. I do like the concept of object incursion notification - it alerts and then the rider is prompted to reestablish that situational awareness we're all supposed to maintain - but we're only human... Oh, addendum: you may want to use a DC to DC converter to power your board. Motorcycle electrical systems are much dirtier than automobiles by far in my experience.
  • Bulslayer85Bulslayer85 Posts: 34
    edited 2014-04-11 12:36
    The clutch thing is way down the road at this point, right now i am mostly concerned about just indicating to the rider via an led and yes checking behind the motorcycle is a very big deal, was going to do that next after i figure out the front. Im doing front end check becuase i have had issues where i turn my head to check behind me and in that time the car in front of me starts slowing down, might use a pizo speaker too idk. i just did a voltage check on the accessory wire i was going to use and its reading 11.45 volts and not 6 like i thought so not using boe bot board as it maxes at 9, i got the prop development board and it maxes at 12volts but i have to make sure the bike doesn't go over 12 on the wire im using otherwise i have to get a resistor, prop board is better for this anyway so (shrugs). I was thinking of using the IR sensors for blind spot detection but idk how they fare in the sunlight, i might get some major interference.
  • Bulslayer85Bulslayer85 Posts: 34
    edited 2014-04-11 12:51
    140411_002.jpg
    140411_003.jpg


    So i got the power wire on the bike, right now i have a 10 amp fuse on there but kinda wondering if that should be lower, the second image is the mod i did to get the board to plug in properly. i used bullet connectors so i can still use the board plug for the battery case it came with.
    552 x 414 - 54K
    1024 x 768 - 85K
  • xanaduxanadu Posts: 3,347
    edited 2014-04-11 13:27
    Sorry to hear about your accident. I mostly ride on the track now for the same reason, slowly edging into "A" group. I'd be willing to help test things if needed.

    I think I remember a post awhile back about this. I'm interested to know if the sensor will work when the bike is leaned over or just when upright and cruising?
  • Bulslayer85Bulslayer85 Posts: 34
    edited 2014-04-11 17:00
    The ping will work either way, i rotated it in my hand while running a basic stamp demo to make sure the wire i made for it wouldnt come loose. should hold up ok, I also have a 3 axis accelerometer im gona play around with later to get bike lean.
  • abecedarianabecedarian Posts: 312
    edited 2014-04-11 18:49
    ...I also have a 3 axis accelerometer im gona play around with later to get bike lean.
    An accelerometer isn't going to get you much about bike lean while riding: centrifugal force will negate the leaning effect. You would need a gyroscope of some type to determine the lean angle when cornering.
  • xanaduxanadu Posts: 3,347
    edited 2014-04-11 21:10
    Yeah I went as far as to see how an accelerometer would hold up on a bike. Works great not moving, even worked around a slow corner, blasted off the on ramp and it told me I was tilted the wrong direction. It's hard to see in the video, I only posted it to show I actually tried it.

    You'd really need a 2 axis gimbal, you can make one with a Propeller and an additional gyro. Anyway I suggest you continue what you're doing because it's fun and quite a learning experience. Once you mess around with the PING you'll find its weak spots. Ideally you'd want some kind of weather proof radar for it to be reliable.

    [video=youtube_share;zp9w9E68U8Q]
  • Bulslayer85Bulslayer85 Posts: 34
    edited 2014-04-11 22:32
    well i couldn't use the dev board i have because i couldn't track down a voltage regulator that would work but i was able to use my boe bot board along with a 9v battery to test the ping sensor.......as sadly expected the effectiveness was greatly reduced by a multitude of factors, any speed over 25 and it read a constant false positive ( im guessing because of too much air blowing into it at high speed), it also seem to pick up my engine noise which was odd but ok what ever. So i wont be using ultrasonic, prob just gona look right into some kind of laser range finder thing.
  • abecedarianabecedarian Posts: 312
    edited 2014-04-12 07:07
    Attached is the power supply I'm using on my EFI project. It should operate from 7v to 18v, survive surges to 60v, and source 3 amps at 5v. The BOM is about $5 at Mouser, excepting the TI chip and inductor. The chip you can 'sample' from TI, and I believe Coil Craft offers samples of their inductors. Add on an LM1117 3.3v regulator and you should be good to go.

    5v3a.pdf
    5v3a.pdf 101.7K
  • Bulslayer85Bulslayer85 Posts: 34
    edited 2014-04-12 09:56
    i have the power supply mostly figured out, problem is the bike produces 13.4 (give or take .5v) when running. The max voltage on my development board is 12v with a current draw of 59mA, I'm still a bit noobish to calculating power needs but i got a bad feeling i plug that board in as is with out some kind of limiter im gona have a roasted board. i've been looking at different regulators but not sure exactly what i would need, was kinda hoping on buying a pre made one that i dont have to build my self.
  • abecedarianabecedarian Posts: 312
    edited 2014-04-12 10:47
    Maybe this?
    3-30v input, 4-35 output.
  • pmrobertpmrobert Posts: 673
    edited 2014-04-12 11:44
    i have the power supply mostly figured out, problem is the bike produces 13.4 (give or take .5v) when running. The max voltage on my development board is 12v with a current draw of 59mA, I'm still a bit noobish to calculating power needs but i got a bad feeling i plug that board in as is with out some kind of limiter im gona have a roasted board. i've been looking at different regulators but not sure exactly what i would need, was kinda hoping on buying a pre made one that i dont have to build my self.
    What you are seeing on a multimeter is not what is actually existing in that power feed. Short duration voltage spikes several times nominal voltage, high frequency noise, low frequency noise and ringing due to injectors, coils, relays, putting the turn signal on, cancelling it, activating the horn, flashing your brights, the bike's voltage regulator switching - these are all present and will kill or reset a processor & sensors and/or overwhelm or kill a garden variety regulator which typically do next to nothing to help. abcedarian's advice is very sound and I think his design is really well thought out as he's using parts specifically designed for vehicular power. There are premade modules for this purpose. If you're interested I'll post the data I have on available devices. Disregard - what abec* suggested is what I was referring to.
  • abecedarianabecedarian Posts: 312
    edited 2014-04-12 13:10
    Something that just popped in my head is what about the cigarette lighter / USB charging adapters?
  • tingotingo Posts: 87
    edited 2014-04-24 10:46
    Interesting project!
    @abecedarian: USB charging adapter will only give you 5V. Are there "cigarette lighter" adapters available that gives you a regulated 12V? My impression is that most of them are just cables.
  • abecedarianabecedarian Posts: 312
    edited 2014-04-24 12:42
    tingo wrote: »
    @abecedarian: USB charging adapter will only give you 5V. Are there "cigarette lighter" adapters available that gives you a regulated 12V? My impression is that most of them are just cables.
    My comment was regarding providing voltage for the MCU and sensors which would mean either 5v0 or 3v3 depending on things. A cigarette / USB adapter would convert the 12v nominal from the vehicle to 5v at around 300-500mA which should provide around the same amperage at 3v3 after regulation / LDO for various devices.
  • xanaduxanadu Posts: 3,347
    edited 2014-04-24 21:46
    What microcontroller board do you plan to use?

    The USB spec power supply depends on where you're going to inject its +5v. If you plan on using it to power the 5v regulator it's not enough, if you use it to power the 3.3v regulator it is enough. Most of them have very little noise suppression, which should be an important factor in choosing a power supply to deal with a harsh supply such as an alternator as a source of power.
  • xanaduxanadu Posts: 3,347
    edited 2014-04-24 21:49
    well i couldn't use the dev board i have because i couldn't track down a voltage regulator that would work but i was able to use my boe bot board along with a 9v battery to test the ping sensor.......as sadly expected the effectiveness was greatly reduced by a multitude of factors, any speed over 25 and it read a constant false positive ( im guessing because of too much air blowing into it at high speed), it also seem to pick up my engine noise which was odd but ok what ever. So i wont be using ultrasonic, prob just gona look right into some kind of laser range finder thing.

    You're going to need something IP67 rated either way.
  • Laser DeveloperLaser Developer Posts: 140
    edited 2014-04-25 04:09
    Cool project Bulslayer85.
    I used to race motocross and road bikes until I lost my 900 on a manhole cover - walked away and never went back!
    We've done lots of tests using lasers for vehicle safety systems. Several motor manufacturers are looking to offer them as standard from 2016. They are much more difficult to integrate into a bike than a car of course, but I can confirm that the road test data from lasers with 40-100m range capability shows good reliability. How to use the data is still not totally clear but in fairly slow speed environments (not 100mph on the highway) where following distance, tailgating and lane hopping problems occur, the laser can provide useful warning information to the driver/rider.
    The real advantage of using laser light rather than sound is that the readings are totally unaffected by noise and wind. There is a visibility limit - rain, fog etc., but cautious driving is required under those conditions anyway. One of the most interesting results we've seen is that following distances are badly misjudged at night or at dusk/dawn. It's something to do with the way that the brain processes the reduced information available. Apparently, this is a problem for aircraft as well, with crop sprayers having more accidents at dusk. With the laser acting as a guide, more appropriate following distances are easy to maintain, especially on straight roads where there are fewer visual cues to work with.
Sign In or Register to comment.