-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADS1256 Load Cell readings fluctuate and cause the motor to oscillate #1
Comments
Thank you so much for this awesome project. I'm thinking about implementing a Kalman filter to estimate the load from the noisy ADC readings. It might work better than the MA filter, since motion assumptions could be integrated. Alternatively, when two (or N) loadcells are used, their individual reading could be averaged. Which, probably, would reduce noise. Btw. the ADS1256 has different digital filters already onboard: BR |
Definitely going to build this as well! Thank you for sharing! I was thinking of smoothing the input signal with a small capacitor. But make sure to read this: Edit: I see you're using a 300kg loadcell. A ~100kg would give more resolution.... |
I am playing to switch over to a 100kg load cell (link below) like you suggested. I am also plan on trying a ADS1115 or a ADS1015 to see if they work better. |
These DYLY-107 loadcells look similar to those used on the simucube pedals and the dimensions are reasonably small |
I found a tiny one. Yo can check it here https://github.com/jgbbob8/DIY-Sim-Racing-Active-Pedal |
I like how small it is. You do need a relative short arm to get a good resolution. Your design seems to cope with that. The downside will be a lot of high force and I am not sure if you're motor will be strong enough to handle it. I do think a longer arm and ~100kg loadcell will work better to be honest. |
I tried the ads1115 and found the resolution to be not fine enough to smoothly work. Resolution with the 300kg load cell end up only being 0.1kg which lead to the pedal moving in steps rather than a smooth motion. The main problem is the ads1115 doesn't have a large enough gain value. I am going back to the ADS1256 and trying a linear voltage regulator to keep a consistent 5v input. |
@tjfenwick in your video, one can see some oscillations when the pedal is ac-/decelerated. Due to this acceleration additional force (F=m*a) will be measured by the loadcell. Do the oscillations you observed also occur, when you decouple the loadcell from the motor, thus the loadcell is not moving at all? |
Yes, the fluctuations occur even when the load cell is completely still. I believe it has to do with the 5v supply from the Arduino flucuating. Just a 0.01mV fluctuation can cause the load cell to read a whole kilogram different. This problem doesn't occur when you have a low sample rate (less than 100 samples per second) since it can average a bunch of measurements. However when you get more and more above 100 sps the fluctuations get worse. |
@tjfenwick may be a 300kg load cell is to much, I use a 150Kg one and do not press more tahn 75kg. I thnonk that If I make 75kg presure my range must be about 0 to 50% in a 300 KG cell the range will be 0 to 25% if I am not wrong |
@tjfenwick I would have thought, that due to the differential operation of the ADC, reference voltage fluctuations would not have an impact of the loadcell readings. But I'm gonna check the TI documents during the weekend. |
That's what I thought but figured I'd give the linear voltage regulator a try. The voltage regulator seemed to help as it cut the average fluctuations were cut in half. However I can still see voltage changes on my voltmeter especially when wiggling wires in the breadboard. When wiggling the input voltage wires to the ADS1256 the fluctuations get much worse. Perhaps using a solderable breadboard would further help with this issue. |
Hi, |
I use 2 HX711 with Teensy Lc for my loadcells (brakepedal, handbrake), it's easy and doing the job. |
Thanks for the suggestions. I've used the HX711 successfully in passive loadcell pedals. However, the HX711 only supports up to 80SPS. Tried 100SPS with the ADS1256, which resulted in strong oscillations. |
@tjfenwick: I've quickly tried an exponential filter, which gives faster response compared to the MA filter. I've made a video of the force readings during some pedal movement. Blue line is the noisy sensor reading, yellow is the MA filter (length=40) and gray is the exp filter (alpha=0.15). The oscillations aren't noticeably worse than with the MA filter, but the lag is reduced significantly. |
@tjfenwick: Same test, but with a Kalman Filter implementation now. Blue: instantaneous force measurement KalmanObservation.mov |
Awesome work! I'll have to try both of those filter methods and see how they work for me. In those video are you using a ADS1256 and what was the sample per second? |
Thank you. Both filters have been uploaded to the fork. ADS1256 was used with 500SPS. Let me know if you need assistance with the tuning. I've tried 1000SPS as well, but the cycle time on the Arduino Nano didn't improve over 500SPS, therefore didn't make sense. |
I've had a look at your fork. Great work. How's testing? |
When will be able the wiring diagram? I do not want to burn anything jajajajaja |
@laserbeak @jgbbob8 Thank you. I've designed and ordered custom PCBs for the DIY pedals. They should come early next week. It was 8€/5PCBs including shipping. If you want, I can release the Gerber files after testing? |
That's very generous of you and yes, I'd be interested. I'm also wondering how your solution mounts to an 80/20 rig. My current fanatec pedals (Clubsport) are directly mounted to mine. I can see myself mounting them with corner brackets, but would still need a footplate to rest my heels. |
Is there somewere a schematic for this PCB? |
Merge code versions into common implementation
The readings I am receiving from the load cell through the ADS1256 fluctuate around 0.5lbs. This causes the motor to oscillate when trying to hold a constant pressure on the pressure. I have mitigated this by adding a small dead zone on the pedal position that requires a certain number of steps before it will move along with a moving average on my load cell readings to try to smooth it out. The combination of these two has greatly reduced the oscillations but has added a slight lag to the pedal movement.
I have done some test at 30,000 samples per second using a teensy and the fluctuations are much worse. I believe it is because the 5v output on the teensy and Arduino are to dirty. Will look into using a cleaner 5v reference supply.
The text was updated successfully, but these errors were encountered: