New build - dev/prod setup - Toro 60” zero turn

Final fuel sender design:
Here is a simple, one-line schematic that includes the 0-90 ohm fuel sender connected to the Pixhawk RPi CM4 Baseboard with a noise filter capacitor and voltage divider:

Simplified One-Line Schematic with Noise Filter

    +5V (Power Supply)
      |
      |
   [180Ω]  <-- Fixed Resistor
      |
      +-------> ADC1_3V3 (Analog Input on Pixhawk)
      |         |
   [Fuel Sender]  [0.1µF] <-- Noise Filter Capacitor
      |         |
    [GND]      [GND]

Description:

  1. Fixed Resistor (180Ω): Connect one end to the 5V power supply, the other end to both the Pixhawk analog input and one side of the fuel sender.
  2. Fuel Sender (0-90 Ohms): Connect one end to the fixed resistor junction (and the Pixhawk input), and the other end to ground.
  3. Noise Filter Capacitor (0.1µF): Place between the analog input pin (ADC1_3V3) and ground to reduce noise in the signal.

Connections Overview:

  1. Power Supply (+5V):
  • Connects to one end of the 180-ohm fixed resistor.
  1. Fixed Resistor (180Ω):
  • One end connected to the +5V power supply.
  • The other end connected to the junction point.
  1. Fuel Sender (0-90Ω Variable Resistor):
  • One lead (green wire) connected to the junction point.
  • The other lead (yellow wire) connected to Ground (GND).
  1. Junction Point:
  • Connects to the ADC1_3V3 analog input pin on the Pixhawk RPi CM4 Baseboard.
  • This is where the voltage varies based on the fuel sender’s resistance.
  1. Noise Filter Capacitor (0.1 µF):
  • Connected between the ADC1_3V3 analog input pin and Ground (GND).
  • Helps to filter out electrical noise for a stable reading.
  1. Ground (GND):
  • Common ground connection for the fuel sender, capacitor, and Pixhawk.

Detailed Steps:

  1. Connect the Power Supply:
  • Use the +5V (Pin 1) on the Pixhawk’s AD & IO port.
  • Connect this to one end of the 180Ω fixed resistor.
  1. Set Up the Voltage Divider:
  • Connect the other end of the 180Ω resistor to the junction point.
  • From the junction point, connect:
    • One lead to the ADC1_3V3 (Analog Input, Pin 6) on the Pixhawk.
    • The green wire of the fuel sender.
  1. Complete the Fuel Sender Circuit:
  • Connect the yellow wire of the fuel sender to Ground (GND, Pin 8) on the Pixhawk.
  1. Add the Noise Filter Capacitor:
  • Connect one leg of the 0.1 µF capacitor to the ADC1_3V3 (Pin 6).
  • Connect the other leg of the capacitor to Ground (GND, Pin 8).

Visual Representation:

Here’s a textual representation of the schematic:

plaintext

Copy code

       +5V (Pin 1)
         |
       [180Ω Resistor]
         |
         +-------> ADC1_3V3 (Pin 6)
         |          |
         |       [0.1µF Capacitor]
         |          |
    [Fuel Sender]   |
    (Green Wire)    |
         |         [GND] (Pin 8)
    (Yellow Wire)
         |
       [GND] (Pin 8)

Explanation:

  • Voltage Divider Operation:
    • The combination of the 180Ω fixed resistor and the 0-90Ω fuel sender creates a voltage divider.
    • As the fuel level changes, the resistance of the fuel sender changes, altering the voltage at the junction point.
    • The Pixhawk’s ADC1_3V3 pin reads this voltage, allowing it to determine the fuel level.
  • Noise Filtering:
    • The 0.1 µF capacitor smooths out voltage fluctuations due to electrical noise, ensuring accurate readings.

Safety and Verification:

  • Check Voltage Levels:
    • Ensure the voltage at the ADC1_3V3 pin does not exceed 3.3V to protect the Pixhawk’s analog input.
    • With the given resistor values, the voltage should remain within a safe range.
  • Secure Connections:
    • Double-check all wiring to prevent short circuits.
    • Use proper connectors or solder joints to maintain secure electrical connections.
  • Testing:
    • Before connecting to the Pixhawk, you might want to test the voltage at the junction point using a multimeter.
    • Verify that the voltage changes as expected when the fuel sender’s resistance changes.

Final Notes:

  • Calibration:

    • After setting up the hardware, you will need to calibrate the Pixhawk’s analog input to accurately correlate voltage readings to fuel levels.
  • Documentation:

1 Like

Hi @SJohnson - still have an issue when turning left/right. The servos are pretty agressive, but only in a turn. When pushing the stick forward, they move at a “normal” rate. I wonder if I’m looking at this wrong - maybe the “normal” rate (fore/aft) is slow, and the left/right is normal?

It makes for a bit of jerky turns. Still haven’t ran the configurator, but maybe that’s next?

Hope all is well with you and your bro - take a look at my fuel schematic and see if I missed anything. ChatGPT helped with the instructions…cd

I think your post of the fuel sensor setup is great. It looks fine to me as long as the voltage being read by the Pixhawk is always below 3.3v for all float levels in the tank. You did a great job of laying this out for others to use.
As far as steering with the RC Transmitter as long as you have set it up for exponential steering rate control, I don’t know of anything else you can do. To me steering with the transmitter has always taken a very careful touch of the stick. I am not sure what you mean by “configurator”.
I have also come a long way in deploying sensors on the original mower drive handles and putting together a system to switch between Ardupilot control and original drive handle control. I just want to actually get it working on my mower before I post the details of this system. I have redesigned the sensors twice and made a lot of changes on the overall system as I discovered improvements. My goal is to be able to flip a single switch (Switching the safety interlocks around so it is safe for a rider, disconnecting Ardupilot and enabling the manual drive system).

2 Likes

Whew! You have a lot going on - pls start a new build thread when you get the BadBoy going!

@marblecreek @jason_miller @wirenut1631 @Swebre2023
I just posted the latest information on activating the original drive handles on my mower with position sensors and a manual control system. I knew you were interested so I just wanted to give you a link to the following thread: Approach to provisioning a manual mode in addition to standard automation - #40 by SJohnson
With the gas dampeners still installed, it just drives like a normal manual mower!

2 Likes

Very nice write up. Thank you for sharing.

Jason Miller

Steve - great news! Do you think there will be any adverse impact on the servos from leaving the dampers in place?

Hope to see you soon!

The gas dampeners are only connected to the handles. The only thing that they do is to keep the manual operator from moving the handles too rapidly. It keeps the operator from over steering and helps keep the mower going straight. All the gas powered zero turn mowers come with them installed. Most of the time they are under that front deck and they look like tittle shock absorbers. They have no effect on the servos as long as the original mechanical connecting rod from the handles back to the hydrostat control valve is removed. The area where the gas dampeners are located could also be another area where the handle sensor could be be connected if it is convenient on your mower.

Ah - in my mind you were still connected to the servos. So, you are fly-by-wire all the way!!

Yes, we are totally “fly-by-wire”. The only risk to the servos is during setup of the manual control system. It’s easy to slam the servos into the stops until you get the setup (sensor rotation and min/max travel limiters setup). I ended up unplugging my servos during setup and just using the measured PWM pulse width on my cheap oscilloscope to get me setup pretty close before I plugged back in the servos.

Part of my do-no-harm strategy (to my Father-in-law’s mower) was to not drill any new holes. Went for a long time with only one (ground for the safety light on the rops), and drilled a couple more to secure the fuel tank. Sadly, I used the damper attach points for my servos.

I’m working on an idea for either a revamp of my existing setup (move the controls higher), or, a second mower where I think I’ll try the same setup. My hardware-in-the-loop testing setup is essentially the gear for another mower.

Thanks for the note - have a great holiday and I’ll see you at Mowstock (if not travelling) …

1 Like

Here is the most resent copy of my parameters you had ask for so you could do a compare.
Steves Tuning Parameters after V4.5.7 installed=041425.param (15.8 KB)

Thanks for the config @SJohnson ! I just moved my telemetry and nav antennas to the top of my ROPS hoping to alleviate a float/no fix issue, but no joy. Further I may have a problem with one of my servos. Likely self inflicted, but will start troubleshooting and see what comes up.

Re the antennas - WAY easier to manage the POS settings than my last array. . .

No judgement on my wire treatment - just in place to make sure it all works. Will dress them in when all is tested.

Also, magnetic mounting of the safety light worked out well - has been in 4 locations so far…

Great to see the upgrades and see you are still working on the mower. My antennas are up high also and the only trouble I have is tree branches once in a while, so I have to either trim the trees or stay farther back from them.
I think all mowers should have a safety light!

Having issues getting rtkfix on both gps’s. Happened before the move of the antennas - can’t seem to figure out why no worky… Your config was helpful - used mostly for tuning my turns/waypoints… Onward…

Ok - fiddling with this too long:

Problem - cannot reliably attain RTKfix on both GPS radios.

Work to date - moved GPS antennas as lower mounts thought to occlude parts of the sky; fiddled with GPS config settings (with ardupilot reboots in between); compared my config to @SJohnson 's (his setup is slightly different, older rev, but close); researched what I could find in ardupilot forums.

Logs from today: Ardumower-TORO - Google Drive

Config:
24Apr25.param (16.2 KB)

You need to separate concerns. Is it the moving base or onboard rover that’s problematic? In other words, is GPS1 or GPS2 the issue?

Step 1:
If you stop sending external corrections, does GPS2 retain an RTK Fixed state?

Thx for jumping in Yuri - totally appreciated. GPS1 seems to be at issue - RTK Float is the norm for that radio, but not always. In clear view of the sky and with corrections being sent for > 15min, still mostly RTK Float. This used to be my indicator that I didn’t turn on corrections and after enabling, GPS1 went to RTK Fixed. Not the case anymore.

I’ll double-check the corrections this afternoon and reply, but if memory serves, for GPS2, RTK Fixed remains with/without corrections.


Fresh from boot of ap/radios; no corrections; clear view of sky


Corrections enabled

Noticed “breach status” (from object avoidance / fence testing) replaced my sat count for gps1; fixed for tshooting nav

Swapped connections to antennas - no change


Swapped radios - RTK Fixed on both (left corrections on) (might not have waited long enough for RTK Float to reappear)


Corrections off


Swapped radios back to original - initially RTK Fixed on both (with corrections on), but over a short time (3min) became intermittent RTK Float/Fix - mostly RTK Float.
Getting Unhealthy GPS Signal too (when not in RTK Fixed)

This feels like I’ve mucked up the configuration of one of the radios in Ardupilot/MP config. I haven’t had to touch the radios with U-Center since the first day I installed them.

Was hoping for a cabling problem - easiest for me to resolve. Anyway, if you can point me to some diagnostic tools, ie., what data labels to review in the logs would be really helpful.

Many thanks to anyone that wants to chime in…