srpape
Posts: 2
Joined: Sat Apr 27, 2019 4:56 pm

Reducing 3b+ ARM clock speed - I/O issues

Sat Apr 27, 2019 5:24 pm

Hey all,

Just wanted to put this out there, because I spent a while troubleshooting it.

I'm running a Pi 3b+ in a Greenhouse to regulate an exhaust fan (among other things). It's powered by solar+battery, so I had tried to reduce power consumption as much as possible. I had USB/HDMI disabled, and reduced the clock speed in /boot/config.txt with arm_freq_min=100. My assumption was that the clock speed would ramp back up on demand anyway.

I kept having issues with 1wire, specifically a DS18B20, including CRC errors and the device disappearing. I also had reliability issues with an AM2302 (a wired DHT22), and was relying on both sensors together to make some kind of sense, but it was frustrating me. I just remembered this morning that I had made that clock speed change, and commented it out, and suddenly everything seems flawless.

Maybe this is something people already know about, but while searching for CRC errors on 1wire, I never came across it.

Here's my setup:

Image

The Pi talks over RS-485 to the solar charger. It also controls the motor controller with PWM to regulate the exhaust fan speed. The board on the top right steps up 12->24v so the fan has a higher top-speed.

I'm not super-happy about the wires sticking out on the pi-ezconnect hat, but it's better than a breadboard.

-Stephen

User avatar
Joel_Mckay
Posts: 289
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: Reducing 3b+ ARM clock speed - I/O issues

Sat Apr 27, 2019 11:09 pm

The reason many people use the bme280 is that it is reliable, accurate, and repeatable. Swapping sensors can be a pain, but sometimes using a different chip just works out being easier, and wastes less of your time in the long term.
viewtopic.php?f=28&t=239157

Actual analysis of 11 sensors, and note the reliability comments of the DHT style units:
http://www.kandrsmith.org/RJS/Misc/Hygr ... _many.html

Best of Luck,
J

Andyroo
Posts: 4467
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Reducing 3b+ ARM clock speed - I/O issues

Sat Apr 27, 2019 11:20 pm

Two things you could do for the 1-Wire:

1) Look at the parasitic power versions. They take power from the data line.
2) Control the power line via a GPIO - this lets you kill power under program control and reset any sensors on the line.
Need Pi spray - these things are breeding in my house...

srpape
Posts: 2
Joined: Sat Apr 27, 2019 4:56 pm

Re: Reducing 3b+ ARM clock speed - I/O issues

Sun Apr 28, 2019 6:36 pm

Thanks guys, I'll definitely look at that sensor comparison.

I did power the AM2302 with GPIO, so that I could power cycle it, but I was surprised that the 1-wire DS18B20 was also so unreliable. Like I said, bringing the clock speed back up has solved almost all of my issues, though. Now I'm just seeing the occasional wifi hiccup, pulling information from OpenWeatherMap and sometimes seeing DNS errors. I just wanted to note the clock speed issue somewhere, in case someone else made the same mistake I did.

andrum99
Posts: 800
Joined: Fri Jul 20, 2012 2:41 pm

Re: Reducing 3b+ ARM clock speed - I/O issues

Sun Apr 28, 2019 7:12 pm

srpape wrote:
Sun Apr 28, 2019 6:36 pm
Thanks guys, I'll definitely look at that sensor comparison.

I did power the AM2302 with GPIO, so that I could power cycle it, but I was surprised that the 1-wire DS18B20 was also so unreliable. Like I said, bringing the clock speed back up has solved almost all of my issues, though. Now I'm just seeing the occasional wifi hiccup, pulling information from OpenWeatherMap and sometimes seeing DNS errors. I just wanted to note the clock speed issue somewhere, in case someone else made the same mistake I did.
Wifi is wifi - there's not necessarily anything wrong on the Pi. If you have a router that supports the 5GHz band then you could try 802.11n or 802.11ac on the Pi at that frequency, and not 2.4GHz. (Many routers will attempt to use both bands on the same SSID).

Return to “Troubleshooting”