I have the simplest board with a LED and a switch, powered by 2 CR2032 3V (pictures attached). There is 4 possible states:

  1. LED is off.
  2. LED flashing slowly.
  3. LED flashing fast.
  4. LED is constantly on.

enter image description here enter image description here

  1. How does 1 switch generates 4 states?
  2. How does the board work?
  3. How to diagnose why the LED stopped flashing?
  • 1
    \$\begingroup\$ To get four states out of a button you just count from 0 to 3 and recycle. The logic takes the count and produces the desired behavior. That is all internal, so you won't fix it. \$\endgroup\$ Nov 29, 2022 at 4:53
  • 1
    \$\begingroup\$ Does this answer your question? What kind of components are black blobs on a PCB? \$\endgroup\$
    – brhans
    Nov 29, 2022 at 13:06
  • \$\begingroup\$ If you desolder the battery holder, you can shine a strong light from the black, and see what is hidden under the black blob \$\endgroup\$
    – Ferrybig
    Nov 29, 2022 at 14:33

3 Answers 3

  1. How does 1 button generates 4 states (from my point of view it should be on/off)?

The chip under the black epoxy "bubble" has an oscillator and a state machine that implements this functionality.

  1. Could somebody explain me as to a child how the board works?

All of the functionality is inside the chip, so "explaining" how it works would amount to designing something similar to what's on the chip. It's not a very complex chip, and could be easily put together in either a bipolar or a CMOS process, or assembled from discrete transistors (either BJT or MOS).

It's just as likely though that instead of an ASIC it's just a very simple microcontroller. Then, "explaining" would amount to writing a little bit of C or assembly code to provide the same behavior.

To "fix" the board you could remove the original chip (scrape it off), buy a 6-pin microcontroller, load it with code that does what you described, solder it down, and you'd end up with the same functionality.

  1. How to diagnose why it might not work (the root of the question) – so the LED stopped flashing?

Most likely mechanical stress caused a bonding wire to rip off the chip or off the board. This is a very low cost design, and is not particularly sturdy. The cheap PCB substrate bends a lot as the button is operated, and this is not mechanically compatible with relatively rigid epoxy and chip die. Something is apt to get damaged sooner rather than later.

If you had means to dissolve the epoxy away, I bet you'd find a disconnected/broken bonding wire - one or more out of several that connect the chip die to the PCB traces. If you then had access to a wire bonding machine, you could re-make the connection, assuming that the chip wasn't damaged.

There is also some possibility of electrical damage due to static electricity or batteries inserted with reverse polarity.

In any case, any effort spent on "fixing" it is worth orders of magnitude more than the device itself. The cheapest "fix" is to get a new one, unless you want to learn a lot about fairly intricate engineering.

To actually fix it, you'd need to learn the basics of chip de-encapsulation (using rather strong chemicals that require lots of care in their use), chip bonding, microscope technique and recognition of chip structures needed to assess the current state of the chip and its connections, etc. Then, if the chip itself was damaged, you could scavenge a chip die from another one of those flashers, attach it to the PCB, and bond it. It takes little time in a well equipped microelectronics prototyping lab, or a lot of time and effort if you'd want to collect 2nd hand tools needed to do it all. You'd also need plenty of practice on working flashers before attempting to fix a broken one. You'd break many in the learning process, too.

Ultimately, whether it's "fixable" is entirely upon what tools you have access to or can put together, how much you're willing to learn, and how much money you have to pay for all that.

If your only goal is to "fix" the thing: buy a new one. It'll be infinitely cheaper than fixing it.

  • 3
    \$\begingroup\$ Really useful answer. Thanks a lot. The main goal is to learn, the secondary – to fix (which, as understood, is simpler to buy). Broken things are always a good opportunity to learn )) \$\endgroup\$ Nov 29, 2022 at 6:40
  • 1
    \$\begingroup\$ I'd check if other parts are broken before assuming the chip in the black epoxy is dead - does the battery have charge? Is the pushbutton (it looks like a dome "click" type) making contact when pushed? \$\endgroup\$ Nov 29, 2022 at 11:14
  • \$\begingroup\$ Agreed. I've got a nice little LED lantern which is similarly broken, but in this case it has a recognisable logic chip (i.e. that counts button presses and converts them to state) and separate FET to actually switch the current. \$\endgroup\$ Nov 29, 2022 at 13:26
  • 1
    \$\begingroup\$ Apart from failure of the horrible little switch (or the plastic that pushes it) the most common failure mode I've seen on this sort of thing is the battery clips rusting until they no longer make contact. I've had both keyring and bike light versions fail that way, while the electronics can normally recover from getting damp. \$\endgroup\$
    – Chris H
    Nov 29, 2022 at 13:46

The cheapest way to produce such a device in large quantities is to use a a bare chip, without packaging, that's wire bonded to the PCB. The black dot is a protective substance poured on the chip. Protection is required for environmental and mechanical durability and it also prevents light getting to the chip.

The chip reads the state of the button and has a circuit that switches the LED on and off.

  • \$\begingroup\$ Less to prevent light getting to it and more to protect the bond wires, though both are a concern. Vibration can easily break bond wires that aren't held in place. \$\endgroup\$
    – Hearth
    Nov 29, 2022 at 3:24
  • \$\begingroup\$ Many moons ago (backin the '80s) I was measuring the electrical characteristics of a number of commercially-available diodes. Classic old Tektronix scope with the transistor/diode test jig. All diodes were packaged and marked. For one type I was getting very inconsistent results. Finally I noticed that if I waved my hand over the test jig the scope trace jumped around. Well, turns out the black plastic packaging of that diode did not, in fact, block out light from the room, unlike every other part. Very weird... \$\endgroup\$
    – Jon Custer
    Nov 29, 2022 at 17:33
  • \$\begingroup\$ @Hearth, Thanks, added a clarification that protection is needed for environmental factors AND often light. I don't have statistics, but in many applications bond wires are not submerged in epoxy and can withstand substantial vibration. Introducing humidity or direct force will risk the connections though. And for protection from (UV) light, many modern packages have it figured out it on silicon level, but semiconductors need to have it taken into account. \$\endgroup\$
    – Ralph
    Nov 29, 2022 at 19:45
  • \$\begingroup\$ @JonCuster I've worked with some open chips during RnD phase and it's surprising how sensitive they can be to sunlight and how difficult it is to block light from entering a test setup. \$\endgroup\$
    – Ralph
    Nov 29, 2022 at 19:50
  • \$\begingroup\$ @Ralph - yup. I just did not expect a commercial, packaged, black plastic diode to be light sensitive. We did not use it in the product... \$\endgroup\$
    – Jon Custer
    Nov 29, 2022 at 19:53

The black thing in the corner of the board is a microchip potted in black resin. The proper name is "chip on board", but it's commonly known as a "blob chip".

It's the chip that's making the LED flash.


Not the answer you're looking for? Browse other questions tagged or ask your own question.