Go Back   EcoModder Forum > EcoModding > Instrumentation
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-14-2013, 08:18 PM   #21 (permalink)
...beats walking...
 
Join Date: Jul 2009
Location: .
Posts: 6,191
Thanks: 179
Thanked 1,521 Times in 1,122 Posts
Maybe you could *revise* this 1968 "G-whiz" idea into an inclinometer SENSOR that provides input to your handheld to read and calculate the road angle from?

• source: Popular Electronics Magazine, Sept 1968: Popular Electronics Magazine, September 1968

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-15-2013, 01:16 AM   #22 (permalink)
Not Doug
 
Xist's Avatar
 
Join Date: Jun 2012
Location: Show Low, AZ
Posts: 9,779

Chorizo - '00 Honda Civic HX, baby! :D
90 day: 35.35 mpg (US)

Mid-Life Crisis Fighter - '99 Honda Accord LX
90 day: 31.32 mpg (US)
Thanks: 6,594
Thanked 1,871 Times in 1,421 Posts
I have been coasting down hills in neutral for years and had also wanted an inclinometer. This Sunday was the first time that I drove to my parents' house using pulse and glide. I pulsed up. I glided down. If the hills were not steep enough, I would pulse again, but it was interesting, I was not as concerned with maintaining speed, I was satisfied with a slow deceleration.

I wish that I could say that it was a record trip.

I did forget to check my tire inflation, but when I noticed uneven wear, I stopped over-inflating.
  Reply With Quote
Old 05-15-2013, 04:33 AM   #23 (permalink)
Master EcoModder
 
Join Date: Apr 2013
Location: World
Posts: 385
Thanks: 82
Thanked 82 Times in 67 Posts
Cool

Quote:
Originally Posted by Old Tele man View Post
Maybe you could *revise* this 1968 "G-whiz" idea into an inclinometer SENSOR that provides input to your handheld to read and calculate the road angle from?

source: Popular Electronics Magazine, Sept 1968: Popular Electronics Magazine, September 1968
That's fantastic. Yes, I can see no reason why it could not be modified to feed the output into a digital display (if that is desired). I think it would be cool to build as described though. (I'm tempted to do it but I already have too many other projects I want to build.)

It is still an accelerometer, not (yet?) something capable of measuring an incline in a moving vehicle that is also accelerating. The error due to the slope across the road is also present. That's small in comparison to vehicle acceleration, so can be ignored if that is the intended purpose but not in an inclinometer. An easy way to illustrate the effect is to induce a 90 degree xy "slope" by turning the unit on its side. It then won't work quite as well. For an inclinometer I think digital is required.

I need to correct an error: +z is by convention down not up. (That makes the coordinate system right handed, matching the 3-axis output.)

Another source of Arduino tutorials can be found here:

Getting Started with Arduino!

I picked that page because it is doing exactly the same thing that is required to get 3-axis accelerometer data into an Arduino, process it and ultimately display it. It just uses the single temp. sensor voltage as an input where the 3-axis has 3 voltage inputs.

It occurs to me that maybe measuring an incline isn't necessarily the most useful thing to do with the accelerometer data. I am pretty sure the accelerations can be integrated (in the math sense), the vehicle mass added in and the kinetic and potential energies of the vehicle calculated. I can see those being really useful.

At the very least, setting up a real time lateral and longitudinal g force display is a cool project, however it is done.
  Reply With Quote
Old 05-15-2013, 10:04 AM   #24 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 Posts
Why not get one of these?

Angle Slope Level Meter Finder Tool Gradient Balancer Car Vehicle Inclinometer | eBay


  Reply With Quote
The Following User Says Thank You to Nevyn For This Useful Post:
chumly (05-15-2013)
Old 05-15-2013, 11:02 AM   #25 (permalink)
...beats walking...
 
Join Date: Jul 2009
Location: .
Posts: 6,191
Thanks: 179
Thanked 1,521 Times in 1,122 Posts
A weighted ball in clear viscous fluid, inside a see-through ball!
  Reply With Quote
Old 05-15-2013, 11:08 AM   #26 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 Posts
Yep. I've wanted one FOREVER for in my car. However, only recently did I find them inexpensive enough to consider getting.

In airplanes, they're known as "artificial horizons." The technical term is "Attitude Indicator."

However, getting one from a plane to put in a car is several hundred dollars - USED!
  Reply With Quote
Old 05-15-2013, 11:26 AM   #27 (permalink)
EcoModding Apprentice
 
Join Date: May 2012
Location: Evansville Ill.
Posts: 101

sizematters - '08 smart 4-2 passion cabrio
90 day: 51.99 mpg (US)

escape - '06 Ford Escape xlt
90 day: 26.78 mpg (US)

Buick - '04 Buick Park Avenue Ultra
Team Turbocharged!
90 day: 27.26 mpg (US)
Thanks: 209
Thanked 25 Times in 17 Posts
Thanks, I've been looking for something like this for a long time. Chumly
  Reply With Quote
Old 05-16-2013, 05:08 PM   #28 (permalink)
Lots of Questions
 
Join Date: Jan 2013
Location: San Jose
Posts: 636

Motor-Rolla - '01 Toyota Corolla LE
Team Toyota
90 day: 28.3 mpg (US)

Gaia - '99 Toyota 4Runner SR5 Highlander
90 day: 19.78 mpg (US)
Thanks: 330
Thanked 82 Times in 62 Posts
Quote:
Originally Posted by Old Mechanic View Post
A curved piece of clear plastic tubing (could be hose) with a bubble of air in it with a mirror so you could look ahead and see the angle without having to take your eyes off the road would be neat. Just thought of it, maybe I'll build one. Where I live the grades are very mild, with the worst being the Interstate overpasses, but when I get in the mountains my perception of grades is terrible.

regards
Mech
That is a good idea, it sounds like a construction level, but again I'm looking for a digital gauge. You should definitely build one, though and let us know how it goes!

Quote:
Originally Posted by Old Tele man View Post
Maybe you could *revise* this 1968 "G-whiz" idea into an inclinometer SENSOR that provides input to your handheld to read and calculate the road angle from?

source: Popular Electronics Magazine, Sept 1968: Popular Electronics Magazine, September 1968
I'll look into that, thanks. I wonder if I will need it if I can just attach an accelerometer that is designed for an Arduino directly to the Arduino board.

Quote:
Originally Posted by Xist View Post
I have been coasting down hills in neutral for years and had also wanted an inclinometer. This Sunday was the first time that I drove to my parents' house using pulse and glide. I pulsed up. I glided down. If the hills were not steep enough, I would pulse again, but it was interesting, I was not as concerned with maintaining speed, I was satisfied with a slow deceleration.

I wish that I could say that it was a record trip.

I did forget to check my tire inflation, but when I noticed uneven wear, I stopped over-inflating.
Having a reading of the slope of the road would definitely help you determine what the best time to glide/coast is. After a learning period, knowing a grade of 7% will help you determine how far you can get just by coasting. I have been learning how to maintain a slow deceleration in neutral and slow down to the perfect speed right when I get to a turn into a parking lot or streetlight or whatever. It's kinda a little victory when I can do it right!

Over inflation can definitely be as bad as under inflation. Unfortunately the tire pressure threshold for up or down is really small and that range is different for every car. Good to hear you noticed the uneven wear and made a change.

Quote:
Originally Posted by Occasionally6 View Post
That's fantastic. Yes, I can see no reason why it could not be modified to feed the output into a digital display (if that is desired). I think it would be cool to build as described though. (I'm tempted to do it but I already have too many other projects I want to build.)

It is still an accelerometer, not (yet?) something capable of measuring an incline in a moving vehicle that is also accelerating. The error due to the slope across the road is also present. That's small in comparison to vehicle acceleration, so can be ignored if that is the intended purpose but not in an inclinometer. An easy way to illustrate the effect is to induce a 90 degree xy "slope" by turning the unit on its side. It then won't work quite as well. For an inclinometer I think digital is required.

I need to correct an error: +z is by convention down not up. (That makes the coordinate system right handed, matching the 3-axis output.)

Another source of Arduino tutorials can be found here:

Getting Started with Arduino!*

I picked that page because it is doing exactly the same thing that is required to get 3-axis accelerometer data into an Arduino, process it and ultimately display it. It just uses the single temp. sensor voltage as an input where the 3-axis has 3 voltage inputs.

It occurs to me that maybe measuring an incline isn't necessarily the most useful thing to do with the accelerometer data. I am pretty sure the accelerations can be integrated (in the math sense), the vehicle mass added in and the kinetic and potential energies of the vehicle calculated. I can see those being really useful.

At the very least, setting up a real time lateral and longitudinal g force display is a cool project, however it is done.
Build one! Would love to see what everybody comes up with! I'll stick with the digital (hopefully a pre-built module) if I am going to do an Arduino. Thanks for the extra link, that looks like it will be a great resource! I'm still a little lost, so I'm not sure what you mean by integrating the acceleration #s, adding mass and KE and PE. I would like the inclinometer output, but if these numbers can give me other useful information, I would be open to looking into it.

Quote:
Originally Posted by Nevyn View Post
That is very interesting and I like the price tag, but I would like something with a digital display. A quick glance I know the incline. Also, my dash is not flat, so by default, I think it would be off, unless I make something to force it into level.
__________________
Don't forget to like our Facebook page!




Best EM Quotes:
Quote:
Originally Posted by aerohead View Post
It has been said, that if you peel the duct tape back on Earth's equator, you'll find that the two hemispheres are held together with J B Weld.
Quote:
Originally Posted by Dan9 View Post
subscribed with a soda.
Quote:
Originally Posted by aerohead View Post
If you're burning,and someone throws gasoline on you,there will be a localized cooling effect, but you're still on fire.
  Reply With Quote
Old 05-16-2013, 06:51 PM   #29 (permalink)
Lots of Questions
 
Join Date: Jan 2013
Location: San Jose
Posts: 636

Motor-Rolla - '01 Toyota Corolla LE
Team Toyota
90 day: 28.3 mpg (US)

Gaia - '99 Toyota 4Runner SR5 Highlander
90 day: 19.78 mpg (US)
Thanks: 330
Thanked 82 Times in 62 Posts
Quote:
Originally Posted by Occasionally6 View Post
It will, like the other accelerometers and inclinometers, measure the ground slope when you are stationary or at constant speed. (A steady ground speed still means accelerating vertically when ascending or descending. You just won't be accelerating relative to the ground. That means the fore-aft acceleration will still represent the acceleration due to the slope.) It will not separate the change in gravitational acceleration (direction) due to a change in fore-aft slope - what you want - from any other accelerations.

So will this little gizmo work for what I want, or will it not take into account different accelerations? In other words, will it display the incline or will it add in lateral or horizontal accelerations, throwing off the number?

If vehicle (linear) acceleration can be around 0.3g, the effect of a 7%, 0.07g, slope will be swamped by the other accelerations the vehicle is subject to. There is also a lateral component due to the crown of the road which will subtract from the fore-aft component (the sum of all the components, without other accelerations, still = 1g).

It may be the only way to get what you want.

So that gizmo won't work and I need to build my own board to subtract out different accelerations?

Fortunately there are plenty of hands around the Arduino to hold but there will be a point at which you have to take over.

I'm willing to do the work, I just need to know what to do! If I get instruction '1) do this 2) do this 3) do this' then I can do it. After I do it once, I am pretty good at figuring out how to do it in less structure and can even come up with better ways sometimes. But this being my first time, I need the structure.

If you go back to the Arduino ADXL3xx link you will find two further links to the Adafruit and Sparkfun boards. Sparkfun sells a number of different accelerometer and gyrometer boards. Both vendors provide further explanation as to how they're used. There are other vendors, as you have found.

I will have to read their explanations and see what I come up with. Will a three-axis be enough, or should I get two boards to measure 6 different axes?

The boards are simply a way to get a voltage and an earth to the ADXL3xx IC and to access the resulting output. It's possible to buy the bare IC and build your own (although: Why?).

Sorry, are you talking about the shield boards, the Mega/UNO boards or the ADXL3xx accelerometer boards?

The range of acceleration the board is capable of displaying should match what it is you are measuring or the precision available will be reduced. Other than spikes due to a rough road surface, you won't need to measure more than about 1.5g. (Don't buy a board capable of measuring, say, 10g; +/-2g should be plenty.)

So this says +/-3g. Would that work for me, or is that still a little too much for this application?: Triple Axis Accelerometer This one has a selectable amount +/-2,4 or 8g: Selectable Triple Axis Accelerometer This one can be selected for +/-1.5g or +/-6g: +/-1.5g Accelerometer

There are IC boards that convert the accelerometer data to the I2C format, which can also be read by the Arduino. The advantage is that digital data is less affected by noise and you only need two pins to access it. I don't know how to use that (yet) but, like other things Arduino, there are guides online to doing so.

I assume you mean something like this?: I2C Adapter

That looks OK. You might read the customer reviews for a couple of cautions though. Just like the accelerometer boards there are a number of vendors for the displays.

You can also buy them already mounted to an Arduino shield board which may save you some work or limit your options depending on what you ultimately want to build.

I have found a ton of screens, so I will get one that is "good" and will fit my needs (meaning size). I want one separate from the board, so I can put the board wherever I want and the screen somewhere in/around the dash.

I meant the first one (or similar) but you don't actually have to use one at all. It's just a convenient means of making the connections between the display and the Arduino. You can use wires (eg. ribbon cable) instead if you want to mount the display or the accelerometer remote from the Arduino.

The second item (at least the board, not the Arduino) is intended to be used to set up prototypes on a bench, not for use in a permanent, completed, project. Maybe you want to do that first?

OK, depending on how I hook everything up I may or may not need the shield board then. If I mount the display remotely, I will just throw a ribbon cable on it (God knows I have enough of those!). I'm wondering if I want to make a bench one or just fiddle with it on-the-go in the car. I do that for everything else anyway!

Well, you could construct a regulated 5V or 3.3V power supply and connect that, and panel meters or voltmeters (to display the outputs) to the x, y and z (maybe just the x) terminals of the accelerometer board but it would be difficult for you to interpret the result. You still couldn't easily separate vehicle accelerations from gravity.

I know the board offers 5V and 3.3V, but is one better than the other? What would be a reason why I would choose one or another? Not sure what you mean about the rest. Power to the accel. board with sensors x, y and z relaying voltage based on readings to the Arduino board? Doesn't the Arduino then use those voltages to do the math and display the answer? Or are you saying that a second option is to have the accel directly attached to the display, skipping the Mega/UNO board?

You use the Arduino to read the voltages from the accel. board, perform the maths you need to do and output the result to the LCD display in a meaningful format - something like "Slope: xxx%" - for you to read.

So the Arduino will read varying voltages from each sensor on the accel. board, do the math and display it for me? That means I need power to the Arduino board, accelerometer and the display?

You will have to supply power to the Arduino. It does have on board voltage regulation but the ~14V from a running car is outside the recommended voltage range for the power input. For standalone testing, a pack of 4 AA batteries works. (You can buy a case with a USB connector and later use it as a phone or iPod back up battery.) For an ignition 'on' wired system you will want to reduce the voltage prior to the Arduino power connector, so a separate, say, 9V voltage regulator (online for circuit designs) or resistor to drop the voltage.

I'm thinking a few diodes with a voltage drop across them will get me to the desired voltage for the board, maybe with a relay to help protect the circuitry? Or I can do something like this? It will input 3-40V and output 1.5-35V. That backup phone battery sounds nice. I work in a mall where my phone is constantly working to find a signal and my phone almost dies every day.

The Mega just does more of what the UNO can do. There may be some merit in starting with the UNO compatible boards though because most of the tutorials use that to show the wiring connections, and those same pins are matched in the corresponding software (sketch). Once you understand what you are doing, you can use either.

Although for learning purposes, the UNO might be easier, I'm wondering if I want the Mega so I can use the board for all my projects with one board instead of two or more. My only concern would be if the Mega is powerful enough to run all of it at the same time and be able to do the calculations fast enough for each project. I would hate for the incline part of the board hog up memory and slow down opening the grill block or bumping up the electric water pump and my engine overheats.

You will need a soldering iron and really should have a digital multimeter. If you don't have them already, buying them will add to the cost. Of course the cost of those is amortised across any future projects that they are used for.

I have a soldering iron (although, I have to make sure it works!). A multimeter I can get from school or my friend who is an electrician.

adafruit have some fantastic tutorials:

Arduino Uno R3 (Atmega328 - assembled) ID: 50 - $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits

There are also the arduino.cc tutorials:

eg. Arduino - LiquidCrystal

You can download the Integrated Development Environment (IDE) from arduino.cc/en (^) and play with it, even without buying the Arduino. You can't do anything useful nor even get an output from it but you can get some idea of what is involved and how to use it.

Thanks for the links. I'll read them and see what I can do and report back with *probably* a million questions!

What you might do initially is combine the LCD sketch with the AMXL3xx sketch. Instead of using "serial.print()", which displays what you put in the brackets on a window in your PC, use "lcd.print()" to display the x, y and z accelerometer voltages on the LCD display. (Just comment out the serial.print() lines with "//" or "/*" and "*/ rather than delete them because you might want to use them later for debugging.)

When you connect up an Arduino you do have to sort out some com port labelling. The instructions on how to do that are in the IDE download. Unless it has been sorted recently, with Windows 8 you have to disable the digital signing to get the IDE to work with the Arduino (don't use Windows 8).

So with lcd.print, will I get the x, y and z #s or the #s that the Arduino spits out after doing the math for those #s? I have Windows 7, so anything I should be worried about there?

At this point you might want to read this:

10 Ways to Destroy an Arduino : Application Note ANCP01

If you have matched the tuts exactly you will be OK though.

I'll probably end up doing one of those!

With an Arduino, display and accelerometer connected, perhaps start by leaving them as the as the (0-1023) analogue voltage to binary conversion numbers, when that works on the display, you can convert them to accelerations using new lines of code in the Arduino sketch. Are you glad you paid attention in maths and physics in school? You will be in the next bit.

So make sure the connections work, then do the conversion work. Paid attention? Oh oh...

In effect, you will have created an Arduino based voltmeter that measures acceleration data. You then have to manipulate the x, y and z data to get an acceleration vector that translates into a slope. The convention for vehicle axes is +x is forward, +y is right, +z is down (changed, per edit). Broadly, the acceleration in the x direction, with vehicle acceleration removed, expressed as a percentage of 1g, indicates the slope up which you are travelling.

OK, so the voltage that each sensor sends to the unit will translate into a vector, which, with some math I can translate into slope. What about the opposites? Back, left and up? Would a second accelerometer help me with that at all? What math do I need to do to get from voltage measurement to slope? If I know the equation I can plug the numbers in, I just don't know what that equation is. Maybe we should save this until after I have everything else setup.

This is where the hand holding has to stop and you're into your own project.

You will have to calibrate the unit on a level surface as a baseline. You might do that, with a lot of effort, by physically adjusting the angle that the accelerometer sits at relative to the (level) car or in the software. The latter either with a calibration switch, that captures the x, y and z data when an input (calibration request) occurs on an Arduino pin wired to the switch (use a pull up resistor to limit the current the Arduino gets on that pin), or by displaying and noting the x,y,z data and writing that into the sketch manually. You then subtract that in the sketch from subsequent readings to get the real readings. See here, under "Rotation":

I'm thinking I will set the accelerometer on a construction level, make sure it's flat and then calibrate it. After that, I can install it into the car and be on my way with some slight tweaking. I *think* I understand what you're saying here. So if the current reading for x,y and z says lets say 1,2, and 3, then I will subtract 1,2 and 3 from their respective sensors in the Arduino sketch and from there on out, the system will know to subtract those numbers from any readings. I'm wondering if I should do this with the accelerometer set in position and the car as flat as possible (maybe I can use a jack), this way the calculations/readings are as accurate as possible.

Cartesian coordinate system - Wikipedia, the free encyclopedia

Sorry, how does this relate?

It's a shift in coordinates from those of the sensor to those of the car. Arduino uses radians, rather than the more familiar degrees, in its trig. functions but otherwise it will be straightforward.

So more math to convert from radians to degrees! Whoohoo!

You are probably going to need a vehicle speed input. Use pulseIn() and the VSS to get it. You may have to modify a signal taken out of the VSS into a square wave, if it's not that already, to use it. You can then measure the vehicle acceleration independently of the accelerometer. You can use this directly to separate out the vehicle acceleration from the gravity acceleration or only as a determination that the vehicle is at rest for a reset of the accelerometer data back to the reference you found above.

So run a wire from the VSS to an input into the board and in the Sketch use: pulseIn(VSS #)? If necessary, I might need a square wave converter somewhere in that wire before the board input? This? There are cheaper ones, but this one is specifically for Arduino, does it matter? This is, of course, assuming I need one. How do I determine if the VSS is outputting a square wave, will a multi-meter be able to do that for me? And why does the VSS need to output in square wave to work for me?
Wow, this is a lot! It will definitely take some time to do this! I may need to find somebody here in town that can help me. I have some friends that *may* be able to help, I'll have to ask them. I really appreciate your insight though, I wouldn't be anywhere near this close without you. Anything else you can drudge up for me would be greatly appreciated, I'm going to need it! I'm going to start a list in a new post that I will edit based off of what you say is needed, that way I can comprehend better what I need.

Thanks again!
__________________
Don't forget to like our Facebook page!




Best EM Quotes:
Quote:
Originally Posted by aerohead View Post
It has been said, that if you peel the duct tape back on Earth's equator, you'll find that the two hemispheres are held together with J B Weld.
Quote:
Originally Posted by Dan9 View Post
subscribed with a soda.
Quote:
Originally Posted by aerohead View Post
If you're burning,and someone throws gasoline on you,there will be a localized cooling effect, but you're still on fire.

Last edited by jeff88; 05-17-2013 at 03:17 AM..
  Reply With Quote
Old 05-16-2013, 07:20 PM   #30 (permalink)
Lots of Questions
 
Join Date: Jan 2013
Location: San Jose
Posts: 636

Motor-Rolla - '01 Toyota Corolla LE
Team Toyota
90 day: 28.3 mpg (US)

Gaia - '99 Toyota 4Runner SR5 Highlander
90 day: 19.78 mpg (US)
Thanks: 330
Thanked 82 Times in 62 Posts
What I Need...

  • Arduino Mega board Mega 2560
  • Accelerometer/Gyro MPU 6050
  • Display Common Cathode Display
  • Tools: Soldering Iron, digital multimeter, Phillips/Flathead screwdrivers, etc.
  • Wire (CAT5, ribbon cable)
  • Solder Lead-Free Electrical Solder
  • Transistors (BC337 NPN's)
  • Veroboard
  • Diodes 1n4004 Diode
  • Resistors (4 kinds, 1 type for LED, 1 type for transistor/ground wire of LED, 1 type for part A of voltage divider, 1 type for part B of voltage divider)
  • Pin Headers?
  • A whole lot of knowledgeable people who know more than me!

__________________
Don't forget to like our Facebook page!




Best EM Quotes:
Quote:
Originally Posted by aerohead View Post
It has been said, that if you peel the duct tape back on Earth's equator, you'll find that the two hemispheres are held together with J B Weld.
Quote:
Originally Posted by Dan9 View Post
subscribed with a soda.
Quote:
Originally Posted by aerohead View Post
If you're burning,and someone throws gasoline on you,there will be a localized cooling effect, but you're still on fire.

Last edited by jeff88; 06-25-2013 at 01:54 AM..
  Reply With Quote
Reply  Post New Thread


Thread Tools




Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com