Hitachi H48C gravitational acceleration only?
MachineMonkey
Posts: 30
A bit of background: I work for a TV station as the live truck engineer. Some time ago, I had trouble with a small magnetic proximty switch located on one of my extendable mast assemblies. This switch reported to the safety interlock system the status of the microwave dish (stowed or unstowed). It was often misaligned and would send a false negative to the truck control systems when a bump in the road misaligned the switch components. The mounting brackets were in such a place that careless driving could and did result in sensor misalignment with monotonous regularity. If the switch gave a negative, the truck could be put in gear only with an 85dB alarm screaming in the driver's ear. Said alarm would engage after a random bump in the road or strong crosswind while the truck was moving.
So I replaced that tiny switch with a much bigger magnetic proximity switch. The alarms has not come on falsely since. Sadly, the automatic mast positioning system (SureShot from Arizona Engineering) uses a GPS receveiver and flux-gate compass to learn the dish's position and azimuth. The bigger magnet is now pulling the indicated azimuth off by up to 20 degrees in a nonlinear fashion.
My intended solution: H48C, BS2-IC, Super Carrier Board. optoisolator switch. When the board is within 30 degrees of vertical, the opto closes the switch and the truck becomes legally drivable (and shrieking alarm free).
First off, the circuit and demo program work just as advertised. 360 degree resolution on 3 axis in real-time. Problem is this phrase from the datasheet, "Capable to detect "Static(Tilt) and Dynamic acceleration" which I guess I took to mean "static and/or dynamic acceleration". Whenever I moved the board laterally in any direction, the numbers go nuts. I need to eliminate or ignore the dynamic acceleration portion of the output from this assembly. It will do me no good if this alarm goes off when the drivers punch the accelerator or slam on the brakes. They are usually in a big hurry.
I notice the demo program seems to be feeding command words to the accelerometer. The documentation isn't exactly knocking me down with this information. Is there a more detailed reference I can access with regard to the H48C? Perhaps the zero-gravity function is what I am looking for but don't know it? Getting just gravitional information from this chip would be the sweet spot for putting this circuit into the breech.
Thanks,
Kalo
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Failure is not the only punishment for laziness; there is also the success of others.
- Jules Renard
So I replaced that tiny switch with a much bigger magnetic proximity switch. The alarms has not come on falsely since. Sadly, the automatic mast positioning system (SureShot from Arizona Engineering) uses a GPS receveiver and flux-gate compass to learn the dish's position and azimuth. The bigger magnet is now pulling the indicated azimuth off by up to 20 degrees in a nonlinear fashion.
My intended solution: H48C, BS2-IC, Super Carrier Board. optoisolator switch. When the board is within 30 degrees of vertical, the opto closes the switch and the truck becomes legally drivable (and shrieking alarm free).
First off, the circuit and demo program work just as advertised. 360 degree resolution on 3 axis in real-time. Problem is this phrase from the datasheet, "Capable to detect "Static(Tilt) and Dynamic acceleration" which I guess I took to mean "static and/or dynamic acceleration". Whenever I moved the board laterally in any direction, the numbers go nuts. I need to eliminate or ignore the dynamic acceleration portion of the output from this assembly. It will do me no good if this alarm goes off when the drivers punch the accelerator or slam on the brakes. They are usually in a big hurry.
I notice the demo program seems to be feeding command words to the accelerometer. The documentation isn't exactly knocking me down with this information. Is there a more detailed reference I can access with regard to the H48C? Perhaps the zero-gravity function is what I am looking for but don't know it? Getting just gravitional information from this chip would be the sweet spot for putting this circuit into the breech.
Thanks,
Kalo
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Failure is not the only punishment for laziness; there is also the success of others.
- Jules Renard
Comments
I want pure tilt reading regardless of the relative velocity of the board. Can I do that?
- K
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Failure is not the only punishment for laziness; there is also the success of others.
- Jules Renard
-N
Back to the drawing board. Bummer.
Thank,
- K
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Failure is not the only punishment for laziness; there is also the success of others.
- Jules Renard
Sure, I don't see why you can't do this, considering you have no accel/decel at 40 mph consistent speed. You'll need to do some averaging of the moving values so that you don't mistake the acceleration data for incline. After all, we've used the M2125 accelerometer on R/C airplanes for flight stabilization, and they're often used with gyros to make balancing robots. I made an inclinometer for my friend's snowcat to show the X/Y incline while he moves the vehicle around his property, and I've seen similar devices in newer 4WD vehicles.
And the best way to test your hypothesis is to try it out. Build the circuit, attach it to the mast, and go for a drive. Hook up a laptop and use StampDAQ to log the raw data from the BASIC Stamp. Return to work and do your analysis to see what kinds of equations, min/max values you may be dealing with so you can craft a PBASIC routine to do the job in software.
Try it.
Ken Gracey
Parallax, Inc.
Except -- accelleration due to accelleration is MUCH more variable than accelleration due to gravity. Thus the 'averaging out' approach. Ken's suggestion sounds excellent, by the way. Go out, record what you find, and use that to filter the truck accelleration in software. AND allow for 'tilt' of going uphill/downhill.
Exactly. If your velocity is constant or if acceleration is minimal then you should be able to filter out the change in velocity through some kind of averaging so you don't mistake it for incline. Heck, if I know what Machine Monkey's truck looks like then the boom is up (90 degrees) or down (0 degrees) and it seems like it would be pretty simple to identify the spikes due to acceleration, not incline.
Best solution: go for a drive! One thing to add to what Allan pointed out about the hills, though. Have a passenger take notes about the incline of the hills where you are doing your tests so they can be matched to the raw data.
This reminds me when Chip helped me debug an anenometer output. Though it'd be a cakewalk for Tracy Allen to calculate wind speed from RPM, our approach was to . . . go for a drive. Holding a spinning anenometer out the window of his 1993 (?) 'vette was a bit dangerous for the passenger at 80 mph, but we got the data we needed to develop a calculation. Now he drives a very standard, simple car, but it could still do the anenometer test.
I wouldn't get too wrapped up in the physics until I tried it out. . . and even then I might not get wrapped up in the physics.
Ken Gracey
-N
No accelerometer can distinguish between acceleration and gravity. That's one of the cornerstones of General Relativity.
Additionally, it seems that any solution that tries to ignore acceleration isn't the best solution, since you really can't ignore its effects. Even moderate braking/acceleration can induce tilt measurements > 15 degrees.
What you want to do can be done, but you'll need a vehicle reference frame. You can do this by putting a second accelerometer in the vehicle (hard mounted) and then look at the difference between your reference and your mast tilt sensor. This takes into account braking, accelerating, and turning (assuming the vehicle doesn't roll too much). Also, any vibration on the tilt-sensor side (from wind, bumps, etc) can effect your readings.
I'd sample the accelerometer slowly (i.e. not 100 Hz or anything, more like 2 or so), and put a big low-pass filter on both the vehicle reference and the tilt side. That'll help with noise and minimize the effects of vibration.
Hope that helps,
Dave
These trucks are driven by photographers that have 10 minutes to get across town AND set up a live shot.· Constant, steady·speeds are unlikely...bordering on ridiculously unlikely.
While the second accelerometer for reference is a slick idea and one I'd not thought of, I think, for the time being, I'll start shopping for regular old tilt switches.
Thanks folks,
Kalo
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Failure is not the only punishment for laziness; there is also the success of others.
- Jules Renard