An IR temperature sensor that doesn't suck

Something I really want to do with my wearable computer project is add an IR thermometer for detecting overheating electronics, seeing whether it's safe to touch something, etc. All I can find is this thing, which is both way outside my budget and requires me to build an external breakout, as I want to have it on the back of my hand instead of the main PCBs.

Does ANYONE have a recommendation for an IR module that's on a breakout board and isn't over about $7.

EDIT - More ideas of crap to put on this thing are also appreciated, as I drained my creativity a while ago.

1 Like

I bought one of these GY-906 MLX90614 modules and it works great.

I built it into a small non-contact thermometer using a stand alone mega328 and Nokia 5110 LCD screen powered with a 600mAh LIPO battery. Very accurate as far as I can tell.

Be aware that they are 3.3V devices so will need 3.3V power and level shifters if used with a 5V Arduino.

That's a huge problem for this design. I can't fit a level shifter.

EDIT - What I'm understanding from this is that Sparkfun is super overpriced. I mean, I already knew that, but every time I go to buy something, it becomes more apparent.

1 Like

That was just to illustrate what I was talking about. I build my own from 4 10K resistors and 2 2N7000 N MOSFETs. I should have just posted this:

Of course you can make it much smaller using surface mount parts.

Seems like a good idea, but I would screw this up immediately. I'm not on the level to be working with anything that's not on a breakout board.

I'm going to download these schematics anyways in case I want one of these in a future project.

Ebay has similar module for cheaper.

You have to consider that Sparkfun and some of the other reputable suppliers have tutorials, code and wiring for their products.
Also they also have better inspection and quality control.
You have to pay people to do all of these things.
You get what you pay for.
A lot of people order multable items when purchasing from AliExpress and E-Bay.
Nothing worse than waiting a month for a component and finding that it is a paper weight.

1 Like

Unfortunately PCBs aren't heavy enough for that.

I only use Aliexpress/Ebay for super basic parts like rotary encoders. I wouldn't trust them for a super complex part or anything safety oriented.

Melexis seem to provide some pretty good datasheets. They probably actually make these sensors.
https://www.melexis.com/en/products/temperature-sensors
Anyhow.

It's not difficult to plug these modules directly onto a breadboard, if that's what you do, given that there are only 4 pins. If you are designing a custom PCB anyway, it's better because it can avoid weird things sticking out.
If you are not doing any of those (e.g., hot-gluing components in a case), then you probably won't want to care. The sensor by itself is much cheaper, though.

Maybe you can run the entire thing off 3v3?

I suggest running the entire thing over 3v3. However, most Arduino boards runs on 5V (include Uno and Leonardo), and while they do have 3v3 pins their digital pins are 5V. which might fry the sensor.

You can run the entire board off a 3v3 converter when USB is not connected, but when it is the board will be powered with the 5V instead. If you don't mind unplugging stuff while programming the Arduino, you can run a 5V on 3v3.

Alternatively, you can mod the Arduino so it does not take voltage from the USB port (by cutting traces or removing the fuse). But it's a bit intrusive and I don't think you will like it.

And the sensors do not come with a 5V variant, either. You will either use one of the expensive Arduinos (e.g. Due, Zero) that actually runs on 3v3, or use a level shifter.

https://www.amazon.com/KeeYees-Channels-Converter-Bi-Directional-Shifter/dp/B07LG646VS/

Something like this.
EXCEPT I do not believe it is actually bi-directional. Which is why I went to TI's website and found you those. Why? Because you not only need to be able to step down the 5V to 3v3, but you also need to step up 3v3 to 5V. If you are not using an open drain protocol (e.g., SPI, which is push-pull), you need true bi-directional converters.

Which is why for I2C, which is open drain (the devices will always draw current from the source, the controller), the one above will work fine. But remember it is actually directional.
1-bit true bi-directional logic converter:

This is SOT23, which is decently sized and can actually be done by hand. Unlike the TSSOPs that are not really workable.
So you will likely need a breakout board for this wonderful chip. Except you don't! Because nobody uses 1-bit shifters. Every cool kid uses 8-bit bi-directional logic shifters.

And now we're back to the issue of level shifters taking too much space.

well, you kinda have to.
But the txs0101 is pretty small if you have your custom PCB.
Plus, if you are trying to squeeze absolute everything onto the tiniest package, I would assume you would be drawing up your own PCB (which avoids modules and saves load of space while eliminating wires). If you are not using a PCB but a breadboard, well, I see no point in the argument "im running out of space". Because the breadboard is absolute mammoth.
If you are cramming everything into a small plastic box and just hot glue everything together, well, first, it's going to be total chaos inside and while it's good that nobody sees it does not mean it's a good thing. Second, if he insists on getting a module, he probably has physical space for level shifters anyway.

Because the hard fact is that you can't get these modules with the "stuff" on the back. Well, without paying like $25 in shipping.


Unless you do, of course. In which case, great!
Except you realize that all the "stuff" does is regulate the VCC to 3v3 and not actually offering any protection on the I2C lines. Yes, the I2C is pulled-up using resistors so it might not actually fry the sensor but it might decreases the lifespan greatly.
I haven't used a 3v3 only sensor yet. The only sensors I have used is a 5V compatible and a 5V dedicated (SHT30 and SPS30)

1 Like

I'm mounting modules on top of a PCB because I don't trust myself to solder SMD parts with an iron, or even get the schematic right.

The module is not going on the PCB, it's being broken out by wires and mounted elsewhere.

EDIT - I'm already going to have to solder like 20 SMD resistors, I don't want to add any more than necessary.

EDIT - On the first point, The PCBs are already crammed full of traces. I can't add anything else on any of the three boards. Except maybe one. But it would still be a squeeze. This is why engineering is so hard. Adding another pair of layers would increase my costs exponentially.

EDIT - I know JLCPCB has SMD assembly but I feel like I'll mess it up. It's probably worth mentioning that I've already ordered two custom PCBs for another project and neither worked, so I don't have very high confidence for complex boards.

1 Like

Can you share a shot?

I wonder what you are actually doing with those. Why do you need 20 resistors? for LEDs?
In that case, you can be using resistor arrays, which also happen to have thru-hole variants. They have multiple legs like a chip so you can have an easier time soldering.

I can't believe how anyone would solder SMT resistors by hand. Although, I guess you can use tape to hold them, which helps

It's on a Linux desktop that I don't have access to now. Maybe another time?

Analog multiplexing, transistor work, some LEDs, offsetting analog inputs, etc.

I am using 2012 resistors which are fairly gigantic. I have ESD tweezers.

1 Like

You could use things like a I2C/SPI ADC which perhaps is also more accurate.

Hm.
I won't do that in hardware. Maybe because I never thought of it, but the idea of turning a variable resistor to calibrate ThumbPointers (gamepad joysticks) sounds just weird.

I think you will be even better off mounting thru-hole resistors vertically. They are indeed very large.
2mm in length is literally only 0.5mm shorter than a standard 2.54mm (1/16 inch) thru-hole grid. And you won't need 2.54mm if your thru-hole resistors are small.
Maybe if you used smaller resistors (remember crying in despair due to accidentally destroying 3 boards and spending 2 hours trying to solder 0603 resistor arrays) wink wink you could have more boardroom.
2012 is 2mm * 1.2mm so I would assume 0603 is 0.3mm * 0.6mm but that seems wrong. It's more like 6mm * 3mm, but instead you have 4 resistors packed together (and resulting in a pin pitch basically that of tssop, but significantly tighter because resistors are small)
Or why not just make the board bigger?

I can wait.

Again, not enough space.

Too much risk of bending. Remember, this goes on my arm.

My arm is only so big.

I'm using analog hall sensors which read larger or smaller depending on which pole of the magnet is closest. I plan to digital read the sensors to get an input, and bias them to one side so they only activate beyond a certain threshold. It's very unorthodox, but why not?

1 Like

Because I burn myself a lot. A hot soldering iron looks a lot like a cold one, so being able to hold up my arm and tell if I can touch something would be invaluable.

EDIT - I can also tell if someone has COVID just by raising a hand.

You do know that these cheap sensor only do -40 to +85 (celcius), right?
Assume they can measure the fact that an object is above 85 degrees accurately (e.g. reporting that they are -32 when they are actually +245 degrees), sure. this will be helpful.

This actually sound like a pretty cool project.

That's quite far a stretch but nevertheless I can think why something like this will be handy.

Wait what? Hmmm...

A while back I thought about using a thermocouple on my finger for this exact task but I would still have to touch the object. Also, thermocouples are expensive, and assuming I could insulate myself enough, there's a point where the solder in the 'couple would start to fail.

EDIT - Being able to tell if something is >85C is still helpful because you probably still don't want to touch that...

It's very cyberpunk. There's even a status light that runs down a fiber optic cable.

EDIT - Anyways, so what I'm understanding is that this is a fool's errand if one wants to measure high temperatures. I'll just not add this module.

Have any other cool suggestions? I've got a SPI bus open on the auxiliary MCU.

If you think this project is cool, here's the documentation. If you want to build one, you can, once I have the code/STLs/gerbers on GitHub. It'll happen, though it might take until March or April. My family and I are moving in like January which kind of messes things up...

Yes I wrote the documentation before doing the project. It's like following a how-to guide!

EDIT - Documentation removed as it is now very outdated.

1 Like


Goes under my arm, contains supporting electronics.

Goes on my wrist, contains supporting electronics.

Goes on top of my arm, contains a keypad and some other things.

Ground planes removed for clarity.