Help identify a failed and unmarked SOT23-6 MCU - Page 1
Forum section: electronics / general

author: MLXXXp
author_rank: Frequent Contributor
timestamp: January 21, 2024, 02:00:24 am
content: As the title states, I'm curious to identify a failed, unmarked 6 pin MCU in a SOT23-6 package. It's on the controller board for a magnifying glass LED lamp. I've posted some information and the schematic in a separate post here:https://www.eevblog.com/forum/projects/why-different-pulldown-resisors-for-otherwise-identical-led-drivers/The requirements are:Capable of operation at 5VVdd (5V) on pin 5Vss (GND) on pin 2Pins 1 and 6 can be set as inputs with the capability to enable both an internal weak pullup or weakpulldown(one at a time).The minimum to maximum range of the pulldowns are such that a resistor divider formed from a 10K upper and pulldown lower will produce a voltage at 5V that will be read as a HIGH on these inputs. (Note 1)The min. to max. range of the pullups and pulldowns are such that a resistor divider formed from one of each will produce a voltage at 5V that will be read as a HIGH on these inputs. (Note 1)Pins 3 and 4 can be set as outputs with PWM capability. (Note 2)Note 1: If the resistor dividers don't produce a voltage read as HIGH but pins 1 and 6 can be read with an internal ADC, that would be acceptable.Note 2: If pins 3 or 4 aren't PWM capable, the PWM could be produced on them using software bitbanging. (In this case, having at least one timer peripheral would be helpful.)Taking into account notes 1 and 2, there are likely a number of parts that fit the bill, with the input pulldown capability being a fairly limiting factor. However, I'm curious if there are any MCUs that fit all these requirements without needing to use the notes. I've done some searching and haven't found anything that wouldn't require at least bitbanged PWM.Note that this is really just for my curiosity. I plan to try to fix the lamp but not using a compatible MCU even if I discover one. I'm planning to use an ATtiny13A SOP-8 mounted on the original board "dead bug" style with wires from the pins to the board. This way, I won't need a specific pinout. Having the additional 2 MCU pins, I'll cut some traces to isolate the buttons so there can be a single button per pin, thus only needing internal pullups, not pulldowns.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 21, 2024, 02:18:31 am
content: Who knows, it's probably an obscure chinese MCU.The possible MCUs if it was something from the west could be some Microchip PIC10 or some ATTiny. We don't have that many which come in SOT23-6.Note that for the PIC10 in SOT23-6, pin 5 is indeed VDD and pin 2 VSS, so could be a match - at least should be a drop-in replacement. Same for the ATTiny in SOT23-6. Both could fit.And it's likely yet another reference, keeping a similar pinout probably for market reasons.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: January 21, 2024, 03:21:25 am
content: Quote from: SiliconWizard on January 21, 2024, 02:18:31 amBoth would fit, with Vdd and Vss matching, but I don't think either have input pulldowncapability, so you wouldn't be able to sense the K1 (power) or K2 (brightness lower) buttons. Not having internal pulldowns seems to be the showstopper for just "program and drop in", for all MCUs I've looked at. Not having PWM on pins 3 and 4 means more complicated software but is doable.Adding one external pulldown resistor from pin 1 to GND is probably all that's required to make either work.But again, this is all academic because I intend to use a wired in 8 pin ATtiny13A SOP-8, and some PCB trace cutting, to fix the lamp. I'm just wondering if anyone can tell me what the actual MCU that was used is, out of curiosity.

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 21, 2024, 04:24:49 am
content: https://www.lcsc.com/products/Microcontroller-Units-MCUs-MPUs-SOCs_11329.htmlFilter by sot23-6 package and find out.

author: zilp
author_rank: Frequent Contributor
timestamp: January 21, 2024, 05:57:28 am
content: The Padauk PMS163 seems to fit, though quite a few other Padauk chips should work if you do the PWM "in software", such as the PFC161, which is even listed by lcsc in SOT23-6, and isn't OTP. Pull-down is somewhat common in Padauk chips, but hardware PWM on pin 4 is not. But I'd guess that using timer interrupts for PWM generation should work well enough ...

author: MLXXXp
author_rank: Frequent Contributor
timestamp: January 21, 2024, 10:51:19 pm
content: Quote from: zilp on January 21, 2024, 05:57:28 amThanks for your reply@zilpYes, the PMS163 looks like it checks all the boxes.Quote from: zilp on January 21, 2024, 05:57:28 amI doubt they would use a one that isn't just OTP, in order to keep the cost down. That said, the PFC161 does have input pullups and pulldowns but looking at the datasheet, I think it would need an ADC, which it doesn't have. The only way I can see that you could read button K2, which is across pins 1 and 6, would be to put a pullup on pin 1 and a pulldown on pin 6 (with both as inputs). With K2 not pressed, pin 6 would be pulled down to close to 0V. With K2 pressed, pin 1 would be connected to pin 6 and the pullup and pulldown would form a resistor divider, making the voltage on pin 6 be nominally 2.5V. This voltage is in the area between what's required for a high (min 0.7 Vdd) or low (max 0.1 Vdd) reading. Therefore, an ADC would be required to properly sense this voltage to determine that K2 is pressed.The PMS163 is the only SOT23-6 MCU (at least OTP) from Padauk I could find that has input pullup and pulldown and ADC capability on pins 1 and 6.

author: zilp
author_rank: Frequent Contributor
timestamp: January 21, 2024, 11:41:25 pm
content: Quote from: MLXXXp on January 21, 2024, 10:51:19 pmYeah, I'd expect that, too, but if you want to reimplement the firmware, I'd guess that a flash part would be preferable for development.Quote from: MLXXXp on January 21, 2024, 10:51:19 pmFor one, you could just pull one of them hard to ground and the other with pull-up resistor to check K2, as no button shorts to +5V, so there is no risk of short-circuit when doing that.But also, both pins 1 and 6 can be configured as comparator inputs, so that also would be enough of an ADC to distinguish 5 V vs. 2.5 V vs. 0 V.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: January 22, 2024, 01:08:07 am
content: Quote from: zilp on January 21, 2024, 11:41:25 pmIf you set pin 1 to input with pullup and pin 6 to output low, you wouldn't be able tell the difference between K2 or K3 being pressed. Similarly for K2 vs. K4 with pin 6 input pullup and pin 1 output low.Quote from: zilp on January 21, 2024, 11:41:25 pmI didn't consider the comparator feature. Yes, it would be suitable for sensing around 2.5V on pin 6 by using the badgap or resistor MUX as the other comparator input. So, the PFC161 could likely be used. And, there appear to be quite a few Padauk MCUs with pullup and puldown plus a comparator on pin 6, thus more candidates.Thanks again.

author: zilp
author_rank: Frequent Contributor
timestamp: January 22, 2024, 02:19:00 am
content: Quote from: MLXXXp on January 22, 2024, 01:08:07 amYeah, but you could wiggle the hard-low pin and see whether the other pin follows to distinguish the two.Quote from: MLXXXp on January 22, 2024, 01:08:07 amYep, that just seems to be the only one that fits those requirements that is also listed on LCSC. Plus, it is supported by the open dev tools, as you presumably don't want to buy a 100 USD original Padauk programmer to repair that lamp? ;-)

author: MLXXXp
author_rank: Frequent Contributor
timestamp: January 22, 2024, 02:53:39 am
content: Quote from: zilp on January 22, 2024, 02:19:00 amI was in the middle of typing the same thing when you posted.Quote from: zilp on January 22, 2024, 02:19:00 amAs I mentioned in my original post:QuoteI've ordered some ATtiny13A SOP-8 chips and a SOP-8 clip socket to make them easy to connect to for testing. I already have an ICSP and software development tools.https://www.aliexpress.com/item/1005005292593054.htmlHere's the board. Plenty of room for a SOP-8 and the case is deep enough.