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)