Different behavior of sensor between boards

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
jimako
Posts: 14
Joined: Fri Dec 23, 2016 6:36 pm

Different behavior of sensor between boards

Post by jimako » Thu Apr 19, 2018 1:49 pm

I have a simple script that uses the `dht` library to read values of dht11 and push them to a server. I first developed this on a NodeMCU v3 board and it is working fine. I ordered another dev board but instead of the NodeMCU v3, they sent me a NodeMCU Amica. Even though I thought that they are the same, I experience the following strange behavior.

After uploading the exact same micropython script, values received from the Amica board have singificant fluctuations which were not present using the NodeMCU v3 board! Switching the same sensor back to the NodeMCU v3 board, the fluctuations disappear. Here is a screenshot of the values.
mp dht11.png
mp dht11.png (33.99 KiB) Viewed 3412 times
I think it is obvious that in the middle is where I switched the sensor from the NodeMCU v3 to Amica! :lol:

Any thoughts?

jimako
Posts: 14
Joined: Fri Dec 23, 2016 6:36 pm

Re: Different behavior of sensor between boards

Post by jimako » Thu Apr 19, 2018 4:46 pm

At first I thought that something may be wrong with the timings of the Amica module which affect the one-wire bit banging which causes the error. However, after looking into the dht driver of MicroPython https://github.com/micropython/micropyt ... dht/dht.py this wouldn't be possible since there is a CRC when measuring.

So if we can assume that the transmission is correct, then the only thing that could go wrong is the actual sensor measurement. At the moment the only thing I can think of is that the Amica does not provide the correct power to the module causing wrong measurements. I will have to test this tomorrow.

Any suggestions or comments welcome.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Different behavior of sensor between boards

Post by pythoncoder » Sat Apr 21, 2018 9:28 am

If you have access to an oscilloscope you could check for noise on the DHT11 power line. Otherwise experiment with decoupling capacitors.
Peter Hinch
Index to my micropython libraries.

jimako
Posts: 14
Joined: Fri Dec 23, 2016 6:36 pm

Re: Different behavior of sensor between boards

Post by jimako » Sun Apr 22, 2018 7:43 am

Indeed, after switching the sensor to an external power supply, the fluctuations are gone, and the measurements are back to normal.
pythoncoder wrote:
Sat Apr 21, 2018 9:28 am
If you have access to an oscilloscope you could check for noise on the DHT11 power line. Otherwise experiment with decoupling capacitors.
Thanks. According to the datasheet of the original NodeMCU there are decoupling capacitors. This leads me to believe that the Amica board does not follow the original schematic. Image

Unfortunately I don't have an oscilloscope right now to confirm this.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Different behavior of sensor between boards

Post by pythoncoder » Sun Apr 22, 2018 8:51 am

jimako wrote:
Sun Apr 22, 2018 7:43 am
Indeed, after switching the sensor to an external power supply, the fluctuations are gone, and the measurements are back to normal...
Unfortunately I don't have an oscilloscope right now to confirm this.
I think you've proved the point, even without a 'scope.
Peter Hinch
Index to my micropython libraries.

Post Reply