Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Automation, sensing and robotics • Re: Speedometer & Odometer project

$
0
0
Thanks for the initial responses. The pico looks very interesting. I have become blocked with the project. I connected the Adafruit Ultimate GPS unit to my pi and I was able to query the GPS data. However, I struggled to get the GPS refresh rate high enough to achieve my goal. The normal refresh rate at 9600 baud is 1 Hz (1 update per second). If I want to use it for a speedometer, I would like it to update 5x per second. This requirement originates from 1.) wanting to have timely reflection of speed during rapid acceleration and deceleration and 2.) I want to be able to update the screen image that reflects the speed more rapidly.

I think there is a way to increase the Ultimate GPS sample rate. However, I have not figured it out yet. So, I moved on to another possible solution. I purchased a Hall Effect sensor that will mount into my transmission (Summit Racing PN:SUM-800600FMC. The sensor has 3 wires, VCC, Sensor Output, and Ground. I attempted to connect it to my pi and I could not detect any change in output as I twisted the input shaft. So, I hooked the new sensor up to my multimeter and I could not see a drop in voltage when I put 3,3V through it. I then tried running 9V through the sensor ( to see if it needed something closer to 12V, which is the automotive voltage). This did not yield a result.

So, I am stuck. I don't know how to sample/see the output from the hall effect sensor. Also, I don't know how to get the GPS sensor to refresh fast enough. I don't want to spent too much more money on this project (meaning I really don't want to but another automotive hall effect sensor that will mount to my transmission). I could really use the help of folks on this forum to help find a solution. Below is some additional information related to my testing.

I attempted to use both a pull and a pull down resistor (10k) to see if this would help the hall effect sensor. These efforts did not improve the result.

Here is a view of one of the codes I used to sample the hall effect sensor output using my raspberry pi:

Code:

# 3.3V and ground came from the GPIO pins on the raspberry pifrom gpio zero import LineSensorfrom signal import pausesensor = LineSensor(17)sensor.when_line = lambda: print('Line detected')sensor.when_no_line = lambda: print("No line detected")pause()

Here is another script I used to test the sensor before resorting to the multimeter test:

Code:

import RPi.GPIO as gpiogpio.setmode(gpio.BCM)gpio.setwarnings(False)hallpin = 17gpio.setup(hallpin, gpio.IN, pull_up_down=gpio.PUD_UP)while True:if(gpio.input(hallpin)==True):print(gpio.input(hallpin))print("no magnet")if(gpio.input(hallpin)==False):print(gpio.input(hallpin))print("magnet detected")

Statistics: Posted by jeremycalifornia — Thu Feb 20, 2025 5:13 am



Viewing all articles
Browse latest Browse all 8041

Trending Articles