4 ms·
Show HN: IR stove thermometer, firmware in Rust
- the__alchemist 5y agoActual link: https://www.anyleaf.org/stove-thermometer https://www.anyleaf.org/stove-thermometer HN truncates my links to the top URL 30s after posting. Just released this IR stove thermometer. Uses 2 nRF52 chips, with the ESB protocol. Programmed in Rust. Source code for the sensor module is here: https://github.com/David-OConnor/nrf-hal/tree/main/examples/temperature_transmitter https://github.com/David-OConnor/nrf-hal/tree/main/examples/... Let me know if you have any questions on how it's done. Of note, it seems like most people wouldn't have a use for something like this, since they care about internal food temp, or test surface temp by seeing how water or food reacts. I used a handheld thermometer, but wanted something hands-free and more accurate.
- ozfive 5y agoOh boy I can see these guys are on a positive trajectory. These tools are useful across a broad spectrum of applications. One of the things I would suggest is build APIs for them and people on HN will eat them up!
- the__alchemist 5y agoThat's a great idea. Might be a way for tech-savvy people to custom-tune the behavior.
- z2 5y agoMaybe an edge case, but ever since I've had people forgetting to turn off my stove, I've wished there was something like this that could trigger an alarm on either temperature or timer (say, heat detected on stove for over 2 hours). A peizo beeper could make a great addition!
- exhilaration 5y agoYou should consider getting this product https://www.amazon.com/gp/product/B0863BFNWB/ref=pe_386300_440135490_pd_te_o_rp_ti/142-4381735-4245728 https://www.amazon.com/gp/product/B0863BFNWB/ref=pe_386300_4... The canisters magnetically attach to your range hood, if there's a fire they pop open and spray a fire suppressing powder all over your stove. Very low tech, they only need to be replaced every 6 years.
- mongol 5y agoI wonder what that powder is. My fire extinguisher uses a corrosive powder that is damaging to electronics especially. I think CO2 would be ideal from this point of view, but perhaps not efficient enough.
- molticrystal 5y agoI wonder if I could make a poor man's version by filling a very thin plastic container like the kind used for bottle water and fill it with baking soda and attach it up there. If the heat melts the plastic, the powder will be dispersed and any flames will cause it to decompose, releasing CO2, hopefully snuffing them out.
- the__alchemist 5y agoThis sounds outstanding, and probably quick to design / cheap to add to BOM. Will try to get it in an upcoming revision. A simple solution may be to trigger it if the temperature gets very hot - ie the sort of temp above what you'd use for normal cooking, but could happen if the skillet is left unattended. Might be able to come up with something more sophisticated too. Eg above a certain temp for an extended time.
- hagbard_c 5y agoJust install a 2-hour wall timer between the mains and the stove. Trigger the timer before cooking, it will cut the power to the stove after 2 hours (whether it is on or not). These timers are quite common in communal kitchens, e.g. in hostels. There are plug-in versions for devices like water boilers or clothes irons. No high-tech needed, always works. If you're broiling a mega-turkey you might want to restart the timer before it runs out, otherwise you won't notice it is there.
- azdle 5y agoIt's rewriting the URL because you have a `<link rel="canonical" href="https://www.anyleaf.org https://www.anyleaf.org">` on the page.
- the__alchemist 5y agoThank you! Fixed.
- tootie 5y agoSo weird I just had this idea after leaving the house with a burner on. Instead of (or in addition to) cooking accuracy I'd love a big warning light to know something in my kitchen is hot.
- lambda 5y ago> Actual link: https://www.anyleaf.org/stove-thermometer https://www.anyleaf.org/stove-thermometer HN truncates my links to the top URL 30s after posting. This is probably because you have the following in your HTML: <link rel="canonical" href="https://www.anyleaf.org"> This is used to tell search engines and other sites that the page in question contains the same content as the page in the "canonical" link; so they should prefer to show the canonical version over the other one. I'm guessing HN also uses this for a single reason. You shouldn't have canonical link relations to pages which are meaningfully different. Edit: ah, I see that someone else pointed this out and you've fixed it already.
- jkelleyrtp 5y agoWhy your own HAL crate? What’s different between yours and the original nRF HAL?
- the__alchemist 5y agoThe `nrf-rs` HAL is quite good, but there are a few differences in my fork: - Replaced GPIO module with one with a cleaner API. Adjusted other modules to reflect this. - Replaced timer module; original was a thin wrap of the PAC - Tweaks to the RTC API to make it easier to set the timeout. - Overall, brought the API to parity with the STM32 HAL I wrote. This makes code more portable between projects for me. - Support for nRF-53 There were enough opinionated API changes that it would never get merged upstream in a PR.
- jkelleyrtp 5y agoThat’s awesome! Your embedded rust is very good, that’s probably some of the cleanest embedded code I’ve ever seen. Awesome that you had time to tweak the HAL and ship your product. Makes me want to update a few embedded interfaces with better APIs.
- bajsejohannes 5y agoNeat. I've been thinking that such a product should exist. Are you sampling just a single point for temperature or do you get the maximum value of a bunch of IR-pixels? Also, with your first dollars earned, I would hire a photographer for better product pictures :)
- the__alchemist 5y agoSingle point. The sensor averages the temperature of everything in a 10° FOV, which should be suitable to get an average pan temperature. I think you could do something more clever with an IR camera like you suggest, by identifying the edge the pan, and giving more info like the temp gradient, perhaps displayed as 2 temps. Ie, "edge temp", and "center temp".
- Tade0 5y agoI have a non-food related use for this, namely: "Is my LED cooking already?" I've found that most lamps and light fixtures are still designed with incandescent bulbs in mind, so there's often not a lot of space left inside, and thus too powerful of a LED is going to cook itself eventually.
- exhilaration 5y ago"Assembled in Raleigh, NC, USA" if you're curious
- KennyBlanken 5y agoIt doesn't take long at all to figure out how fast it takes pans to get up to temperature when you start cooking on a new stove. 90% of stovetop cooking doesn't require this level of precision Many cooking processes start with warming the pan up with something in it, and using the state of that material. Spices, onion, garlic are a few examples. Mirepoix is another example, cooked gently until you smell it, not based on temperature. There are also a multitude of tricks to telling how ready a pan is - the water droplet test, putting your hand near the pan surface, etc. It's a clever concept, but the sensor is going to get contaminated by smoke residue, grease, food splashes, etc pretty quickly. 3d printed cases are not appropriate for the kitchen because the rough, permeable surface is a breeding ground for bacteria and mold soon as it gets any food residue on it. The inset screen and buttons are also terrible for kitchen devices. Also, it's not worth anything close to $100. OP's claim that it is somehow more accurate than handheld temperature guns is quite silly, given how widely they're used in industrial applications where accuracy can be quite important. OP used a lot of expensive components (nRF chips, OLED display etc) and a case manufactured using slow prototyping equipment. That doesn't translate into value for the purchaser. Even if it does have a "more expensive sensor", which is certainly doesn't compared to any gun made by a reputable test equipment company - if you're not bothering with emissivity correction, the quality of the sensor is irrelevant.
- the__alchemist 5y agoAll great points! I think you've hit the key question of "Is this useful", plus a lot of valid concerns about wear+tear, the environment it's in etc. I'd love to get the price down. Getting the enclosures injection molded would be great, but need to validate if it's worth the upfront cost first. The main BOM driver is the sensor, due to needing one with narrow-FOV optics. I originally planned to use milled aluminum attached to the bottom of the sensor unit as a steam-shield, but the plastic has held up well after testing for a few months. There's an o-ring seal around the sensor, which should help. It's probably worth adding it to the base-unit buttons as well. You're also right on the sensor quality claim. It's likely not as good as that used on industrial test equipment - the comparison is to the cheaper consumer grade ones many people use.
- stathibus 5y agoImpressive what you can get to the top of HN just by saying it's written in Rust.
- exabyte 5y agoIs there anything special about Rust that distinguishes it from, say, c++?
- pshc 5y agoWhen you write Rust normally (without unsafe) you can mechanically verify it to be memory safe, whereas C++ is... well who knows really it's a 80s language, but if you follow <guidelines> maybe you're OK? Add any number of safe Rust commits? Still memory safe. Add any number of C++ commits? Who knows. Every change has to be checked.
- nyanpasu64 5y agoThis is true for the most part, as long as the safe Rust commits are not in the same module as unsafe code, and the unsafe code is built to prevent code in other modules from causing UB. See https://doc.rust-lang.org/nomicon/working-with-unsafe.html https://doc.rust-lang.org/nomicon/working-with-unsafe.html.
- pshc 5y agoThis is true if you have unsafe in your code, but I’m talking about Rust codebases with no unsafe blocks. (Which really any normal Rust app should adhere to, exactly for this sort of reason.)
- pkage 5y agoProper algebraic typing, a package manager (that's actually quite good), guaranteed memory safety, good LSP support, good performance, a not-nightmarish grammar... the list goes on and on. It's worth giving it a shot, honestly.
- shomyo 5y agocabal
- DerSaidin 5y agoNext level: Close the loop, integrate into the electric stove control, add up/down buttons on the display.
- klysm 5y agoI think there’s a lot of opportunity around closed loop control in cooking that isn’t being done right now
- fy20 5y agoI wonder if a stove measuring the temperature on the bottom of pan would be accurate enough. For gas I guess it wouldn't work, but for induction where the pan is heated internally, it should work as long as the temperature between the bottom and surface of the pan do not have too much of a delta.
- semp 5y agoAll high-end Siemens induction stoves already have such closed-loop sensor, called fryingSensor Plus. It makes an audible alert when oil has reached the desired temperature, and then keeps that temperature.
- DerSaidin 5y agoMore Rust relevant link: https://www.anyleaf.org/blog/writing-embedded-firmware-using-rust https://www.anyleaf.org/blog/writing-embedded-firmware-using...
- snickmy 5y agothank you for the pointer. I was actually looking into this. Was wondering if rust gets transpiled to C, or just compiled into assembly. I was also curious what MCU architecture supports this and was very happy to see ESP32 is getting supported soon. I'm not sure (honestly I don't understand the space well enough) how IDF, the OS for esp32, gets incorporated with a Rust program. I'd love to also hear more from OP the business side of this venture. OP if you can read me, I'd love to talk!
- paavohtl 5y agoRust is normally always compiled directly to Assembly using LLVM. The only exception is mrustc [0], which is only intended to be used for bootstrapping a Rust compiler with a C++ compiler. It produces "very ugly C". [0] https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc
- rmahan 5y agoWhat plastic did you use to 3D print it? Any worries about steam or other heat softening it over time?
- the__alchemist 5y agoPLA. Initially used ABS due to the higher temperature tolerances, but remarkably, PLA worked better in practice. Perhaps due to a cleaner, more even print. (Using a Raise3D E2 filament printer) As mentioned earlier, had originally planned on an aluminum plate on the bottom to deal with warping from steam, but hasn't been a problem since switching to PLA.
- superduperycomb 5y agoWhat are some resources you’d recommend for me to understand this level of firmware development better? I’d love to understand it a bit deeper than a quick code review