sounds like more code i dont understand, or know how to write lol currently havent done any testing but i do have a sensor and trigger wheel to play around with.basically this is for a 4wd system in a car i have written a code already to control it manually but i want to now be able to conrtol it automatically so to look at the 2 rear wheel speeds and pick the fastest travelling one and compare it to the speed of the propshaft and if it is going slower execute it into another piece of code to lock the diff up.

look at the 2 rear wheel speeds and pick the fastest travelling one and compare it to the speed of the propshaft and if it is going slower execute it into another piece of code to lock the diff up.

That seems unnecessarily complex. Unless your diff has broken you know that the propshaft speed is proportional to the average of the two wheel speeds so all you need to do is look at the ratio of the two wheel speeds.

I only provide help via the forum - please do not contact me for private consultancy.

If the car is not going in a straight line the outer wheel will turn faster than the inner wheel.

I have been assuming that you have done at least a few of the example projects that came with your IDE. They do require some hands-on to teach basics.

Suppose you hook up the sensor and wheel you have and see what you can get from that?The sensor is digital right? It's either on or off, LOW or HIGH, 0 or 1?

So write code to read the sensor and if it is HIGH you turn a led on (UNO has built-in led on pin 13, I dunno about the MEGA) and if it is LOW you turn the led off. Then turn the wheel and see how the led flickers. If it does not then it's time to check the wiring and the code.

All that does is to ensure that you can read the sensor and get meaningful data.

That seems unnecessarily complex. Unless your diff has broken you know that the propshaft speed is proportional to the average of the two wheel speeds so all you need to do is look at the ratio of the two wheel speeds.

i disagree the car is normally a front wheel drive car, when slip is detected it will lock up the rear diff (as it doesnt have a centre diff) to transfer the power to the back wheels. in its original state the car will decide how much lock to put on by looking at the outside temperature, steering angles, throttle position, G force meter and overall speed. so this will be a simple system compared to the original

Quote

If the car is not going in a straight line the outer wheel will turn faster than the inner wheel.

yes it will this is why i want the arduino to pick the fastest moving wheel

Quote

I have been assuming that you have done at least a few of the example projects that came with your IDE. They do require some hands-on to teach basics.

yes i have so my knowlege is very limited

Quote

Suppose you hook up the sensor and wheel you have and see what you can get from that?The sensor is digital right? It's either on or off, LOW or HIGH, 0 or 1?

So write code to read the sensor and if it is HIGH you turn a led on (UNO has built-in led on pin 13, I dunno about the MEGA) and if it is LOW you turn the led off. Then turn the wheel and see how the led flickers. If it does not then it's time to check the wiring and the code.

yes i would of thought so i will have to try thatbut i am on the understanding that it is a hall sensori will do that and let you no what i get

Yes still have a resistor pulling in the opposite direction to the sensor.

There are in fact two types of digital hall sensor, one which switches when it sees any magnetic field and the other that outputs one state when it sees a south pole and changes state not when the magnet is removed but when it sees a north pole.

i disagree the car is normally a front wheel drive car, when slip is detected it will lock up the rear diff (as it doesnt have a centre diff) to transfer the power to the back wheels. in its original state the car will decide how much lock to put on by looking at the outside temperature, steering angles, throttle position, G force meter and overall speed. so this will be a simple system compared to the original

For that to make sense, the drive to the rear wheels must be very different to a conventional prop shaft and diff. Do you have a clutch in the prop shaft? (I remember there was a very nice hydraulically controlled one from Land Rover a few years ago.)

I only provide help via the forum - please do not contact me for private consultancy.

For that to make sense, the drive to the rear wheels must be very different to a conventional prop shaft and diff. Do you have a clutch in the prop shaft? (I remember there was a very nice hydraulically controlled one from Land Rover a few years ago.)

yes it is a hydraulically controlled

i tride that sensor out to day and could not get it to work the way we discussed so i tock the 10K pull down resister out and put a pot in then tork the pot down to 1.3k and it did work but very tempermentalthe sensor seems to work between 1.0-1.3kwhat do you think?

i tride that sensor out to day and could not get it to work the way we discussed so i tock the 10K pull down resister out and put a pot in then tork the pot down to 1.3k and it did work but very tempermentalthe sensor seems to work between 1.0-1.3kwhat do you think?

I think you need to find out for certain what sort of sensor you have and what sort of signal it outputs. Is it definitely a Hall effect sensor? I would have thought that an MVR sensor was more likely.

I only provide help via the forum - please do not contact me for private consultancy.