Reduce SPI speed?
Moderators: grovkillen, Stuntteam, TD-er
Re: Reduce SPI speed?
Such a beautiful sight to behold:
TD-er's SCSI comment was spot on. The magic fix was a 330 Ω pulldown resistor termination on SCK, at the end of the daisy-chained ribbon cable, and no other changes. BTW, I found that the highest ohms value that worked was 470 Ω, so settled on 330 Ω.
Don't worry, SCK is a fully driven signal (not open collector) and does not rely on a pullup resistor for logic high. So the added pulldown does not change the logic levels. Still 0/3.3 VDC.
I will be torture testing the entire system with a heat gun and cold spray (to simulate the temperatures in the attic). That will help determine if this is a reliable fix.
But all that finish work is on hold for now. There are wild celebrations going on. Dancing in the streets. Women throwing beads. Children laughing. Because it's working!
- Thomas
TD-er's SCSI comment was spot on. The magic fix was a 330 Ω pulldown resistor termination on SCK, at the end of the daisy-chained ribbon cable, and no other changes. BTW, I found that the highest ohms value that worked was 470 Ω, so settled on 330 Ω.
Don't worry, SCK is a fully driven signal (not open collector) and does not rely on a pullup resistor for logic high. So the added pulldown does not change the logic levels. Still 0/3.3 VDC.
I will be torture testing the entire system with a heat gun and cold spray (to simulate the temperatures in the attic). That will help determine if this is a reliable fix.
But all that finish work is on hold for now. There are wild celebrations going on. Dancing in the streets. Women throwing beads. Children laughing. Because it's working!
- Thomas
Re: Reduce SPI speed?
Does this mean the release of the DSO coin will also be put on hold?
Anyway glad you fixed it
Anyway glad you fixed it

Re: Reduce SPI speed?
Invites to buy DSO Coin will be in everyone's inbox soon. Logan Paul will be promoting it.
I tortured the HVAC Monitoring system with a heat gun and freeze spray. It will mount in my attic where temperatures range from 5C to 50C. I tested with slightly more extreme temperatures and experienced zero issues.
The only problem I saw was that the web log was being filled with unknown commands and miles of gibberish. I disabled the Serial Port Console (Tool->Advanced) and the issue went away. I'm not using the USB port.
So it looks like it is time to write some ESPEasy rules and install the BMP390 Sensors. But installation has to wait until the HVAC system's two year warranty expires, which is a few weeks away.
BTW, I'm still focused on getting a new o-scope. Currently watching Amazon to see if the Rigol DHO804 price drops again.
Finally, a big Thank You to TD-er and ATH for their assistance. It's nice to bounce ideas around. And extra nice when the head banging stops and the problem is solved.
- Thomas
I tortured the HVAC Monitoring system with a heat gun and freeze spray. It will mount in my attic where temperatures range from 5C to 50C. I tested with slightly more extreme temperatures and experienced zero issues.
The only problem I saw was that the web log was being filled with unknown commands and miles of gibberish. I disabled the Serial Port Console (Tool->Advanced) and the issue went away. I'm not using the USB port.
So it looks like it is time to write some ESPEasy rules and install the BMP390 Sensors. But installation has to wait until the HVAC system's two year warranty expires, which is a few weeks away.
BTW, I'm still focused on getting a new o-scope. Currently watching Amazon to see if the Rigol DHO804 price drops again.
Finally, a big Thank You to TD-er and ATH for their assistance. It's nice to bounce ideas around. And extra nice when the head banging stops and the problem is solved.
- Thomas
Re: Reduce SPI speed?
Yep, it is always better to do bit-banging than head-banging 
By the way, what SPI speed are you now using?
Do I still need to make it configurable?

By the way, what SPI speed are you now using?
Do I still need to make it configurable?
Re: Reduce SPI speed?
I'm still a bit surprised you only needed to terminate the clock.
Are the other lines pulled up by the devices?
Are the other lines pulled up by the devices?
Re: Reduce SPI speed?
1. I'm using the default 1MHz clock. But needed 10KHz to help troubleshoot.
2. Although not essential, a configurable SPI clock speed would be nice. But I believe that would require modifying the Adafruit SPI library.
3. The BMP390 boards have 10K ohm pullup resistors on the SPI signals. I did not change them.
BTW, some helpful things that were needed during troubleshooting were three temporary mods to the BMP390 code (via Adafruit lib & P172). Besides reducing the clock speed, I duplicated the BMP390's operating mode init function to the Plugin's read (an init was performed before each read). And the check for successful SPI communication was disable (force success=true). Those tricks saved the day.
I'm now successfully running on unmodified code. It's the recent Dec 2024 ESPEasy build, ESP_Easy_mega_20241221_climate_ESP32_4M316k.
- Thomas
2. Although not essential, a configurable SPI clock speed would be nice. But I believe that would require modifying the Adafruit SPI library.
3. The BMP390 boards have 10K ohm pullup resistors on the SPI signals. I did not change them.
BTW, some helpful things that were needed during troubleshooting were three temporary mods to the BMP390 code (via Adafruit lib & P172). Besides reducing the clock speed, I duplicated the BMP390's operating mode init function to the Plugin's read (an init was performed before each read). And the check for successful SPI communication was disable (force success=true). Those tricks saved the day.
I'm now successfully running on unmodified code. It's the recent Dec 2024 ESPEasy build, ESP_Easy_mega_20241221_climate_ESP32_4M316k.
- Thomas
Re: Reduce SPI speed?
I installed the HVAC Performance Monitoring system yesterday. The three SPI based sensor probes (connected by the long ribbon cable) are now inside the HVAC duct plenums and heat exchanger. Everything works!
In a few days I'll post a project summary in my original discussion from last June 2024. This one:
viewtopic.php?t=10219
TL;DR Guy prototypes a new ESPEasy project. Experiences serious SPI communication issues because of his stupidly long cables. He pulls out his hair. Seeks help. Solves problem and lives to tell about it.
- Thomas
In a few days I'll post a project summary in my original discussion from last June 2024. This one:
viewtopic.php?t=10219
TL;DR Guy prototypes a new ESPEasy project. Experiences serious SPI communication issues because of his stupidly long cables. He pulls out his hair. Seeks help. Solves problem and lives to tell about it.
- Thomas
Re: Reduce SPI speed?
And that's why senior developers typically experience baldness.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 0 guests