You are here

PAS 3-wire sensor : possible to check a digital input under VESC-toool?

7 posts / 0 new
Last post
marc426
Offline
Last seen: 2 months 3 weeks ago
VESC Free
Joined: 2018-02-14 14:38
Posts: 11
PAS 3-wire sensor : possible to check a digital input under VESC-toool?

Hi all,

I've tried to implement a 3-wire PAS sensor using a slightly modified code from RobertXuChun : https://github.com/vedderb/bldc/pull/243#issuecomment-809470359

The code is supposedly reading from the TX pin (HW_PAS2_PORT points to HW_UART_TX_PORT under hw.h)

The code compiles correctly but it won't listen to the port. I've even tried with a function generator sending a 1 to 100Hz square signal directly on the TX pin but nothing comes out...

Hence my question : is there any way to check a particular input live / logged under VESC-tool? That'd be most helpful to troubleshoot that.

 

Best regards,

 

Marc

marc426
Offline
Last seen: 2 months 3 weeks ago
VESC Free
Joined: 2018-02-14 14:38
Posts: 11

Hi All,

 

Bumping it up in case someone has an idea on how to debug a digital input! :-)

skyline1970
Offline
Last seen: 2 days 23 hours ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 170

in sw if uart is active, pas does not work, uart should be disabled, maybe, servo pin, would be better for pas.

marc426
Offline
Last seen: 2 months 3 weeks ago
VESC Free
Joined: 2018-02-14 14:38
Posts: 11

Hi Skyline, this is of course using the PAS setting under app (so disabling UART I assume).

Do I need to disable it in code?

skyline1970
Offline
Last seen: 2 days 23 hours ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 170

PAS setting under app ,so disabling UART in fw should not be necessary unless there is no an issue in sw.

marc426
Offline
Last seen: 2 months 3 weeks ago
VESC Free
Joined: 2018-02-14 14:38
Posts: 11

OK,

In that case I guess there is another issue in SW or else. I'm going to try to use some other GPIO pin and see what happens.

velolac
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2019-11-03 09:57
Posts: 24

Hi marc,

Have you succeeded in using a 3 wire PAS sensor? After quite a bit of search I only found quadrature (4 wired) PAS sensors at grin technologies. However I found out that dual channel hall sensor chips can be bought cheap (~ $3) , so I will make custom sensor. Still, I found no documentation about which ports shall be used for the 4 wired PAS. Do you happen to know it?

I am not sure how hard would it be for me to dig into a bit of coding as it shall be quite easy what I would like to achieve, too bad I have only basic knowledge in programming. I would basically use the PAS sensor signal to ignore the ADC input if there is no pedaling. It varies a lot how much assist I actually need, so keeping the throttle is beneficial for me.