Custom RP2040 rechargeable LED lamp controller PCB Help - Page 1
Forum section: electronics / beginners

author: f618x
author_rank: Newbie
timestamp: January 13, 2023, 10:43:34 am
content: Hey,This is my first project working with PCB design and microcontrollers. The brief is to design an LED controller for an aluminium lamp with a rechargeable battery The lamp has a warm glow similar to candlelight- with smooth transitions and candle flicker mode. I'm a total noob when it comes to electronics and coding in C. I'm an industrial designer and spend most of my time on CAD or in the workshop on machines.My first version used the pico RP2040, I chose this because it was cheap on JLCPCB and there's a plethora of documentation and youtube tutorials to hold my hand through the process. There are two LED panels that mirror each other. with 5 channels and brightness and animations through PWM. The lamp was to be controlled by touch through 5 metal spikes that are isolated from the body using 3D-printed parts. I chose a touch IC with 6 channels for this. I also used the TP4056 IC for battery charging and borrowed a load-sharing power path control fromwagiminator.Here are the details:Problems:The 5-channel touch control works, but is a little finicky and unreliable and there's nothing I hate more than an unreliable touch switchThe power path sharing doesn't seem to be working; if the battery is fully charged, and USB is plugged in and the LEDs are turned on the TP4056 leaves standby and indicates charging.With the LEDs at full brightness the inductor gets hotOut-of-the-box standby power consumption is quite high at 0.025A,Proposed redesign thus far:Reduce the touch control channels to a single channel- each spike connected to one other. Increase sensitivity from 20pf to 12pf. (I bought lots of 5P PH cables so I'll keep that format)Swap the RP2040 for an ATTINY1616 for lower power standbyBeefer inductorConcerns:I'm not sure how the redesigned touch system will work; with one channel over 5 spikes/5 wires -if it will be sensitive, responsive or glitchy.The power path sharing- I can't tell if it is working as intended or not- and I don't want to burn down anyone's homeI visited a design store yesterday and noticed another rechargeable lamp circuit which had few big capacitors on the board and felt like I was missing something obviousIf anyone has any tips or advice regarding my concerns for the next version. OR spots some glaringly obvious problem here-please let me know. The delivery deadline is approaching -so I'm low-key considering commissioning someone to help cross this over the line, so do let me know if that interests you too.Anyway- I hope this is TMI or posted in the wrong section.Cheers Felix

author: ledtester
author_rank: Super Contributor
timestamp: January 14, 2023, 08:58:47 am
content: Hello and welcome to the forum!For someone new to electronics you've certainly chosen a very ambitious first project!QuoteYou haven't posted in the wrong section but each of your concerns could easily be in their own thread. And I think it would work out better because then each thread would focus on a single problem and you wouldn't have multiple conversations going on in the same thread.Another suggestion I have is to state important details about the design such as what chips and modules you are using instead of relying on the schematic to provide that information. For instance, when you mentioned touch control the first question I had was how were you implementing it. I found the answer in the second schematic image but not everyone is going to take the time to do that. You would attract more attention to your problem if you said something like "I'm using a TTP233D for touch control but it's not working well for me..."Similarily with the inductor getting hot issue. First question is how is the inductor being used. Oh, it's in a switching power supply. Next questions are: what's the input voltage, the output voltage and the required output current? What switch controller chip is being used? And what inductor is being used -- inductance value and form factor? Again, the information is in the schematic but it takes time to find it. Realize that most people on this forum will quickly scan through a post to see if they pick up on something, and if they don't they'll just move on to the next post. So you should make it easy for people to get involved with your question.One last comment and question... you are basically bringing together three separate sub-systems: touch control, LED power supply and a battery charger w/ power sharing. Have you tested these sub-systems in isolation? If they work by themselves but not when put together that's useful information.

author: girishji
author_rank: Contributor
timestamp: January 14, 2023, 02:07:18 pm
content: You have to make sure each subsystem works independently."you are basically bringing together three separate sub-systems: touch control, LED power supply and a battery charger w/ power sharing. Have you tested these sub-systems in isolation?"For battery charger/power sharing it is best yo use PMICs. They are much simpler to use. Look at nPM1100, ADP5360, ADP5350. Aliexpress has some charger boards that work out of box.Also, look at Seeed xiao ble. It has battery management builtin. Arduino is supported I believe.

author: f618x
author_rank: Newbie
timestamp: January 17, 2023, 07:27:52 am
content: Great shout- I think you're spot on, I'll break these issues down into their own threads today and identify the components/issues betterYeah, I've tested the sub-systems, they work, and they do work together. However not as well as I'd like them to - I should have mentioned- Sorry!

author: ledtester
author_rank: Super Contributor
timestamp: January 22, 2023, 06:00:54 pm
content: Regarding the TTP233D...The datasheet looks very similar to the TTP223-BA6:https://www.tontek.com.tw/uploads/product/118/TTP233D_V1.2_EN.pdfhttps://datasheet.lcsc.com/szlcsc/TTP223-BA6_C80757.pdfIn particular, according to this forum post the 223D only performs recalibration only at power-up and after a touch:https://www.eevblog.com/forum/beginners/ttp223-capacitance-sensor-rat-trap-for-outdoor-use/msg4440556/#msg4440556That post lists some other issues (such as sensitivity to Vdd, humidity and temperature) and suggests using the AT42QT1010 instead.