Page 1 of 1

PM5's data freeze after plugin the USB cable

Posted: May 16th, 2022, 10:41 pm
by swortain
hi, I try to run the example here(https://c2vt.svn.beanstalkapp.com/pm_arduino/) which contain an USB host device and connect the PM5 to Arduino with an USB cable. I can read the data in arduino but the data on PM5 freeze immediately if only an plug the USB cable(in USB-B port) and the data(like distance, time, calorie etc) will no longer change(when I Row it). After I unplugin the cable, every thing return to the normal, data keep change again...
I'm wondering if I'm wrong somewhere, or it is designed to be that...
Thx!

Re: PM5's data freeze after plugin the USB cable

Posted: June 22nd, 2022, 3:38 pm
by c2scott
If the Arduino is ONLY connected to the PM5 with the USB cable this should not happen. However, if you are making any other connections (such as to the 2.5mm jack for the generator/sensor wire) I can imagine this happening. I assume you are plugging a USB Type A cable into the Arduino and the B connector into the PM5's B socket.

All in all, with Bluetooth available, it may be easier to connect with a BLE enabled device.

Re: PM5's data freeze after plugin the USB cable

Posted: June 22nd, 2022, 7:14 pm
by JaapvanE
c2scott wrote:
June 22nd, 2022, 3:38 pm
However, if you are making any other connections (such as to the 2.5mm jack for the generator/sensor wire) I can imagine this happening.
I have a small circuit in betweeen (small optocoupler to feed the sensor data to a Raspberry Pi), and I didn't encounter any issues. Been using it for six months now.

Re: PM5's data freeze after plugin the USB cable

Posted: June 22nd, 2022, 7:17 pm
by JaapvanE
swortain wrote:
May 16th, 2022, 10:41 pm
hi, I try to run the example here(https://c2vt.svn.beanstalkapp.com/pm_arduino/) which contain an USB host device and connect the PM5 to Arduino with an USB cable. I can read the data in arduino but the data on PM5 freeze immediately if only an plug the USB cable(in USB-B port) and the data(like distance, time, calorie etc) will no longer change(when I Row it). After I unplugin the cable, every thing return to the normal, data keep change again...
I'm wondering if I'm wrong somewhere, or it is designed to be that...
Thx!
What are you trying to achieve? There is also PyRow, which can poll the PM5 data.