K8055 with Hall effect sensor

Hi,
I’ve been using my k8055 with a hall effect sensor to make a tachometer. I’ve places a magnet om a wheel that should make a count for each time it passes the sensor. My problem is that I get very unstable counts if I get anyones at all. I can also say that I’m kind of a beginner in the area so every tip is appreciated.

It is setup-ed as the picture and it is counter 2 I’m reading from. The values of the resistors I got recommended to me, could that be a problem?
I can also say that the sensor has working voltage of 4-24V but I’m only getting 2.6V from the card. I’ve also tried to connect a separate voltage source of 5V with the same result.

Anyone having any ideas of the bad signals?

I’ve been using this sensor:
https://www1.elfa.se/data1/wwwroot/assets/datasheets/gd55100_data_en.pdf

and this is the wiring diagram:

/Sebbo

One reason could be the counter debounce time. Does your software set that to the minimum?

Does the counting work if you rotate the wheel “very slowly”?

The current consumption of the Hall sensor may be too high to feed from the analog output of the K8055. Have you checked the voltage?
There is a 1.5k series resistor at the analog output. This limits the max current to 1.5mA when the analog output is short circuited to GND.
Have you tried with battery or power adaptor as the power supply for the Hall sensor?

[quote=“MostlyHarmless”]One reason could be the counter debounce time. Does your software set that to the minimum?

Does the counting work if you rotate the wheel “very slowly”?[/quote]

The debounce time is minimum, and yes it is easier to get counts if I approach it slowly. Does this indicates something? Perhaps too low power from the board?

[quote=“VEL255”]The current consumption of the Hall sensor may be too high to feed from the analog output of the K8055. Have you checked the voltage?
There is a 1.5k series resistor at the analog output. This limits the max current to 1.5mA when the analog output is short circuited to GND.
Have you tried with battery or power adaptor as the power supply for the Hall sensor?[/quote]

Could defenitlty be a problem here, I measured between GND and DAC2 and got 3mA and the sensor should be using “max 20mA” according to specs. Is their a way to boost my output current and voltage from the card in some way? Shouldn’t it be able to give 100mA and 5V or is that because of my resistances is wrong?

Thanks for your reply! :slight_smile:

You can take the +5V directly from the “upper” pin of the pin header SK2 or SK3.

BTW: Why do you have the 0.2k resistor in the GND lead of the Hall sensor? I think it can be remover. Connect the Hall sensor GND lead directly to the GND terminal of the K8055.

Also you can remove the 1k series resistor from the output of the Hall sensor.

[quote=“VEL255”]You can take the +5V directly from the “upper” pin of the pin header SK2 or SK3.

BTW: Why do you have the 0.2k resistor in the GND lead of the Hall sensor? I think it can be remover. Connect the Hall sensor GND lead directly to the GND terminal of the K8055.

Also you can remove the 1k series resistor from the output of the Hall sensor.[/quote]

I tried the things you mentioned and it actually worked alot better! I now take +5V from SK2 and removed the resistors. How do I know what current I get to the sensor? If I measure between the +SK2 and ground I get some strange value on my multim. Seems like 0? Or where do I measure to see current to the sensor?

Thank you so far, looks much better now!

The minimum counter debounce time of the K8055 is supposed to be 1ms. At least that is how I read the DLL code.

That means if the digital input is not held low for at least that long and afterwards released for that long too, the K8055 will not count.

If that is part of your problem, you need to find a way to elongate the pulse, caused by the magnet. This can be done by using a larger magnet, moving magnet and sensor closer to the axle or using some electronics between the sensor and the k8055.

The minimum counter debounce time of the K8055 is supposed to be 1ms. At least that is how I read the DLL code.

That means if the digital input is not held low for at least that long and afterwards released for that long too, the K8055 will not count.

If that is part of your problem, you need to find a way to elongate the pulse, caused by the magnet. This can be done by using a larger magnet, moving magnet and sensor closer to the axle or using some electronics between the sensor and the k8055.[/quote]

This could actually also be an issue as well. The equipment I’m using for testing, approx 1000rpm gives a velocity of ~5mm/ms and the magnet I’m using is about that size so that should mean I should be testing with a bigger one. Many good inputs!

Just to be sure that it is an optimal wiring: The cables are connected as they are shown in the picture but with the red on the top pin of the SK2 and the resistances are not their anymore. This feels okey?

[quote]Just to be sure that it is an optimal wiring: The cables are connected as they are shown in the picture but with the red on the top pin of the SK2 and the resistances are not their anymore. This feels okey?[/quote]Yes, this is OK.

When the debounce time is set to zero, the remaining debounce time is 0.25ms.
This means that 2kHz is the highest frequency the K8055 counters can count.
To count 2kHz, the duty cycle must be 50% i.e the pulse high and pulse low periods should be equal and both of them 0.25ms.

Thank you for your support. I’ve bought a larger magnet and I’m now getting the signals that I need. Nice 8)