[HN Gopher] General purpose MCUs built in to LEDs emulate candle...
       ___________________________________________________________________
        
       General purpose MCUs built in to LEDs emulate candle flicker
        
       Author : pontifk8r
       Score  : 87 points
       Date   : 2024-01-28 19:38 UTC (3 hours ago)
        
 (HTM) web link (cpldcpu.wordpress.com)
 (TXT) w3m dump (cpldcpu.wordpress.com)
        
       | 082349872349872 wrote:
       | Once upon a time, on USENET, someone had a .sig that predicted
       | one day computers would be cheap enough they'd come in cereal
       | boxes and we'd throw them away.
       | 
       | That day appears to have arrived.
        
         | FirmwareBurner wrote:
         | That happened way before. RFID cards for disposable public
         | transportation tickets or those music greeting cards.
        
           | mikepurvis wrote:
           | At a certain point it's more about the semantics of what a
           | "computer" is. I don't know if I'd count an ASIC from a
           | musical greeting card, though; and even within general
           | purpose devices, microcontrollers vs microprocessors are
           | typically delineated by the presence of an MMU.
        
             | kragen wrote:
             | the 6502, 8080, z80, 8085, 8086, 65816, 68000, and 68010
             | were universally described as microprocessors, not
             | microcontrollers, but did not have mmus built in (and of
             | these only the 68010 could easily have one bolted on, as i
             | understand it)
             | 
             | i think typically the thing that distinguished these from
             | microcontrollers like the 8031, 8051, 8748, 8751, pic1650,
             | etc., is that the microcontrollers had program memory built
             | into them, either rom, eprom, or, starting in the 90s,
             | flash. so they didn't need to be booted, they didn't need
             | program ram, and in fact for a lot of applications they
             | didn't need any external ram at all
        
             | wongarsu wrote:
             | If I can program it to execute a sequence of arithmetic and
             | logical operations that approximate a Turing machine (with
             | a finite band), and reprogram it at a later date to execute
             | a different sequence of such operations, that's a computer
             | to me. I wouldn't count ASICs, but the PIC12F508 or the
             | 3-cent microcontroller referenced in the post definitely
             | count.
             | 
             | Though by my definition of requiring reprogrammability and
             | Turing completeness I am purposefully excluding many things
             | that have historically been considered computers, like the
             | many mechanical computers of the 19th and 20th century.
             | From that standpoint I can see how some people might count
             | ASICs as computers, even if I don't think that fits modern
             | usage.
        
         | yau8edq12i wrote:
         | The worst offenders right now might be disposable vapes. I saw
         | some sold with effing lcd screens built-in. For a disposable
         | piece of crap.
        
           | Scoundreller wrote:
           | The rechargeable lithium batteries in those really doesn't
           | fit the "lithium shortage" and "we don't have enough battery
           | capacity to build an EV for everyone" narrative
        
             | jdsully wrote:
             | One car has 4,500 cells - bigger cells than most of the
             | vapes. So it really is a matter of scale.
        
               | exe34 wrote:
               | How many cars does one smoke in a year though?
        
               | aftbit wrote:
               | Hopefully zero! Still, if you replace your car (or its
               | battery) every 10 years (pretty long IMO) and smoke one
               | vape a day (yikes), you'll use more cells on your car
               | than your vapes.
        
               | worewood wrote:
               | Do not give those guys ideas
        
               | lmm wrote:
               | The kind of people who can afford to buy EVs buy a new
               | car what, every 3 years? So I guess about 1/3 of a car
               | (or, using the numbers from another comment, about 4000
               | vapes' worth).
        
             | markstos wrote:
             | It does if the vape makers have an underpriced lithium
             | source and don't care about the pending lithium shortage.
        
               | Scoundreller wrote:
               | they're just buying off-the-shelf cylindrical or flat-
               | pack li-ion cells
        
             | tomatotomato37 wrote:
             | The lithium in those cheap disposable things are less
             | "lithium" and more "metallic powder/paste that
             | theoretically contains elements of lithium." It's not
             | something you'd want to actually use in anything important
             | like a car battery
        
               | jdietrich wrote:
               | Not true. "Disposable" vapes use commodity li-ion cells,
               | of the same basic type that you'd find in a cellphone, a
               | laptop or an EV. They probably aren't the best quality,
               | but there's nothing unusual about the chemistry or
               | packaging. Li-ion cells are the preferred chemistry
               | because of the very high discharge rate - alkaline or
               | primary lithium cells just can't deliver enough current.
               | The cell is perfectly capable of being recharged, but
               | some people prefer the convenience of a disposable device
               | and manufacturers are quite happy to respond to that
               | demand.
               | 
               | It's wasteful, I don't particularly approve of it, I
               | expect to see a lot of jurisdiction ban disposable vapes,
               | but nor do I think it's particularly egregious or
               | meaningfully impacting on the commodity price of lithium
               | carbonate.
               | 
               | https://hackaday.com/2022/05/05/2022-hackaday-prize-
               | disposab...
        
             | conradev wrote:
             | It actually fits the narrative pretty well
             | 
             | The materials for one EV battery can make ~30 e-bikes, and
             | currently EVs are too expensive for most people.
             | 
             | The way to fix that and the way that industry is fixing it
             | is to make batteries more efficient (higher-density, new
             | anodes/cathodes) in parallel with making a bunch more of
             | them (and mining more lithium).
             | 
             | If we succeed in making a $25k EV, the batteries used in
             | those vapes will be _even cheaper_.
             | 
             | I don't think it's desirable and I find the waste
             | appalling, but I do think that disposable batteries can
             | only be expected to grow without intervention.
        
             | jdietrich wrote:
             | It takes around 850g of lithium carbonate to produce one
             | kWh of lithium batteries. The current market price for
             | lithium carbonate is about $14/kg. The base spec Tesla
             | Model 3 has a 57.5kWh battery pack, so the lithium in the
             | pack represents a cost of ~$685, or just under 2% of the
             | list price of the vehicle.
             | 
             | A typical disposable vape contains about five cents worth
             | of lithium.
             | 
             | https://www.irena.org/-/media/Files/IRENA/Agency/Technical-
             | P...
        
           | graphe wrote:
           | I've collected a few of them and they are robust and
           | rechargable batteries. A common battery is IP17350 1100mAh
           | 4.07Wh (Date of manufacture the one I see on the one I'm
           | holding is 20210613). Anyone got any idea to use them besides
           | small flashlights? They also have a pressure sensor on the
           | LED and a nice metal case pretty often.
        
           | FirmwareBurner wrote:
           | I'm waiting for the EU to ban these fucking things already.
           | That and disposable power banks. Yes, you read that right.
           | 
           | Selling consumer devices with Li-Ion batteries that are
           | designed to not be rechargeable, should be banned altogether.
        
             | rcxdude wrote:
             | Interesting thing about li-ion batteries, is they have much
             | less lithium in them than disposable lithium coin cell
             | batteries, and hold much more charge. If we're outlawing
             | disposable li-ions we should outlaw those as well.
        
               | FirmwareBurner wrote:
               | _> If we're outlawing disposable li-ions we should outlaw
               | those as well._
               | 
               | Except when your watch battery dies, you only dispose of
               | the battery, not together with the watch, as is the case
               | with those single-use vapes.
        
             | quatrefoil wrote:
             | We're OK with disposable alkaline batteries, so what makes
             | lithium worse? If anything, alkaline batteries might have a
             | slightly worse environmental footprint due to the use of
             | manganese.
             | 
             | The problem with lithium batteries is that they can catch
             | on fire, but that's a problem only when charged (or
             | charging). A fully discharged battery shouldn't do much.
        
               | mschuster91 wrote:
               | > We're OK with disposable alkaline batteries, so what
               | makes lithium worse?
               | 
               | No we're not. Disposable batteries should not be a thing
               | anywhere, especially not in products where they cannot
               | easily be removed by design. Alkaline batteries may not
               | combust when damaged, but their internal juice leaking
               | out is damn corrosive.
               | 
               | > A fully discharged battery shouldn't do much.
               | 
               | Even that is enough to light trash compactor trucks or
               | the heaps on waste collection plants to fire. This shit
               | is becoming a massive problem for the trash hauler and
               | processing industry. One in Australia blames 35 (!) fires
               | a day in the country... no surprise if 1.8 million of
               | them are sold a week [1]. This is frankly _insane_ , and
               | the rise in trash fires directly corresponds with
               | disposable vapes.
               | 
               | Additionally, we need every bit of lithium we can get for
               | electric vehicles and other stuff. Not for throwaway
               | devices.
               | 
               | [1] https://www.abc.net.au/news/2023-12-02/qld-lithium-
               | ion-batte...
        
         | pi-rat wrote:
         | There's been generic microcontrollers (usually single shot
         | programmable) available for less than 3 cent per mcu for half a
         | decade already. Check out Padauk and similar MCUs.
        
         | self wrote:
         | I searched Google for this recently and could not find it. I
         | tried it again on Google Groups just now and found one
         | reference to it:
         | 
         | https://groups.google.com/g/comp.arch/c/Y4C_Zjkb9VM/m/scDk_0...
         | 
         | > Killer micros of today are a lot like flourescent lights --
         | cheap to operate, prevalent, and expensive to turn off. To see
         | a machine standing idle, when you were raised as a child to
         | "use cycles efficiently" is a gut-wrenching experience. Just
         | remember Alan Kay's prediction: In the future, computers will
         | come in cereal boxes and we will throw them away.
         | 
         | March 20, 1990. I haven't found a source for Alan Kay's
         | prediction.
        
         | dragontamer wrote:
         | At least a decade ago, a major magazine had a disposable chip
         | inside for... I don't remember why.
         | 
         | Does anyone remember this?
        
       | sam_bristow wrote:
       | It might be a myth, but I seem to remember the ASICs used to
       | flicker older LED designs were often repurposed from audio
       | greeting cards. The light was actually just Happy Birthday
       | playing through an LED or bulb rather than a speaker.
        
         | userbinator wrote:
         | Not a myth. I clearly remember watching a YouTube video where
         | this was discovered, only a few years ago, but of course the
         | uselessness of search engines these days has made it impossible
         | to find now.
        
           | marginalia_nu wrote:
           | Yeah I think I saw that too, bigclive maybe?
        
           | mrb wrote:
           | Here is a 2011 post of someone who discovered that:
           | https://www.halloweenforum.com/threads/interesting-fact-
           | abou...
           | 
           | And here is someone who recorded audio samples:
           | https://www.instructables.com/How-to-Listen-to-Light/
        
       | dmitrygr wrote:
       | I hope there is a follow up where the LED is ground down and a
       | PICKIT2 is used to read out the code :)
        
       | linker3000 wrote:
       | If you want to see some candle flicker code based on a PIC12F508
       | or 9 see below.
       | 
       | The flicker effect is based on a linear feedback shift register
       | function to provide a pseudo random effect.
       | 
       | https://github.com/linker3000/CandleFlameSim
        
         | huppeldepup wrote:
         | Going to drop this here:
         | 
         | "Reverse engineering" a real candle
         | 
         | https://cpldcpu.wordpress.com/2016/01/05/reverse-engineering...
        
           | cmiller1 wrote:
           | This is great, I wish I could find off the shelf LED candles
           | that more closely approximate the real thing. I'd also like
           | them to be taper candles on a little holder with a loop
           | finger hole so I can grab it to investigate noises in the
           | night.
        
       | userbinator wrote:
       | _that probably cost around a cent per die_
       | 
       | I believe it's more like a tenth or hundredth of that, if you're
       | talking about USD.
        
       | marssaxman wrote:
       | Seems like a small step up from the ubiquitous WS2812, an LED
       | with an onboard controller handling PWM and one-wire
       | communication.
       | 
       | Years ago, before animated LED christmas lights were readily
       | available, I hand-made such a string out of ATtiny85 controllers,
       | soldered onto bicolor red/green LEDs, one controller per light. A
       | little bit of C and an evolving animation algorithm recycled from
       | a previous project yielded a pleasing quasi-rhythmic effect. It
       | was absurdly non-economical, but felt like a glimpse of the
       | future.
        
       | ThisIsMyAltAcct wrote:
       | Some people say software is eating the world but I prefer to say
       | its infesting it.
        
         | dist-epoch wrote:
         | DNA is software. The world is already full of software. We're
         | just catching up.
        
       | kebman wrote:
       | I really hate these fake LED candles with a passion. Either put
       | an actual candle on the table, or just put a small cosy light
       | that doesn't flicker.
        
         | bxparks wrote:
         | I like quite them. With LED candles, there's no danger of fires
         | if you forget about the candle, or if you accidentally knocking
         | them over, or if something accidentally goes over the candle.
         | There is no mess to clean up as the candle melts down the wax.
         | There is no worry about wind blowing out the candle.
         | 
         | I don't like those small LED candles using disposable
         | watch/button batteries. I use ones using standard AA batteries,
         | which means I can use NiMH rechargeables.
        
         | graphe wrote:
         | Why? Ive known several people that died from candles including
         | the actions of other people's usage of candles.
        
           | Hnrobert42 wrote:
           | Not to mention that whenever I light a candle, my air filter
           | spins up and my air quality monitor says pm2.5 peaks.
        
       | cushychicken wrote:
       | Is the actual make and model of the MCU just a guess?
       | 
       | Doesn't seem to be anything to corroborate the PIC12 besides a
       | pinout the author has seen before.
       | 
       | Just mention because there are likely a zillion eight pin MCUs
       | with this pinout/ballout pattern.
        
       | rgovostes wrote:
       | Semi-relatedly, the best "digital candle" app I ever found was
       | one that just drew an orange rectangle in the center of an
       | otherwise black screen, and animated its scale randomly. This
       | convincingly modulates the brightness of the display.
        
       | cperciva wrote:
       | Next up: "Porting Doom to run on an LED candle".
        
         | semi-extrinsic wrote:
         | FWIW Doom was ported to the Ikea GU10 lightbulb a couple of
         | years ago.
         | 
         | Unfortunately the original post and code all got taken down due
         | to copyright claims, but archive has a copy:
         | 
         | https://web.archive.org/web/20210615035229/https://next-hack...
        
       | graphe wrote:
       | If you'd like to see this and more in software for flashlights
       | please visit toykeeper's projects!
       | 
       | https://github.com/ToyKeeper/anduril
       | 
       | https://toykeeper.net/
       | 
       | I loved this feature on my flashlight and used it exclusively on
       | candle mode. There's a lot of thought that goes into it like PWM
       | speed or direct drive for LEDs that may or may not cause
       | flickering and a tradeoff between battery life and the
       | electronics available.
        
         | NikkiA wrote:
         | I'd rather they didn't, I recently upgraded our household
         | flashlights and was pleased to be able to get 3-mode rather
         | than the ridiculous 5 and 7 mode that they were replacing, no
         | more having to loop through 'SOS' and several ridiculous flash
         | patterns, a half-dozen brightness settings and so on to get to
         | the 'full brightness, no flashing' setting that was needed 100%
         | of the time.
        
       | danbruc wrote:
       | Wait till you have to wait for your candle to boot an off the
       | shelf Linux and download security updates before it starts
       | flickering.
        
       | queuebert wrote:
       | I would have assumed that nowadays using a small neural net to
       | approximate a CFD model of a flame would be the easiest.
        
       | dgsgsgegsgsdb wrote:
       | Hfjrjrjr
        
       | exmadscientist wrote:
       | > Is it possible to improve on this candle-LED implementation? It
       | seems so, but this may be for another project.
       | 
       | Hey, I got paid to do this a few years back! Here's the result:
       | https://evietealight.com/
       | 
       | They're the sort of thing it's not really possible to show off in
       | a photo or even video. What really gets you (or at least gets me)
       | is seeing these things out of the corner of your eye, flickering,
       | just like flames flicker....
       | 
       | This was a pretty uncertain research project. We didn't know if
       | we'd be able to make really convincing flameless flames. The day
       | I knew we'd got it was the day I brought a prototype home to tune
       | and A/B test against a real candle. I went upstairs to put the
       | kid to bed, then came downstairs and panicked because I thought
       | I'd left the real candle burning. I hadn't! I got fooled by my
       | own product. It was all downhill from there.
       | 
       | These guys are patented (somehow... the language is pretty
       | impenetrable, and it's my own patent...) so I don't mind sharing
       | a little of how it's done: there's an array of LEDs plus
       | optically-active element, which shapes the light in a way that
       | makes it look good. Nothing about this is too complicated (the
       | optical surfaces aren't all that special, but are not trivial to
       | prototype in your garage, at least if you've never done optics
       | before), but there was a lot of R&D to settle in on what looks
       | "right", and the final product has a lot of "premium" touches
       | that really drove up the manufacturing cost. Hence the high final
       | cost -- they really do cost a lot to make.
       | 
       | But they look awesome!
       | 
       | (And thanks Tim for your original article -- I definitely
       | remember reading it during the early research phase!)
        
       ___________________________________________________________________
       (page generated 2024-01-28 23:00 UTC)