If so then an accelerometer would probably provide enough information to detect when a vehicle starts. Detecting when the vehicle has come to a full stop will be harder. While the readings from an accelerometer can be integrated to compute speed, there's always some error and one generally needs additional information to compute speed.
An accelerometer coupled with a GPS unit would probably work reasonably well. Then a GPS unit by itself may be enough to do the job.
Can you hack into the vehicle's computer and read the speedometer?
A gyro detects angular motion. If the vehicle traveled in a straight line, the gyro wouldn't detect a change.
Which sensor would be used to detect a vehicle stopping / starting ? A gyroscope or inertial sensor ?
A gyroscope is a kind of inertial sensor.
As Duane mentions, an accellerometer would be the main component to detect the forward motion of a car, but a gyroscope -- especially a 3-axis one -- is also useful; for example, it would detect the movement of the car from or to stop, since that would almost always entail a momentary change in pitch.
Most late-model smart phones and other consumer devices combine both a gyroscope and accelerometer in one unit. There are some internal measurement modules that give you a "fused" output that gives a single reading per axis.
Ok to be fair I'll give a bit more info about what I'm trying to do. Presently I'm timestamping stops along a route and I press a button when I stop and then again when I resume driving. I'd like to eliminate the manual interaction. I was considering GPS as I have one of the Parallax modules (the latest one they sell) but have never tried it out. Was thinking I could use that to identify each stop and then trigger when I have reached my stop. Wasn't sure how accurate the GPS would be for detecting (to the second) of when I resume travel. That's where I was thinking maybe an accelerometer may be needed.
Measuring wheel, axle, or drive shaft rotation would probably be the most reliable. An accelerometer might work but braking and accelerating in traffic would give erroneous readings. If you put the transmission into park each time you stop a push button or optical interrupter would work.
Measuring wheel, axle, or drive shaft rotation would probably be the most reliable. An accelerometer might work but braking and accelerating in traffic would give erroneous readings. If you put the transmission into park each time you stop a push button or optical interrupter would work.
I should mention that I am not able to connect to anything in the vehicle to detect movement etc..
If it is a gasoline powered vehicle you may be able to plug something into the cigarette lighter to sense the ignition, and therefor the rpm. A stop would be registered when the rpm dropped to a certain value.
If it is a gasoline powered vehicle you may be able to plug something into the cigarette lighter to sense the ignition, and therefor the rpm. A stop would be registered when the rpm dropped to a certain value.
Thanks Rich. I've heard of doing that before but as I mentioned this won't rely on any connections or feedback from the vehicle (which happens to be a diesel anyway...). Fully self contained and reliant on whatever sensors I build into it.
Now onto finding some good SPIN examples. I see the module I purchased only has C demo code... I'll look at the OBEX for some examples. I'd prefer SPIN at this point.
I found this APP Note but in the resources section the zip file it refers to doesn't exist. Anyone have the spin code for this APP Note?
If you get in / out of the vehicle at stops, a pressure sensitive cushion starts timing when you sit down, stops timing when you get up, maybe a few seconds delay to compensate for rough roads.
... OR ...
A cigarette lighter adapter detecting AC ripple from the alternator: no ripple=engine is off / stop timing; has ripple = engine is running / start timing.
GPS could give you time stamps and location data if you need those logged.
Which sensor would be used to detect a vehicle stopping / starting ? A gyroscope or inertial sensor ?
It seems road noise and vibration might be a possibility. Perhaps an accelerometer output could be monitored for a drop off in peak to peak change/vibration. If it stops for a period of time (longer than a traffic light) the car might be stopped. If the quiet time is less than 2 minutes add the time back into the travel counter. Another possibility is a microphone that tracks low frequency sound and has an AGC amp to adjust to the road noise sensitivity. A low pass filter and threshold detector would be the on-off sensor and the prop could then track time pauses and actual stops. It could fit inside a small box with a diaphragm on the bottom for the mic. I can't think of anything that might generate similar noise when stopped. Unless, of course, your car is suddenly attacked by a gang of zombies.
This may sound crazy, but have you looked at the xband motion detector? You could aim it out the window at the street and detect the motion of the pavement.
I agree that a lot of these methods could be used. The XBand motion detector is clever, but it means sticking something out a window or mounting it externally where it could be damaged.
Other approaches: I've seen speedometer cable sensors that clip around the cable. Apparently they are sensitive to the turning of the steel cable inside. I've also seen some really simple aftermarket add-ons for wheelchair wheel sensors where a simple IR sensor reflects off the inside rim of the tire. It would be fairly easy to hotmelt an IR sensor -- similar to how the encoder on an Activity Bot works -- in the wheel well of the car. Look for a spot that doesn't show a lot of dirt or mud.
I'm interested to know about the no interface requirement. Is that a company rule or a design goal?
Because it's a vehicle I do not own. Also it needs to be portable meaning it can be just connected to power in any vehicle. This is a project for in a school bus.
Because it's a vehicle I do not own. Also it needs to be portable meaning it can be just connected to power in any vehicle. This is a project for in a school bus.
Now this is getting interesting. I was thinking in bad weather anything pointing outside will have issues.
What are the conditions of stopped time? Stopped at red lights, or stopped engine off taking a nap in the back stopped?
What accuracy are you looking for? Down to the second or minute on a couple hour drive?
I agree that a lot of these methods could be used. The XBand motion detector is clever, but it means sticking something out a window or mounting it externally where it could be damaged.
..
Actually, I thought of the X-band since it can "see" through the glass and would not have to be outside the car. It can also see through walls (if they aren't metal) since it uses radar signals.
Comments
If so then an accelerometer would probably provide enough information to detect when a vehicle starts. Detecting when the vehicle has come to a full stop will be harder. While the readings from an accelerometer can be integrated to compute speed, there's always some error and one generally needs additional information to compute speed.
An accelerometer coupled with a GPS unit would probably work reasonably well. Then a GPS unit by itself may be enough to do the job.
Can you hack into the vehicle's computer and read the speedometer?
A gyro detects angular motion. If the vehicle traveled in a straight line, the gyro wouldn't detect a change.
A gyroscope is a kind of inertial sensor.
As Duane mentions, an accellerometer would be the main component to detect the forward motion of a car, but a gyroscope -- especially a 3-axis one -- is also useful; for example, it would detect the movement of the car from or to stop, since that would almost always entail a momentary change in pitch.
Most late-model smart phones and other consumer devices combine both a gyroscope and accelerometer in one unit. There are some internal measurement modules that give you a "fused" output that gives a single reading per axis.
I should mention that I am not able to connect to anything in the vehicle to detect movement etc..
Of course, it won't work in tunnels or parking garages (or the like), but maybe you can include an override for such things.
Thanks Gordon. I'll look into this when I connect the GPS module and do a bit more playing with it.
Thanks Rich. I've heard of doing that before but as I mentioned this won't rely on any connections or feedback from the vehicle (which happens to be a diesel anyway...). Fully self contained and reliant on whatever sensors I build into it.
I found this APP Note but in the resources section the zip file it refers to doesn't exist. Anyone have the spin code for this APP Note?
EDIT:BTW, the code is on this page:
https://www.parallax.com/downloads/an002-real-time-gps-data-reception-and-parsing
... OR ...
A cigarette lighter adapter detecting AC ripple from the alternator: no ripple=engine is off / stop timing; has ripple = engine is running / start timing.
GPS could give you time stamps and location data if you need those logged.
I wonder if you could sense the zero mph position of the speedometer needle, with some kind of stick on sensor.
I'm interested to know about the no interface requirement. Is that a company rule or a design goal?
Other approaches: I've seen speedometer cable sensors that clip around the cable. Apparently they are sensitive to the turning of the steel cable inside. I've also seen some really simple aftermarket add-ons for wheelchair wheel sensors where a simple IR sensor reflects off the inside rim of the tire. It would be fairly easy to hotmelt an IR sensor -- similar to how the encoder on an Activity Bot works -- in the wheel well of the car. Look for a spot that doesn't show a lot of dirt or mud.
Anyway, we could go on...
Because it's a vehicle I do not own. Also it needs to be portable meaning it can be just connected to power in any vehicle. This is a project for in a school bus.
Now this is getting interesting. I was thinking in bad weather anything pointing outside will have issues.
What are the conditions of stopped time? Stopped at red lights, or stopped engine off taking a nap in the back stopped?
What accuracy are you looking for? Down to the second or minute on a couple hour drive?
Actually, I thought of the X-band since it can "see" through the glass and would not have to be outside the car. It can also see through walls (if they aren't metal) since it uses radar signals.