Should I modifymy IDE once I am changing from Arduino Nano to ProMini ?



  • Hi,

    I ran into a confusing problem. So the story is;

    I made an IDE which combines the DHT, LDR and a RELAY "mysensor" libraries together in one single code. Then I uploaded it to my Arduino Nano for testing, everything went smoothly and fine and I got all the readings on my HA.

    The problem started once I uploaded the same code to my Arduino Pro mini (I changed the board and port before uploading), and then for some reason, it keeps telling "It failed to read temp/hum from DHT". Believe me I doubled checked pin numbers, wires, and everything I still get the same error. Even when I changed to another Promini, I got the same error. And to add to my confusion, without changing anything, once I put the Nano back on, everything started to work and it could read data from DHT !

    So now I have two questions in my head;

    1. Is it possible that some "mysensors" libraries are incompatible with certain boards ?
    2. Simply, is there any difference between pin D3 on a Promini and a Nano ? (maybe ProMini can't provide the current required by DHT ... ?)

    Would really appreciate any suggestion,

    Cheers,
    Mehrdad


  • Hardware Contributor

    Hello.

    1. Mysensors is compatible with nano, mini pro, no problem
    2. No difference..and atmel can go up to 40mA max but 20mA is recommanded.

    So, perhaps a bad quality wire?? Have you tried to run your mini pro with the example sketch from the dht lib?


  • Hardware Contributor

    @mehrdad.silatani - how are you powering your node? The Nano uses 5v and if you use a 3.3v pro mini with batteries that drops below 3.3v the DHT22 will not work.

    Its not about the IDE/Sketch or board. I think its a power issue of some sort.



  • @scalz Thank you for your reply.

    Not a chance that it is the bad quality wire, cause Nano works on the very same wiring.

    Following your suggestion, I tested the Pro mini with the example sketch of dht lib. I get a weired outputs on my serial port (baud rate is matching to the defined rate on sketch, I even tried all other baud rates anyway ...)

    0_1474574981524_upload-81d68cc8-d35f-42fc-ae02-d1e1ea3999e7



  • @sundberg84 The whole system is currently working on 5V adapter which is fed to the RAW port of Promini and then I am powering the sensor from "Vcc" port.

    Anyway, I checked the voltage across the DHT11 sensor and my voltmeter shows 4.98 V. So I dont think the power is the problem ...I think this has been flagged before by other people as well, See-> (https://forum.mysensors.org/topic/1894/pro-mini-is-giving-a-frequent-time-out-on-dth11-read-out/9)

    I even tried two different Pro mini boards ! still no luck !



  • Ok out of curiosity, i changed my processor from "5V 16Mhz" to "3.3V 8Mhz" and then everything started to work all of a sudden !

    How can you tell what processor is used on your board ? I checked my order, and I am confident that I ordered the 5V 16MHz version ... so I guess I've been sent the wrong devices !


  • Mod

    @mehrdad.silatani here are some suggestions: http://arduino.stackexchange.com/questions/8511/how-to-identify-arduino-mini-pro-5v-vs-3-3v
    One of them is basically what you did, load a sketch and see if all timings are off by 2x. But always try with 3.3V since 5V can damage a board built for 3.3V.


Log in to reply
 

Suggested Topics

55
Online

11.4k
Users

11.1k
Topics

112.6k
Posts