Menu

68 degrees LUX 1000

Chad Gray
2021-12-21
2022-09-28
  • Chad Gray

    Chad Gray - 2021-12-21

    Maybe i have damaged the MLX90614 or TSL2591.

    Right now SkyTemp and Sky Temp IR are reporting back 68F and not changing. Also LUX is 1000 and not changing.

    Is there a sensor i should target for replacement or further testing when you see these results?

    Thanks!
    Chad

     
  • brownrb

    brownrb - 2021-12-21

    It does matter what components you use. The pdf gives examples for each sensor.
    Some are critical as they may come with only 5v or only3v3
    In general you cannot connect a sensor 3v3 to a system running 5v.
    Some of the sensors like the oled display will run on 3V3 despite being rated as 5V
    What is really important about sensors is that the wires between the sensor and esp32 are correct.

    Never have power or usb cable connected to the esp32 when changing wires or pluggin in or removing sensors. Only ever make the changes when power if off and there is no usb cable connecting the esp32 to the computer.

    A lot of these sensors and chips can be easily damaged. You should observe reasonable handling conditions, for example, do not wear wool, try to use an anti-statuc bag to put comonents in when not being used, if you have a proper ground mat and wrist strap that is idel. Static electricty is easy to generate and will fry most chips with one zap.

    If you are onlky getting constant readings this represents an issue.
    the first thing to check is the wire connections. A lot of the I2C sensors will still be ok if SDA and SCL were swapped over. However, if VCC and GND wires were reversed, most sensors would be damaged.

    With sensors, it always pays to follow a good path, let me illustrate
    I have a PCB, I plug in the esp32. I program the firmeware, webserver enabled, i use a web browser and can get to the homepage.
    So I know the chip is good and I know the esp32 is runnign fine.
    I turn everything off

    Next, I want to test the display. So I connect that, After rechecking the connections I connect the usb calble and reprogram the esp32 this time I use the test program. i watch the serial monitor to see the text messages and it tells me the display was found, and I can see some messages on the display.

    Next. I want to test another sensor. I follow the same steps. Power off and disconnect cable. Connect sensor. Check wires. Connect usb and program controller with the test program for that sensor. Again watching the serial port monitor to see what is happening.

    And so on.
    Each time I verify the sensor is working, I make sure to take a quick snapshot of the wiring using my phone. That way I have a record of what is good.

    I prefer to test a sensor, verify it is working, and so on. Each time, I remove the sensor that was tested, and then connect the next sensor. That way I am only testing one sensor at a time, so I know it is not being affected by anything else.

    It is a matter of knocking a big problem down into a lot of smaller ones, Divide and conquer.

    A common mistake is trying to connect everything up, wires everywhere, and leap straight into the firmware, enable everything and then feel disappointed when it does not seem to want to go.

    Whilst the process I have outlined seems over the top and (i know what I am doing) it is a lot quicker to get the thing working. Work with what you know is good.

    I would expect to see things change when the environment changes
    The test programs loop around and display the values from the sensor.
    So while those are values are scrolling in the serial monitor window, I can make a change to the environment and see if the values change.

    As an example, the tsl lux sensor. I would expect that if I shielded the lux sensor from light by putting it into a paper bag I would expect the value to go down. If I used my phone to be a light source and shone the light over the sensor, I would expect the value to change - more light = higher reading, less light - lower reading.

    For the mlx sensor - it reads infra res - just so happens that the body is a good source of IR - so pointing it at my hand I should get a higher reading that if I pointed it away from my hand.

    Hope this helps
    R

     
  • molino

    molino - 2022-09-23

    Hey Robert,

    after having issues with MLX sensor, I decided to solder a new board with new components.
    The only sensor that is not found, it is the MLX one. I redid the cable, but still not working. I tried 2 other sensors and nothing still. Any advice about it?

    Thanks
    Miguel

    EDIT: Disregard, for some unknown reason, it started to detect the sensor

     

    Last edit: molino 2022-09-23
  • brownrb

    brownrb - 2022-09-28

    Have you tried running the test programs
    test_mlx90614-1
    test_mlx90614-2

    my test strategy would go like this

    Download firmware 130

    1. Attach only the MLX sensor
    2. Run i2c_scanner (in the tests folder)
    3. Watch the ouput on the serial monitor (115200 spd)
    4. Is the sensor found?
    5. Press the reset button on the ESP32 to reboot the controller, again look for whether the sensor is found
    6. Not found - you need to check connections.
    7. Perhaps SDA and SCL are swapped over? SDA to SDA and SCL to SCL. Use a magnifier to check because the wriring is very small text on the PCB and on the MLX module
    8. Are you using the correct header on the board? J7
    9. Never connect/disconnect modules etc when power in on, easy way to damage sensors.

    Unless you get past that nothing is going to work. If I2C_scanner cant find it then neither of the test programs will and neither will the firmware.

    Found -
    Proceed wih the test programs
    If the I2C_Scanner, test programs can find it then so can the firmware.
    Install the firmware, reprogram the controller and upload the data sketch files

    Regards
    Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.