Suspension travel sensors for dune buggy. Suggestions/tips/thoughts? - Page 1
Forum section: electronics / projects

author: PointyOintment
author_rank: Frequent Contributor
timestamp: November 24, 2016, 11:41:07 am
content: TL;DR: I need to choose a way to sense the suspension travel for each of the four wheels on a dune buggy, and then acquire/construct the chosen sensors. I would like input on my proposed sensor types, and any other sensor types that may be appropriate.Background infoI'm working on a final project (in software development…) where we're developing a system to acquire data on the performance of a racing dune buggy that's in development by the school's Baja SAE club. Here's a video overview of the competition (though not from my school):I'm the only one in my group with any electronics knowledge (hobby only); my groupmates only know software. The client (the club building the car) only has mechanical expertise.We will have some kind of embedded controller (undecided yet: ESP8266, ESP32, STM32, Teensy 3, BeagleBone, Raspberry Pi, …) on the car which will gather data from various sensors. Data will then be transferred to a PC for storage and analysis by our software (the actual software development part of the project). It will have its own battery; there is no electrical system on the car apart from the spark plugs.I would like as many of the sensors as possible to be digital (preferably I2C or SPI) with a linear or trivially linearizable response—we only have a few months to build the whole system, so I don't want to deal with much analog or nonlinear stuff if I can avoid it. Plus, multidrop digital buses could help reduce wiring. (I could give each sensor its own local ADC, but that increases complexity…)Also for rapidity of prototyping, I would like to consider modular sensor systems such as Grove (though I'm not sure Grove specifically would be great for this project because the way it puts either analog or digital on the same connectors, and provides only so many of each kind on a given board, could be restrictive and possibly confusing to the mechanics and mechanical engineers we're building it for). I think I2C over TRRS connectors could work well, but I've never done that, so I don't know if that's a good idea or not.Funding for the hardware will be from a small grant, us, and/or the club, so we'd like to keep the price low.What I'm wondering about todayOne of the things we've been asked to record is the suspension travel. It'sdouble wishboneor something close to that. The expected travel is about 12 inches at the wheel, less as you move inboard, obviously degenerating to pure rotation at the pivot points. Our client hasn't specified accuracy and precision; from talking to them, I think these requirements are not very stringent, perhaps something like ±1" accuracy, ±¼" precision. I'm not sure about sample rate—I guess it should be high enough to see the suspension's response to landing after a jump, going over bumps at speed, etc., so maybe on the order of 100 Hz.Measuring either the vertical displacement, the displacement at an angle, or the angle of the wishbones should be fine—it's simple trigonometry to convert one to the other. We also want to avoid changing the behavior of the suspension (i.e. small added mass relative to the rest of the car, no significant added springs).Absolute measurement would be good, but relative measurement from power-on position would probably work too. An endstop switch or other absolute position reference could be difficult because they'd have to lift up or weigh down the whole car to reach it, each time they do a test drive. But I think the relevant data is how far the suspension moves from its resting position, so this shouldn't be much of a problem if at all. The real advantage I see to absolute sensing is that it can't lose steps—we're going to have several sensors, plus recording, plus possibly streaming data to the dashboard and to a trackside display, so depending on which controller we pick and how fast we sample, it could be under some load. However, there exist quadrature-to-serial ICs, or I could use a small microcontroller to provide that function, which could alleviate the load of interpreting quadrature manually if it provides step+direction output, and also prevent step loss if it tracks the position itself.Also: the price of the sensor will be multiplied by 4 because we're putting one on each wheel; the sensor might need to be enclosed to keep out dirt; the whole system needs to be easily removable for racing.Here are all of the sensing options I've thought up so far, over the course of multiple days, in what I hope is a sensible order:String potentiometer.This would be a string connected to the suspension, wrapped around some kind of spool, which is mounted on/geared to a rotary potentiometer. As the suspension moves up and down, the string turns the spool.Problems:string can wear out or get tangled; requires a large-radius spool, gearing, or a multi-turn pot (easily solved by using a commercial string pot, but those are extremely expensive); analog (though super easy analog).String encoder.This is the same as above with the pot replaced by a rotary encoder (one without detents, obviously). This solves most of the problems with the first option.Problems:string can wear out or get tangled; encoder can wear out, if electromechanical; relative encoding only (but possibly easier than other options to add a reference position to that doesn't require moving the car, because you can pull out the string all the way by hand).Stringams rotary magnetic encoder, or another brand, but ams is what I have more than zero familiarity with. String encoder with the encoder being an ams rotary magnetic encoder.Problems:string can wear out; relative encoding only over the full travel (if multi-turn), or large-radius spool (if single-turn).Potentiometer at the pivot point.Converting linear motion to rotary motion is not a concern with this.Problem:mounting could be difficult—there isn't really anything to connect its axle to; range of motion is much smaller than most pots', so signal amplitude will be small.Encoder at the pivot point.Same as above with an encoder.Problems:taking in data from four rapidly moving encoders (and other sensors) simultaneously; low resolution or expensive; mounting could be difficult; relative encoding only (and difficult to add a reference position).ams rotary magnetic encoder at the pivot point.Same as above with a magnetic encoder. Provides absolute measurement (because the range of motion is less than 360°). Likely more durable/dirt-resistant than the above two electromechanical options.Problems:mounting could be difficult; repeatability of mounting by the mechanics could be a problem if the magnet is separately mounted, because it's not as obvious if it's properly aligned.Hall effect sensor and alternating permanent-magnetic strip, orvariable reluctance sensor(Hall effect sensor + permanent magnet) and alternating ferro-/paramagnetic/nonmagnetic strip.Arbitrary length is easy.Problems:requires implementation of quadrature sensing (easy but an extra step); apparently very sensitive to ambient temperature, which could necessitate a local temperature sensor for compensation or cause it to stop working entirely; either analog, or digital with potential difficulty getting the field strengths right for reliable switching; only relative encoding over the full travel—potentially absolute but nonlinear within one cycle of the magnetization, but this also requires analog (and I haven't seen any strips that would cover the entire travel within one cycle, and absolute position measurement within a short distance is not useful).ams linear magnetic encoderand alternating permanent-magnetic strip.They have linear versions and linear magnetic strips in addition to the better-known rotary ones. Arbitrary length is easy.Problem:I can't tell if any of them can track linear position over multiple alternating poles, as opposed to just within one magnetization wavelength, without which it would be a relative encoder only.Linear (slide) potentiometer.The things used on audio mixers, some lamp dimmers, etc.Problems:hard to find one long enough; poor reputation for reliability—probably not very reliable for this kind of application.Linear membrane potentiometer(e.g. Spectra SymbolSoftPot/HotPot/ThinPot). These look like they could work well. They're IP66 rated and quite durable.Problem:analog (though easy analog); longer ones are expensive; might require calibration; not sure if they like being actuated rapidly.Some kind of optical rangefinder, like perhaps an IR reflectance rangefinder (e.g. GP2D120), ToF sensor (e.g. VL6180), or parallax rangefinder (e.g. Neato lidar).Problems:some are analog and/or nonlinear; might not work well in sunlight; can be expensive.Ultrasonic rangefinder.Problems:expensive; potentially low accuracy/precision; might not work well on a noisy and vibrating vehicle.Optical linear encoder, like in inkjet printers. These are typically single-track quadrature; a Gray code version is conceivable, but I haven't seen one and I think it would be difficult to implement. Arbitrary length is easy. We could make our own with laser-printed transparency sheets.Problems:relative encoding only; we'd have to disassemble four identical or similar inkjet printers to obtain the heads, or make our own, which could be difficult.Optical linear potentiometer(like above but analog). Could use either a gradient or a solid slope. Again, arbitrary length is easy, and we could make our own with laser-printed transparency sheets.Problems:analog and possibly nonlinear due to things like more light going through the center of the strip than the edges. (Digital proportional light sensors exist, but they're more expensive, and don't necessarily solve the nonlinearity.)Make our own combined optical linear encoder/potentiometers.I think it would be possible to put the above two side-by-side, or design a combined pattern, and read them with one sensor (not even a quadrature pair, because the analog part gives direction), and decode it algorithmically. I imagine the output could be made to look likethis graph, which should be easy to decode.Problems:untested as far as I know; analog part is analog (but maybe I can ignore linearity—while tracking, at least—because the digital part takes care of the details); takes more processing; we'd have to disassemble four identical or similar inkjet printers to obtain the heads, or make our own, which could be difficult; making the strip could be difficult.Vernier optical displacement sensor.A stationary longitudinal reflective line/transmissive slit, with a pickup head containing a crossing transverse slit that slides along. Takes one or two analog or digital proportional optical sensors to tell where along the transverse slit the longitudinal line/slit crosses it.Problems:analog, if analog; probably nonlinear either way.Moiré optical displacement sensor.Print two transparencies with longitudinal stripes on them. The stationary one has a slight taper to the stripe pattern, and the moving one makes a varying moiré pattern as it slides along. This varies the effective opacity of the two pieces, producing the same result as the "optical linear potentiometer" option above.Problem:excessively complex for no apparent benefit. (Maybe there would be a benefit if you can't print grayscale, and the slope version above doesn't work well.)Capacitive displacement sensor in the form of digital calipers.Problems:expensive (especially if we want the full travel); protocols can be weird; might wear out or break more easily than other options.Make our own capacitive linear encoder/potentiometer/combo(equivalent to optical ones described above). Gray code would be easy with enough inputs.Problem:too much analog hardware needed; possibly nonlinear; the necessary foot-long (flex?) PCBs would be expensive.Make our ownLVDTs.Would be pretty durable if properly made, and we can make them to any necessary length. We could also conceivably make them curved (not the same as an RVDT) and directly measure the angle rather than the vertical or angled displacement.Problems:analog (though it's easy analog); lots of winding of coils.Make our ownRVDTs, to put at the pivot point.Would be pretty durable if properly made.Problems:RVDTs seem harder to make than LVDTs; rotation will not be anywhere near 180°, so output signal amplitude will be small; mounting might be difficult, lots of winding of coils.LVDCs/RVDCs.Like the above, but capacitive rather than inductive. Added 2016-12-05.Problems:Same as above, minus coil winding, plus potentially large PCBs for LVDC.Use a long compression or extension spring, connected to a force sensor.Can be made long enough. Very simple.Problem:analog; FSRs are nonlinear, while strain gauges need expensive amplifiers; changes the behavior of the suspension because it adds another spring to it, though a very light spring might be okay. (We can't do this with the existing suspension springs or other parts because the whole data acquisition system must be easily removable for racing.)Use a long syringe or a rubber tube with a sliding pinch roller, connected to an air pressure sensor.Can be made arbitrarily long, in the latter form.Problems:a syringe would add friction; changes the behavior of the suspension because it acts as an air spring; will likely wear out quickly; could lose track of position if there's a leak; air pressure sensors are expensive.Use a long syringe or a rubber tube with a sliding pinch roller, connected to an air flow sensor.Can be made arbitrarily long, in the latter form.Problems:a syringe would add friction; relative measurement only; will likely wear out quickly; could lose track of position if there's a leak or the flow sensor is imperfect; flow sensors are expensive.Put an IMU on the chassis and another IMU on each suspension mechanism and compare their motions.Totally immune to dirt, and easily implemented with no analog circuitry. (Added 2016-11-24; I thought of it while going to bed last night. Apparently _Wim_ had the same idea)Problem:lots of math for the controller to do all the time; I'm bad at IMU math.Linear CCD or 1-dimensionalposition sensitive devicewith a light shining on it.Would need to be mounted near the pivot point because the range is tiny.Problems:difficult interfacing for CCD, analog for PSD; expensive; possibly difficult to align.Optical mouse sensor, tracking on an arc-shaped sliding piece connected to the suspension arm.Problems:interfacing could be difficult (USB host necessary?); hard to find new (and probably expensive); hard to find 4 identical used ones with suitable interfaces.Camera and computer vision algorithms.Arbitrary range, pretty immune to dirt depending on where it's mounted.Problems:computationally intensive even for one; low frame rate from the camera relative to what's achievable with other sensors; even lower CV frame rate; high power consumption; susceptible to different lighting conditions; expensive.(in combination with another option)Put a wedge on the traveling part of the suspension, which slides past a shorter-range sensor, or a cam on the pivot point, which rotates past a shorter-range sensor.This could reduce the travel being measured to fit in the VL6180's range, for example, or even enough for a direct capacitive displacement sensor.Problems:it would be far more susceptible to being knocked out of alignment; it's not likely necessary, because we can probably just mount a shorter-range sensor further inboard.My favorite options right now are, in order of appearance in the list: string rotary encoder with local quadrature-to-serial IC or microcontroller, ams rotary magnetic encoder at the pivot point, linear membrane potentiometer, make our own LVDTs.What other sensing methods can you think of? Any advantages or disadvantages I missed? What would you use?

author: nctnico
author_rank: Super Contributor
timestamp: November 24, 2016, 11:53:16 am
content: I'd try optical encoders at the pivot points inside the body of the buggy. If you record the movement changes and speed then you can determine the absolute values as well.

author: jonovid
author_rank: Super Contributor
timestamp: November 24, 2016, 12:11:46 pm
content: Quoteor use optical linear encoder inside a tube & rod like a gas strut, has encoding over the full travel.one end to the body the other to the travel arm. o rings on the end. use 3D printing if needed.two part linear encoder can be filled with translucent oil or lubricant, to keep dust out.set up a test rig. run tests .

author: nfmax
author_rank: Super Contributor
timestamp: November 24, 2016, 12:19:48 pm
content: Omega sells ready-made, waterproof (IP68) LVDT displacement transducers with built-in signal conditioning giving 4-20mA output. They are quite expensive though - around the 600UKP mark. The equivalent non-waterproof versions at about half the price would probably be an expensive economy.

author: dmills
author_rank: Super Contributor
timestamp: November 24, 2016, 12:49:06 pm
content: LVDT is the traditional approach but you could maybe find some component where strain was a proxy for displacement (Question for the mechanical guys) and then just bond a strain gauge onto it?Another rather less linear approach might be to wind a solenoid on a length of plastic tube and arrange for a copper tube to slide inside it, the effective inductance will change as the copper progressively shorts more of the field, a steel rod as the slider would have the opposite effect I expect.Add an LC oscillator and measure the frequency with a counter timer channel on the processor?You really want non contact here, and preferably something dirt immune.Regards, Dan.

author: nfmax
author_rank: Super Contributor
timestamp: November 24, 2016, 01:00:52 pm
content: Quote from: dmills on November 24, 2016, 12:49:06 pmIn my experience, you can never 'just' bond a strain gauge to anything, especially in an environment like this. You are also fighting against the desire of the mechanical engineers to make the structure as stiff as possible, which makes strain a poor proxy for displacement.

author: filssavi
author_rank: Frequent Contributor
timestamp: November 24, 2016, 01:41:12 pm
content: As an ex FSAE electronics responsabile, I have 2 advices for you:1) you are not doing something unheard of, so look at what people before you (and more experienced in motorsport) are doing, they will likely have considered the same range od sensors and consistently choosen 1 or 2 types2)KISS there are a lot of (needed) moving parts that cam fail at any time, you shurely dont want to be adding more.As for the choice of sensors, It is universaly used a linear sensor across the shock absorber so the choice isbetween an LVDT and a potentiometer there it is a tradeoff between lifespan of the sensor and cost/simplicity.Personally I would pick a good potentiometer from a reputable motorsport brand, that is because even if It isexpemsive It will be much cheaper than going LVDT (you'll have to factor in also the signal conditioning for It)The wiper contactless wear is a non issue to me, you will replace the sensor long before It will even become a problemi either because (i hope not, but It is always a possibility) you have an accident (even in a small one, the exposed suspensions get a beating) or most likely because you will simply change suspension geometry or you get new electronics/cabling and It is always better to change a sensor earlyeven if a little wastefull than having It to break when you need oneEDIT: to measure 12 inches directly things get a little on the expensive side (read very expensive) and even they you'll need quite a beefy sensor or you'll risk breaking the shaft at maximum travel if It isnt perfectly alligned (and unless your mech collegues are very very experienced chances are it wont be.So since you dont need nanometer accuracy/resolution it is reasonable for you to ask your mech collegues to design some lever/cam arrangement for you to mount the sensor in so that you have a more reasonable full scale travel say 10/20 cm (5/10 in more or less)

author: rstofer
author_rank: Super Contributor
timestamp: November 24, 2016, 04:42:06 pm
content: Google has a lot of links re: measuring suspension system displacement.Here is a paper re: using an accelerometer and math to get displacement. It compares the results with the conventional LVDT approach.http://faculty.uml.edu/pavitabile/downloads/Format_Report_Example_090404.pdf

author: LaserSteve
author_rank: Super Contributor
timestamp: November 24, 2016, 07:21:47 pm
content: TI FDC1004 capacitive sensing chip. 49.95$ 4 channel demo board, active driven shielding, and the MEs can understand it. Can sense angle or use sliding coaxial tubing.I have a bunch of the demo kits strune across the University, because the included demo software has data logging that kicks ass.Demo board plugs right into USB, your up and experimenting in 15 minutes. So far has shown excellent EMC capabilities, despite their usual efforts, the grad students have not been able to kill the demo boards.ChemE, both graduate and undergrad, had no problem adapting to FDC1004, except the driven shield perplexed them. That was overcame by building a physical demo of the driven shield with a removable shield.Only sensor I've bought in 15 years of tech support, where I have had 1. Requests for more demo units, and 2. A undergraduate student taking the un-opened box from Digikey, and say "I've got it from here."The supporting documentation (all 4 pdf) is excellent.Steve

author: max_torque
author_rank: Super Contributor
timestamp: November 24, 2016, 07:39:20 pm
content: What no one seems to have noticed is that the sensors environment is awful! Dirt, rocks, waterr, vibration, god knows what else wanging around all over the place during operation.This leaves you two options:1) use specific "motorsport" sensors, that are robust/ reliable, but cost a fortune.OR2) Use OEM ride height sensors, that are slighty less robust, but WAY cheaper, and just replace them if you break them.Personally, i'd go with option 2, and buy some spares, as after 25 years of supporting professioal track (and forest!) testing of race and rally cars, being stuck with a broken, but effectively irreplaceable sensor is a very real posibility!Plenty of OEM sensors to choose from, made by Bosch, Pierburg, Denso etc

author: nctnico
author_rank: Super Contributor
timestamp: November 24, 2016, 08:25:29 pm
content: Quote from: max_torque on November 24, 2016, 07:39:20 pmWell this is exactly why I suggested the optical encoder inside the buggy's body (ofcourse this optical encoder should be water tight and suitable for outdoor use but that goes without saying IMHO). BTW it is very likely a buggy will be washed using a high pressure washer so whatever is mounted to the wheels and suspension parts outside the body is likely to get hit with water under high pressure.

author: _Wim_
author_rank: Super Contributor
timestamp: November 24, 2016, 09:11:05 pm
content: I do not know if it is really feasible, but you could look into installing a gyro/accelera sensor on each suspension, and one (or more) on the car body. The difference in angular motion/acceleration between the car body and the suspension could tell you something about the suspension travel (and a lot of other information). But be prepared to write some serious filtering software to handle drifts and noise... As you only intent to analyse the data later, this can be done on the pc. By recording all the raw data, you can run multple different analysis on the same data.

author: joeqsmith
author_rank: Super Contributor
timestamp: November 24, 2016, 09:42:21 pm
content: zip ties over the shock, instant peak travel recording. Fairly robust, easy to install, does not loose it's memory when the power fails, immune to EMI/RFI and costs pennies.

author: t1d
author_rank: Super Contributor
timestamp: November 25, 2016, 04:10:50 am
content: Cheap laser "tape measures" hacked to a controller? All the measurement hardware is there and you should be able to find a solder point to source the data. Cheap enough to replace as broken. Don't know how fast it samples, though.

author: PointyOintment
author_rank: Frequent Contributor
timestamp: December 06, 2016, 02:26:39 am
content: Thanks for the input, everybody. I will have to look into what others have done on this problem in greater detail. I still have a month and a half or so before we actually start working on the project at school, but I would like to get a head start on the electronics design, so maybe I'll pick a few sensor types to test out. I don't think I mentioned it in the OP, but they also want us to log some RPMs, but those are pretty easy.