Shop OBEX P1 Docs P2 Docs Learn Events
Homework board and 5v for SHT1x? — Parallax Forums

Homework board and 5v for SHT1x?

markjmarkj Posts: 9
edited 2004-10-28 19:17 in BASIC Stamp
Hi-

I'm using a homework board to build a temp/humidity logger with the SHT1x. I need to supply 5v to the SHT1x and the homework board doesn't have a built-in 5v power supply.

What would be the best way to supply 5v to the SHT1x? I'd really like to be able to power down the SHT1x when I sleep the BS2 so the 9v battery will last as long as possible with the program waking up every couple of hours to take a reading.

Thanks- mj

Comments

  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 17:57
    Hello,

    You can use the Vdd (black header strip) at the top of the breadboard to supply the 5v.

    Vdd=5v

    Vin= voltage in

    Vss=ground

    Dave
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 18:02
    One more thing to add, you can use the "SLEEP" command to save your battery.

    Dave
  • markjmarkj Posts: 9
    edited 2004-10-27 18:35
    Hi Dave-

    Thanks for the response. When I measure the voltage from Vdd it measure 5v, thanks. I should have checked that first.

    So that's not the problem I'm having I guess.

    Here's what's going on...
    I created this first on the BOE and everything worked great. Now I've moved it all the the homework board and I get very strange readings from the SHT1x. Using the same program that works on the BOE the homework board says it's 615.3C in my house. On the BOE with a BS2 it says the right temp.

    Any ideas?

    Thanks- mj
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2004-10-27 18:45
    Mark,

    The BASIC Stamp regulator shouldn't be sourcing more than 50 mA. Our own Sensirion documentation indicates that it uses about 30 microwatts, which is very low. I went to the SHT1x datasheet and it indicates that the part uses less than 800 microamps during measure and sleep. The datasheet shows output peak current at 5 mA with 10 mA tri-state turned off. Somewhere else it says that the power consumption increases by 8 mA when the heating element is turned on.

    Bottom line is that it appears safe to power from the BASIC Stamp's voltage regulator, but I recommend you carefully review the datasheet to come to the same conclusion as me.

    Ken Gracey
    Parallax, Inc.
  • markjmarkj Posts: 9
    edited 2004-10-27 18:57
    Hi Ken-

    Yes, I agree that it uses very little power (and I'm not using the heater function). Also, I have a serial LCD hooked up but the specs on that show it uses 3mA without the backlight (and mine doesn't have a backlight so no danger of turning it on by mistake.

    I've attached my code that works on the BOE but not on the homework board just in case...

    It's pretty much the sample code from the SHT1x package from you guys as far as the SHT1x code goes. I've included a debug statement that outputs the temp so you should be able to run it without the LCD to see the funky temp reading.

    Thanks again for the fast response!

    -mj
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 19:06
    Let me set this up and I'll get back to you in about an hour.

    Dave
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 20:00
    Hello,

    I have set this up and it is·running just fine.· I recommend double checking your set up and if that isn't the case, please set it up on the Board of Education and see if it still works.· This will tell us if· it is damaged or not.

    Thanks,

    Dave
  • markjmarkj Posts: 9
    edited 2004-10-27 20:19
    Hi-

    Yes, I doubled checked the setup just now (in fact removed it and just re-did it). Still the errors on the Homework board.

    Moving the SHT1x over to the BOE everything works as expected.

    Also, I've tried switching which pins I'm using on the homework board (am now using pins 2 and 3) to connect to the SHT1x and still the same funky readings.

    Is the homework board bad?

    Thanks again-

    mj
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 20:32
    Hello,

    Let's have you try the basics first, I've attached a file for you to try.· let me know if this works.

    Dave
  • markjmarkj Posts: 9
    edited 2004-10-27 20:54
    Hi-

    Ok, on the BOE I get output like this:
    soT...... 6098
    tC....... 20.9∫
    tF....... 69.7∫
    soRH..... 1483
    rhLin.... 55.6%
    rhTrue... 51.5%

    On the Homework board it looks like this:
    soT...... 65535
    tC....... 615.2∫
    tF....... 1139.5∫
    soRH..... 65535
    rhLin.... 2641.1%
    rhTrue... 6526.9%

    Also, I should mention that I'm programming this from a MAC using MacBS2 using the 1.23 tokenizer (not that I think this would explain why it's working differently on the BOE and homework board)--but just so you have all the facts.

    Thanks-

    mj
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-27 21:06
    Dead 9-volt battery perhaps?
    Bad ground from the SHT-11 to the Homework board?

    It's very suspicious that you are reading "All-Ones" from the SHT-11.
  • markjmarkj Posts: 9
    edited 2004-10-27 21:20
    The 9v battery is the same one used on the BOE where it works fine.

    Just to be sure... I swapped the wire I was using for ground and moved the SHT1x to a new location on the breadboard to make sure I wasn't in a dead row on the bread board.

    Still the same output.

    -mj
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 21:27
    Just out of curiosity try using I/O pins 14 and 15 and see if this makes a difference?

    Dave
  • markjmarkj Posts: 9
    edited 2004-10-27 21:42
    Hi-

    No luck. Same issue using pins 14 and 15.


    ShtData PIN 15
    Clock PIN 14

    soT...... 65535
    tC....... 615.2∫
    tF....... 1139.5∫
    soRH..... 65535
    rhLin.... 2641.1%
    rhTrue... 6526.9%


    Thanks- mj
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 21:53
    Is it possible for you to send in your HomeWork Board and sensor all connected?· This will allow me to test it and figure out the issue.· If you would like to send it in, you can contact our sales department 1-888-512-1024 and ask for an RMA number and refer them to me (Dave Andreae).

    Thanks,

    Dave
  • K de JongK de Jong Posts: 154
    edited 2004-10-27 21:55
    Hi,

    There seems to be something seriously wrong there.

    I see two things you could try to get closer to a solution:

    1 imagine under which conditions your sensor can give the readings you see. From there you can work backwards to find more clues.

    2 take everything out of the homework board and check every connection of it. Are the additional resistors, is there a short somewhere or a break in the printed cicuit. Do the voltages on pins have the value they should have, etc.

    I hope you find the bug fast !!

    Klaus
  • markjmarkj Posts: 9
    edited 2004-10-27 22:07
    Dave-

    No problem and thanks for all of the time and help so far. Just got the RMA and it's on the way later today. I live in Santa Cruz so it might even be there tomorrow. smile.gif

    Again, thanks!

    -mj
  • dandreaedandreae Posts: 1,375
    edited 2004-10-27 22:15
    Great,·I will get this taken care of as soon as possible.

    Dave
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2004-10-28 00:19
    markj said...
    Hi-

    Ok, on the BOE I get output like this:
    soT...... 6098
    tC....... 20.9∫
    tF....... 69.7∫
    soRH..... 1483
    rhLin.... 55.6%
    rhTrue... 51.5%

    On the Homework board it looks like this:
    soT...... 65535
    tC....... 615.2∫
    tF....... 1139.5∫
    soRH..... 65535
    rhLin.... 2641.1%
    rhTrue... 6526.9%

    ...
    mj

    Hi mj,

    Did you have the pulldown resistor installed on the clock pin, as suggested in the PDF file?

    http://www.parallax.com/dl/src/prod/shtdocscode.zip

    Lack of that resistor can cause the effect you observed, that is, raw readings of 65535. It is a mystery to me why it would work on the BOE but not on the homework board, but it may have to do with stray capacitance or something of that sort. The SHTxx will lock up if the clock pin comes up high when the power is applied. Some individual SHTxx chips are more subject to this effect than others. (I have used hundreds of these in field applications where I always hear about it if any of them act up! All my boards now have the pulldown resistor on the clock line, and that particular problem disappeared. The need for the resistor was not mentioned in the original Sensirion documentation.)

    Another way to avoid that problem is to power the SHTxx from a stamp pin, and make the clock line a low output before applying the power.

    A note about the power consumption. In between measurements, when it is asleep, the SHTxx draws less than one microamp (0.3 ua typical), so leaving it powered all the time from 5 volts will not add much to the power budget. When it takes a reading, the current drain pulses briefly to 0.5 milliamp, which is feasible from a Stamp pin. (However, it will not be as accurate, because the pin voltage is not as well controlled as Vdd.) Taking one reading per second takes an average current of about 30 microamps. The chip automatically goes to sleep between readings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • markjmarkj Posts: 9
    edited 2004-10-28 19:17
    Hi Tracy-

    Thanks for the suggestions and advice. Yes on the pulldown resistor as described in the parallax docs--it was there and I swapped it for another one when I was debugging the circuit.

    That's great news on the sleeping between readings for the SHT1x--I think I'll just try it connected to Vdd and see how long it lasts.

    I may also try powering it from a stamp pin as you suggested.

    Thanks very much for your response.

    -mj
Sign In or Register to comment.