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?
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.
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!?
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
If this happens you can do some math and convert gps speed to some Hz
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!
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.
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.