Fanshim Software and PMS5003 particle sensor

Hi

I am using a raspberry Pi4 with a Fanshim and Enviro+ board with a PMS5003 particle sensor

It appear that you cannot install the fanshim software and use the particle sensor at the same time

If I install the fanshim software then i get the error

SerialTimeoutError (" PMS5003 Read Timeout : Failed to read start of frame byte "

If I unstall the fanshim software it all works

Has anyone else come across this and found a solution

Many thanks

Graham

They are both trying to use some of the same GPIO pins for two different things.



There is a noled option that “might” fix it. I think its the LED thats messing up the sensor.
sudo ./install-service.sh --on-threshold 55 --off-threshold 40 --delay 2 --noled

Hi

OK I’ll try that thanks

Graham

Hi

Tried that - didnt work Im afraid . Same error
Regards

Graham

Make sure you
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
Then run the install again with the --noled option.

The fan will just run continuously with no software installed, it will still cool your Pi.
Another option instead of the service is to add the following to your config.txt file.
dtoverlay=gpio-fan,gpiopin=18,temp=55000
It will turn on at 55c and off again at 45c. You can change the 5500 to what ever temp you want.
If you also add this line, pressing the fan shim button will have the Pi do a proper shutdown.
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up

Hi

OK I have tried that and its working - however my cpu temp is 40C and the fan is still running

What sets it to 45 on and 55 off

Regards

Graham

Tried which? The dtoverlay or the --noled?
The
dtoverlay=gpio-fan,gpiopin=18,temp=55000
entry in config.txt sets it to turn on when the temperature reaches 55c.
I’m told the off temp is 10c lower than the on, so it should turn back off at 45c.

Hi
the --noled didnt work

My cpu temp is under 40C but fan hasnt gone off

Regards

Graham

I’m still not exactly sure which way you went?
If your wanting to use the Fan shim service try the following from the terminal window.
cd fanshim-python
cd examples
sudo systemctl enable pimoroni-fanshim.service
sudo systemctl start pimoroni-fanshim.service
and reboot

If your going to use the dtoverlay you better do the following
cd fanshim-python
cd examples
sudo systemctl stop pimoroni-fanshim.service
sudo systemctl disable pimoroni-fanshim.service
and reboot

Hi

Its my fault - I could have been clearer

The - -noled didnt work even after stopping and restarting the service

So I have gone the dtoverlay route but the fan never stops even though my CPU temp is in the high 30s

Graham

You’ll need to stop and then disable the fan shim service, so the dtoverlay has complete control of that GPIO pin. That was my bad, I should have mentioned that earlier.

Hi Alphanumeric

I had done that anyway but its made no diffference

I have put the dtoverlay line in my /boot/config.txt file but its made no difference

The fan is always on even with a cpu temp of 39C

Graham

It must be due to the Enviro+ also using that pin?

It looks like Ill just have to live with the fan running 24/7 . Not ideal but I cant see another solution

I guess all fans will have this issue withe Enviro+board anyway

Thanks for your help though

Graham

An alternative would be to use a Pi Zero instead of a Pi 4B. It won’t need a fan and should be able to run the Enviro + software OK.