Kart throttle position sensor with magnet

Hello Everyone,

Im new to using Arduino, but veteran coder.
In a nutshell, Im trying to create my own kart data logger so I can collect the data from driver inputs.
The goal is to use this data for analysis and improve my driving.

I have bought a sensor that should measure the distance with a magnet.
This is the sensor tech sheet - AIM Kart Brake/Accelerator Pedal Position Sensor

Ans this is my code:

int led = 10;
int ledFade = 0;
char buffer[40];

template <typename T> Print& operator<<(Print& printer, T value)
{
  printer.print(value);
  return printer;
}

void setup() 
{
  Serial.begin(9600);
  pinMode(led, OUTPUT);
}

void loop() 
{
  int sensorValue = analogRead(A0);
  float voltage = sensorValue * (5.0 / 1024.0);

  ledFade = map(sensorValue, 0, 1023, 0, 255);

  analogWrite(led, ledFade);

  Serial << "LedFade:" << ledFade << " AnalogValue:" << sensorValue << " Voltage:" << voltage << '\n';

  delay(1);
}

My current issue is that, the output I get is always 5v, there is no variance in the signal?
Ant thoughts on what I might be doing wrong?

Thanks

Your code work well.
See at simulator.
I use a potentiometer to simulate your sensor.

The problem may or sensor or how it is connected.

How did you connect the sensor to the Arduino?

Please note that it is designed to connect to the company ECU, not any old Arduino. Do you have the 4.5 volt reference voltage connected? There is a lot missing from the data sheet you linked to!

Hello,

Many thanks for the reply, yes my code works with a potentiometer, I made sure I had that working before connecting the sensor.

I connect the sensor the same way I connect he potentiometer, this sensor uses an 719 connector, as per the technical sheet Ive shared the link here are my connections:

719 connector Pin1 Analog signal 0-5 V ----> Arduino A0 (where I read the inputs)
719 connector Pin2 Ground ----> Arduino Ground
719 connector Pin4 V reference (4.5V) ----> Arduino 5v voltage

I was trying to read the signal variance the same way I connected the potentiometer, but I don't know anything else about the sensor.

Is there another sensor or way I can measure a short distance in MM?
The distance could be something between 5MM - 40MM with steps/increments in MM or something similar so I can get as close as 1% increments between min and max throttle position, thats really what Im looking for, I just thought using this would be an easier way to achieve what I wanted.
But I don't have to use this sensor, I can use anything else that would serve the same purpose.

Im open to suggestions, as Im still new to this world or arduino, sensors and electronics in general.

Regards

Hello,

Many thanks for the reply, sorry I don't have any other specs about how the sensor works.

Please have a read in my previous post about what my goals are.

Essentially Im trying to find a way where I can measure pedal movement in a short distance, where I can get increments of 1% (or close enough) as the distance being somewhere between 5mm - 40mm

Regards

Look at this device to give you the throttle position.

Thank you @Paul_KD7HB will have a look

I noticed in the datasheet that the pinout shown is from the solder side of the connector, not the mating side.
Are you sure you have it connected right?

@jim-p mate you are absolutely right, the connectors on the spec sheet are for the binder, the sensor works now!

Appreciate the help and guidance here.

Next steps are to connect a bluetooth module and send the data to a phone, any recommendations on a module to use?

Regards

The HC- 05 is probably the most popular and it's cheap but basically it's a serial link between your Arduino and phone.

Will have a look, thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.