I am working on a (personal) project that involves a motorcycle helmet. I want to detect when that helmet is moving, either when driving down the road, or at a stand still just turning your head up and down or left/right. I do not want to detect if something else is moving -- but rather if the arduino itself is moving (it will be mounted inside the helmet)
I had a 9 axis board but it draws more than I'd like (I need it to be as low power as possible to maximize battery time between charges...) but I like the idea; I can detect head turn (compass) driving (accellerometer) and head tilting (gyroscope).
Is there a simpler way to detect that it is moving? I have some switches that are springs around a center bit that is good for detecting a door opening/closing but not so much subtle movements, or once you settle in at a given pace.
It is probably a case of using better programming/hardware design with a sensor like this. Keep the Arduino/project 3.3V so power is not wasted converting 5V to 3.3V needed by the sensor. Use a combination of standby (low power mode) on the sensor and maybe use it's interrupt/data ready lines to wake a sleeping Arduino. The sensor uses 110uA in normal mode and 1uA in sleep mode. Nick Gammon has a very good power saving article here that will give you some pointers in power saving on the Arduino side.
Thanks. That's basically the same as I have going here, the board I am using is smaller & has more data available, which will equate to better movement detection.
so it seems there really isn't a better or simpler way to detect movement & keep using this approach.
daveyjones:
so it seems there really isn't a better or simpler way to detect movement & keep using this approach.
Someone else might have a bright idea on a better system but it depends on if you just want to detect movement or quantify that movement. The little tilt sensors would probably detect movement but would be less reactive than a 6DOF/9DOF.
The tilt sensor I saw was a metal ball type switch --- so if the helmet is placed on it's side or upside down etc it could register as "in motion" which it wouldn't be...
I'll keep going on my current path -- thanks for the input.
a helmet, when on your head, is always moving, no way someone can hold it perfectly still. The tilt/ball bearing simply isn't good enough and can't detect standstill if not orientated properly, whereas accelleromter and gyroscope and magnetometer would give a much better indication of "standstill" vs "moving" -- unless I'm missing something?
daveyjones:
Is there a simpler way to detect that it is moving? I have some switches that are springs around a center bit that is good for detecting a door opening/closing but not so much subtle movements, or once you settle in at a given pace.
Thanks for your ideas -- the images don't come thru; but the links worked.
The tilt sensors are a ball bearing being a switch.
So if you angle it say 10 degrees; then angle it to 20 degrees, it still sees it as "moving" now if you set that helmet down at it's angled at 20 degrees it doesn't see that it's stopped which is why I discounted them.
I originally tried a 'fast switch' similar to the one you pictured, which is a spring closely centered to the case so movement/vibration should set the spring in motion to touch the case and cause the switch to close.
I had bad luck with the one I tried as if you were fluid enough in turning your head and had a smooth road; it could think you're stopped as no vibrations would be sensed.
You're right that these types of sensors would require very little power and would be much more ideal for that (and size savings) than using gyroscopes, etc.
I ordered a couple of the "fast vibration" since they point out it's "easy to to trigger" - it's worth a try to see if they'll work for this. Thanks for that one! If it is easy to trigger, then it will reduce power, simplify the project, make it smaller, and reduce costs.... all very good things.
There are also these things, which appear to be a cantileverd spring that jiggles and makes contact with a post; but I don't know how well they'd work for normal head movements. http://www.ebay.com/itm/271757607554
I use the MPU6050 6-axis devices for everything anymore. Current draw is only 3.8mA, which seems awfully reasonable.
That's odd. They were there yesterday. I'll see if I can fix them.
daveyjones:
The tilt sensors are a ball bearing being a switch.
So if you angle it say 10 degrees; then angle it to 20 degrees, it still sees it as "moving" now if you set that helmet down at it's angled at 20 degrees it doesn't see that it's stopped which is why I discounted them.
I'd think you'd use several ball type sensors and just keep monitoring for them change rather than set values.
I don't know how many ball sensors you'd need but I'd think it wouldn't take many to catch movement by seeing pin states change.
You could even use the PinChangeInt library to keep track of when the pin states changed. I'm not sure if you can use the library to wake the Arduino from a sleep state or not.
You might be able to use XOR type gates to link multiple sensors to one I/O pin. If any sensor changed its state, the I/O pin's state would change. This technique might work as a way to wake the Arduino when there's movement.
Edit: I "replaced" the images but URL was exactly the same. I can see the images now but I think Adafuit might not let the images be seen without some sort of cookie. Can you guys see the images?
@oric_dan - thanks - those spring sensors are a type I tried initially; they aren't that sensitive; I could turn my head left to right & chin to chest to looking straight up w/o triggering it. I think the more sensitive unit linked from adafruit might be the solution -- at least I am very hopeful.
When you think of a helmet, there isn't a lot of space in there, so I can't put a big battery in there, has to be small. small battery = less runtime. So if I can swap a 3.5ma sensor (mine draws 4.2) for a sub ua trigger, that can be a huge benefit... also, size wise, even tho most 3/6/9 dof boards are small; something smaller is inherently more appealing to me; especially since they are overkill if I can do it more simply...
@DuaneDegn - images still are no show here; but I got the idea. I suspect you are right: adafruit doesn't want images re-linked elsewhere.
I just need to hurry up and be patient for the postman to bring the sensors to me.... Thank you very much for the idea!
Dave, given the way I do things, I'd probably put the battery holder on the back side of the helmet using velcro. Jameco some with nice AA/AAA holders with covers and switches built-in. You could cover it with a plastic bag when it rains, although it's mostly sunny in AZ from what I hear. You really want the accelerometers, then you can show your friends how much you lean over in the turns, and how fast the bike accelerates out of the turns, :-). jameco
Ha!!! well; it wouldn't really tell lean angle as your head doesn't lean the same as the bike...
I do have a project in the works, that includes a more automatic lap timer, that is like a a few commercial options (time riding, temp, etc + g force & lean angle) -- but that will be fixed rigidly to the bike. I don't really ride like that; too many friends have gone down showing off...
I've got some (covered) AA holders, too big... but they're also water proof; I'll look at aaa holders from jameco.
I'll give it some consideration. The smallest board I have is a attiny841 (the board is smaller than most attiny85 options) so I don't have a lot of processing available to do a bunch of stuff -- all it's doing is receiving a wireless signal & relaying that data (4 data points of 'on/off'); the "movement sensing" part is just to turn itself off automatically...
I don't really ride like that; too many friends have gone down showing off...
Been there, done that.
You might look at the ProMini, it can be gotten in 3.3V version for a few $$ on ebay, and will interface to most sensors directly. It's 0.75"x1.25". It's also easier to program than the Tinys, and programs just like an UNO. Myself, I'd put everything on the back of the helmet as a complete self-contained unit, except maybe a sensor or two if needed to be inside the helmet, and just pull it off the velcro when not using it. Use the covered battery holder as a baseboard. But, it's all open to choice.
EDIT: speaking of wireless, I recently built a small board with the ProMini and an RFM69 radio to provide an RF link for my robot, shown here in the first post. I could easily add the MPU6050 to the bottom of the fiberboard.
Also, coin cells like the CR2450 have 550 mAh of energy, and could probably run this rig for upwards to 20 hr, or more with some duty-cycle control. So there's all sorts of possibilities. coin cell
Thanks for the ideas -- I had considered (and have) the promini's.... The bigger picture is not just the battery & sensor to determine movement, but the radio receiver. The radio receiver receives the data and then turns on lights (led strip) -- the strip is premade/commercial & is attached using adhesive. It's a "3rd brake light" so it will handle "marker" light "brake light" "left/ right" turn signals. so there would be a lot to remove, which is why I was going for small & inside helmet. When I want to ride, I turn it on -- ride, then stop; when stopped for 20 minutes, it'll turn itself off to save battery. Maybe 'sleep' for 40 minutes waking up to see if lunch is over. if no movement for an hour, shut down completely.
Complete details not really worked out -- just know that 2 other local riders want me to make them one, so I have motivation to make it as compact & modular... Parts are cheap (most expensive part is the led strip)
20 minutes... No rider is going to look straight ahead for 20 minutes while riding.
I would think a 3-axis accelerometer would be just fine. Monitor 2 to 3 axes. If one changes more than some threshold, reset the 20-minute timer. If the timer times out, go to low power mode after storing present accelerometer values. Wake up, read accelerometer and compare to stored values. If the same, you can assume the helmet hasn't moved and can shut down.
aye -- agreed.... i think we're on the a similar page....
What a I want to do is totally shutdown if no movement or movement but no signal from bike (ie: helmet is carried or in car) should enter into a deep sleep or "off"
Hi,
I suggest you to go to the fire-station next to your home and ask the fire-fighter to let you see their SCBA. The SCBA (Self-contained breathing apparatus) has a cilinder of air and a mask. We put this in order to enter smoke.
Each SCBA has also a small box, detecting movement. If we don't move for about 30 sec (it depend on the model), the "box" start to produce a "noisy sound". To stop it, we must move (or check the "box").
If we stay "without movement" during a longer time, the noise increase a lot, in order to call other fire-fighters as we are probably in danger.
The system is not based on position as we can crawl, jump and so on. It only the lack of movement that trig it.
I think I've one here. I will open it to see. But maybe at the fire station they have old one you can open.