Shop OBEX P1 Docs P2 Docs Learn Events
CM2302 power cosiderations — Parallax Forums

CM2302 power cosiderations

In my new project I want to place the CM2302 module outside, and have it connected to the Activity Board using some four wire telephone cable, which will be located inside the house.

Now the questions is, since the cable will be at least forty feet in length, will the Activity board be able to supply the necessary power. I am not sure as to how much power it will cost to deliver the necessary voltage over forty feet of wire. The telephone cable has four wires that look like they maybe 16 or 18 gauge. Forty feet is my guesstimate at the moment, it could be a longer distance.


Since I am not an electrical engineer, I am not sure how I would go about calculating for the voltage value requirements. Any help would be appreciated.

Ray

Thanks

Comments

  • tomcrawfordtomcrawford Posts: 1,126
    edited 2018-08-23 21:54
    You can use this calculator to determine estimate the resistance (in ohms) of your wire. Remember both wires count. Now use ohm's law to determine the voltage drop.
  • It will be fine it not a high current sensor!!

    Be sure to decouple the device, and use a stiff pull up (4k7 or lower) for a long run like this.
    See fig 5.1.2 in the cm2302 user manual for suggested components for the sensor end of the cable.

    Your will need to level shift to 5V as the CM2302 is not rated for cable runs over 10cm at 3V3, only 5V.
  • After reading the documentation a couple of times, on page 4, I find this note:
    Note: 1.Cable length shorter than 30 meters with 4.7K pull-up resistor proposed in the typical application circuit, more than 30 meters according to the actual situation of lower pull resistance.
    not sure how to interpret this. In the Learn forum I found a small diagram for the CM2302 implementation on the Activity Board. There it shows that a 10K pull-up resistor should be used, everything there is very close together.

    Probably my first test with the implementation, with the Activity Board, I will be using the 5V power supply, I am not sure which pull-up configuration that I should use, 4.7K or 10K. In fact this pull-up stuff is starting to get confusing, when do you use, and what do you use. Since I am using the new Activity Board, which has a better power source, I think it should be able to handle the forty or fifty feet of cable between the module and the Activity Board, using the 5V power source.

    Ray
  • 10k pullup if it's close but over long lines it's the capacitance that needs to be taken into account, not the resistance so much. The fact is that you could probably use 1k pullup without any problems, it's just that the 10k draws a lot less current and why draw more current than you need? So use a 2k2, or 3k3 but just as a test I tried 1k on a DHT22 (same beast) and it works fine and the logic levels weren't affected either. If it's a standard CMOS output from the device the truth is that it is probably fine with even less than 1k so if you use 3k3 or less then you certainly don't have any problem.


    By all means, add a decoupling capacitor or balanced pair using a 0.1uF and perhaps a 10uF, the larger once provides the overall power to overcome "brownouts" while the 0.1uF handles the higher frequency switching transients better.
  • I received my CM2302 module and created a quick and dirty SimpleIDE C program. I noticed, in the Learn forum, there is no C example code for how to use the CDM2302. Although there is a wiring diagram for installation.

    I was pleasantly surprised at accuracy of the module, not necessary to calibrate the module, the readings are very close.

    I tested this with my FLiP module, now I will procced to add this too my Activity Board and do the telephone cable extension test. As it turns out, I am only using about twenty feet of cable, so I think that 3.3V should be plenty for this to work.

    Ray
    /*
      cm2302_test.c
      September 13, 2018
    */
    #include "simpletools.h"
    #include "dht22.h"
    
    float temp,humid;  // Decimal point precision.
    
    int main()
    {
      // Add startup code here.
      
     
      while(1)
      {
        // Add main loop code here.
        dht22_read(16);   // CM2302 is connected to pin 16.
        pause(150);
        temp = dht22_getTemp(1);  // (0) Celsius, (1) Fahrenheit, (2) Kelvin.
        temp = (temp*.10); 
        print("%.2f Temperature\n",temp);  // Apply decimal point precission.
        humid = dht22_getHumidity();
        humid = (humid*.10);
        print("%.2f Humidity\n",humid);  // Apply decimal point precission.
        pause(2000);  // Pause for two seconds.
      }  
    }
    
Sign In or Register to comment.