Impulse's per 100m!

So I have being playing with kidding my fertilizer spreader that its wheel impulse is actually coming from GPS.
Problem is I’m converting GPS speed into pwm feeding into where the wheel impulse would go…but every time I do 100m calibration at a different speed, different number of Impulse’s received by spreader box!

Any ideas on a better way of getting true ground speed into Quantron box?

Doesn’t the box take NMEA in from a serial port?

What kind of sensor is it using? Often these sensors aren’t like simple switches. They can use resistance values to detect both a missing sensor, and a short to either high or low. You can measure the resistance between the signal wire and ground at various places in the wheel rotation.

If your sensor does have resistance instead of a dead short, and resistance instead of fully open, you can use an NPN transistor to switch between resistors to emulate that.

See my tractor doesn’t have a 9 pin socket, so rather than breaking into the one that the dashboard uses…I was going to use true speed from the gps!!!

1 Like

Using asd to control spreader
GitHub - Coffeetrac/AG_ASD_Host: ASD Host Controller for AGOpenGPS and Cerea

Like Torriem I am curious about the type of sensor.
Could be a sensor counting teeth (like 200 teeth per rotation of wheel) so count number will easily vary some numbers.
Or a sensor counting magnets on wheel (perhaps only one magnet per rotation) Wheel could stop right before magnet/sensor without counting or start with one count and stop just after last count.

Both situations it must be enough to make an average of 5 measurements and use that number of impulses for all speeds. Distance and rotation should not vary with speed.

Or as I have seen on my Cameleon seeder. Sensor was faulty, did no longer count all the teeth passing it, so speed was varying in seeder box while driving same speed with tractor.(and it did not help adjusting distance to tooth ring).

@torriem & @Larsvest don’t understand……. As I said I’m using gps speed, converting that to pwm and driving a mosfet…that my fertiliser spreader thinks its getting impulse’s for wheel sensor!?

So you are sending pulses to the fert. spreader to simulate a wheel sensor?

1 Like

Edit 2: so this calibration is done with the fake sensor?

I think we both are referring to this part of your first post.
That is why I ask what kind of impulses you get from spreader speed sensor, as it might be counts and not pwm

Or turn question around: what is the name/ part id of sensor?

Edit: Suggestion: Set control box to measure impulses per 100 m, then turn wheel exactly 1 round. Read the impulses and then look at how many Things has passed the sensor (bolt heads, teeth, magnets or…?)
If you are lucky impulses and things passed is same number :slightly_smiling_face:
If this happens you can do some math and convert gps speed to some Hz

Seems like he is taking the GPS speed and converting it to pulses to send to the control box on the fertilizer spreader.

yes just realized that, my bad, but maybe he is just counting the pwm frequency.

To calculate seconds per pulse with one magnet on the wheel:

PulseTime = (1/MPH) X (wheel circumference in inches) X (3600 sec/1hr) X (1/(5280 ft /mile X 12 in/ft))

Send a pulse every PulseTime to the fert. control box, I think?

1 Like

Yes…esp32 ledc set to 50 duty and changing frequency according to speed.

But it’s not working as I’d hoped, as I have said…do 100m at 1km/h get x number of counts…do same 100m at 5km/h I’m getting totally different count 22% different!

Think I’m going to have to go down that route, instead of trying to use pwm with ledc on esp32.

Actually I did understand that. I was pointing out there are sometimes more expected than a simple pulse.

But, SK21 is correct. PWM is not what you want. PWM means you have a fixed signal frequency, and only the amount of time spent high vs low changes, but the time from the beginning of the low signal to the end of the high signal is always fixed. The wheel sensor is not going to be like that. Instead it’s going to changing the pulse frequency, not the duty cycle. This is called PPM.

But also note that it might not be a simple high/low pulse (which is what I was getting at in my other message). Some wheel sensors (like the ones on my sprayer) use PPM current (not voltage), which is a subtle distinction. Basically means the pulse isn’t a full low (or full high) but pulled to low or high with a certain resistance value. The “non” pulse signal would be a different, higher resistance value. This is done so that the controller can detect a missing or failed sensor, or a short.

Wouldn’t it be simpler to send a pulse e.g. at every metre and set the Quantron screen to 100 pulses per 100 metres. Scalable of course.

1 Like

Sounds easy, the way you put it…but, there is no distance trigger in AOG apart for speed*4.

Changing the frequency not the duty is how I was doing it. But reading up more on esp32 pwm, I’m surprised it let me try to alter frequency on the fly! Think that could be some of my problem.

Don’t know about the sensor, but probably of more use is what’s the iso standard signal for the 9pin tractor communication socket? Either wheel or radar!
Also talks in the spreader about possibly using fsd v form signal, is that the canbus signal?

I see, I thought ESP32 had NMEA from the GNSS receiver and then it would be easy to calculate distance between two NMEA position messages. AOG certainly does but lacking the complete picture I should not try to guess where this all is implemented.

That’s a thought, will need to see if the gps sentence is udp broadcast and available to a section control esp32 module!?