Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed Testing of LEADS Analog Sensors #207

Open
qmascarenhas opened this issue Jun 2, 2024 · 1 comment
Open

Detailed Testing of LEADS Analog Sensors #207

qmascarenhas opened this issue Jun 2, 2024 · 1 comment
Assignees
Labels
code review Code review or comment todo New task or assignment

Comments

@qmascarenhas
Copy link
Contributor

qmascarenhas commented Jun 2, 2024

For full functionality, LEADS requires a number of analog sensors. The first official release of LEADS for VeC99 Racing requires:

  1. A Voltage Sensor - to indicate BATT voltage (and eventually infer and indicate the BATT capacity once we have collected enough data. At the moment there is no indicated inference of BAT capacity).
  2. 3 Wheel speed Sensors - for each of the 2 20" front wheels and the single 26" rear drive wheel.

For a future release, the following analog sensors would also be useful:

  1. Throttle position Sensor - to indicate %age of depression (0 to max) of throttle lever or pedal.
  2. Controller Error Code Indicator - to indicate the error code number based on LED blinks for controllers (like the current KDS24200E deployed on VeC99). More expensive controllers will facilitate reading of error codes via a CAN/SPI or I2C interface.

The rpi mini-computer does not support direct reading of analog signals - only digital via the GPIO bus - because it does not have a built-in DAC. To overcome this, the initial release of LEADS uses several (2) Arduino micros (one for each sensor class) to input a digital value between 0 and 1023 that represents a voltage level serially to the rpi via a USB interface.

Testing Protocol for Analog Sensors Deployed on LEADS

BATT Voltage Sensor
This sensor consists of a simple 30kOhm/7.5kOhm voltage divider for a BATT Voltage range of 0 to 25V. The 10-bit DAC on the Arduino micro converts this input level to a 10-bit binary number that is input digitally to the rpi via the USB interface. To validate the voltage sensed, a calibrated secondary source like a digital multimeter or a NI myDAQ (for easy data logging of voltage sensed) should be used.

Wheel Speed Sensor
This sensor consists of a Hall Switch which indicates a high or a low depending on whether or not the sensor is in the vicinity of a magnetic field (of a magnet mounted on a spinning wheel). This on/off state will indicate the period of one revolution of the wheel (if a single magnet on the wheel is used). From this information and the size of the wheel, wheel speed is determined and input digitally to the rpi via the USB interface. To validate the wheel speed sensed, a calibrated secondary source like the Cateye Velo wireless should be used for ease of testing different wheels.

Throttle Position Sensor
Throttle position for motor controller input is typically specified as a 0-5V input. 0V indicating no throttle and 5V indicating max throttle. Most controllers will provide a 3-pin connection for an external sensor: +VCC (5V), GND, THR_SENS. The sensors typically employed are either a simple 3-terminal variable resistor (varistor) or a 3-terminal magnetic sensor. There are many magnetic sensors but it is important to note that there are two types (both applying the Hall effect differently). Before testing a throttle position sensor, it will be important to know what type of sensor is being employed. Each type will have a different Voltage-Angular_THR_Position response. It would be wise to have this response characterized as part of the testing procedure.

@ATATC
Copy link
Member

ATATC commented Jun 22, 2024

@qmascarenhas I bought a new type of hall switch that is smaller, cheaper, and more sensitive. I listed them in the budget as part of Project Thor.

@ProjectNeura ProjectNeura deleted a comment from qmascarenhas Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code review Code review or comment todo New task or assignment
Projects
None yet
Development

No branches or pull requests

2 participants