Live data from Hacker News

General purpose MCUs built in to LEDs emulate candle flicker

cpldcpu.wordpress.com

61–70 of 191 posts

Re: General purpose MCUs built in to LEDs emulate candle flicker

#61
post #45
post #32

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 availabl…

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.

Those are the bad ones. If you get this one the only mode you'd get is a ramping effect by holding the button to make it go brighter or lower.

Re: General purpose MCUs built in to LEDs emulate candle flicker

#62

> 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 fl…

[deleted]

Re: General purpose MCUs built in to LEDs emulate candle flicker

#63
I love it. I have noted this article for my talk about how CPUs are free. To appreciate that, you have to understand that when the first microcomputers came out engineers were still in "compute" mode[1], we were lectured that you wouldn't use a hard coded loop to check for a switch closure, you had to use interrupts because otherwise you were wasting all those CPU clocks. And computing at the time was often billed in weird units like "kilocoreseconds" (which is the number of seconds * the number of 1024 word pages of core (RAM)) that were consumed when your program ran.

The logical extreme end of Moore's law was that you could put a CPU into a very, very small amount of silicon and that meant they were essentially free. (Chips cost by die area & layers). Another article like this is Bunnie Huang's discussion of the ARM CPU in flash chips[2].

There have always been jokes that it is cheaper/easier to use an 8 pin uController than it is to use a 555 timer, and the argument has often come down to the current and voltage ranges that a 555 can work under are different, but at some point I expect to finally see the "blending" of analog/digital chips that allow for a wide range of voltages (on board switching PMIC), and analog pins that have few if any compromises for being either digital or analog.

[1] The Chip Letter -- https://thechipletter.substack.com/p/tiny-computers-from-tex...

[2] On Hacking MicroSD Cards -- https://www.bunniestudios.com/blog/?p=3554

Re: General purpose MCUs built in to LEDs emulate candle flicker

#64
post #19
post #14

Earlier quoted context omitted.

One car has 4,500 cells - bigger cells than most of the vapes. So it really is a matter of scale.

How many cars does one smoke in a year though?

I thought a Tesla smoked them all..

I'll show myself out!

Re: General purpose MCUs built in to LEDs emulate candle flicker

#65

Earlier quoted context omitted.

It does if the vape makers have an underpriced lithium source and don’t care about the pending lithium shortage.

they're just buying off-the-shelf cylindrical or flat-pack li-ion cells

A popular theory is that they use "QC reject" grade, as the batteries often have arount 800 mAh capacity, two times less than most basic commercial grade.

Re: General purpose MCUs built in to LEDs emulate candle flicker

#66
post #11

Earlier quoted context omitted.

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.

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…

I believe 68000 could use an MMU, but the catch was that it couldn't do demand paging, just memory protection and virtual/physical translation. I can't find the specific explanation right now, but it's something along the lines of the bus error exception (needed to actually stop the memory cycle) being special in a way that sometimes causes an incorrect PC value to be pushed to the stack. So you could terminate a process on an MMU exception, but resuming it was not reliable.

Re: General purpose MCUs built in to LEDs emulate candle flicker

#67

Earlier quoted context omitted.

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.

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 Tur…

These RISC-V chips are on the order of .02 to .10 (qty 1)

https://www.wch-ic.com/products/CH32V003.html

The PIC12 has 25 bytes! of sram. The CH32V003 has 2k.

https://www.aliexpress.us/w/wholesale-CH32V003.html?spm=a2g0...

Re: General purpose MCUs built in to LEDs emulate candle flicker

#68

> 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 fl…

Still rather odd not to have a video on the page of a product where animation is the key selling point.

Maybe a video wouldn’t convey all the benefits of the design, but lack of video does not inspire confidence either.

Re: General purpose MCUs built in to LEDs emulate candle flicker

#70
post #5

I hope there is a follow up where the LED is ground down and a PICKIT2 is used to read out the code :)

I don't buy the PIC chip theory since that means it's either programmed in-situ which seems imposible, or they're ordered with premasked or preprogrammed ROM which is hellishly expensive.
Post reply on HN