IR controlled LED light LiPo, Attiny13 - Page 1
Forum section: electronics / projects

author: paw
author_rank: Contributor
timestamp: February 16, 2017, 11:29:16 pm
content: I've been challenged with providing "internals" for 12 paper lanterns for a covered terrace for a friend:Functional Requirements:1. Touch free turn on/off (perhaps auto turn off/fading after say 5 hours)2. Many hours runtime (> 30h per charge)3. "Enough light" - a 3W led (of which I have plenty) driven @ 50mA was deemed "enough".Design headroom consideration:4. ability to adjust brightness during programming or in runtime (i.e. 3 turn on levels) without a need to change the hardware5. protect the LiPo from over-dischargingThe most basic (as per the design):- ir receiver (for generic ir remote operation)- attiny13- PWM driven mosfet, dirivng led (with 15ohm current limiting resistor - value to be decided later)- 18650 needs to be removed from each lamp for charging- no battery management/protection, whole circuit "protected" by a simple mosfet having the gate driven by VCC through a resistorImprovements:- add 18650 case for all the components,- include battery management off the shelf board with usb port for charging (to fit the case)I'm going to start with the bare bones for which I'm including the design.Will this work? What are my other concerns? If I could fix three things in my ghastly schematic (to make it more readable/standard) what would these be?I realise that the board is not very readable but it is very crammed. After getting some initial comments I'll improve the board and fix the silkscreen.Many thanks for any comments as always.Model of the mosfet and IR receiver does not correspond the design. I just picked matching packages/pinout form Eagle for now.

author: sleemanj
author_rank: Super Contributor
timestamp: February 17, 2017, 02:04:10 am
content: No programming header, so I assume you are programming off-board in a test socket before soldering them up? but if you were planning to program on-board (maybe pogo pins or something) you might want to have a solder-jumper for the connection between PB1 and the OUT of the IR receiver.Mounting considerations?The BSS138 has a threshold way below the voltage you'd want to ever see a Lithium Ion battery at and it looks like it would still conduct fairly significant current even at 2.5v. I don't think this is a good way for "protecting" the cell, in fact, I don't think it's going to do anything useful for you.

author: macboy
author_rank: Super Contributor
timestamp: February 17, 2017, 03:34:57 pm
content: Consider that your PWM driven LED may produce enough interference to prevent the IR signals getting through cleanly while the LED is on (especially dimmed).Also,definitelyfilter the power supply to the IR receiver. These things are really finicky. I often use a \$100 \Omega\$ series resistor on Vcc, and a \$10 \mu F\$ cap across the power pins. They draw very little current, so the \$100 \Omega\$ is no issue, but provides plenty of series impedance to filter noise. You may need a pull-up resistor on the output of the IR receiver, so add pads on the board to allow that. If you find you don't need it, just don't populate the part.

author: paw
author_rank: Contributor
timestamp: February 19, 2017, 12:27:45 am
content: Thanks for your comments.- I've replaced the mosfet/resistor protection circuit with AP9101C chip + mosfet (not implementing overvoltage, mosfet).- Fixed the LED package.- Decoupled/noise isolated the IR receiver- Added some mounting options- Improved the silk screen- Increased LED current limiting resistor's power rating- Added LDR/resistor option. High being provided by one of the pinsAny other problems worth fixing?The gerber renders dont respect outline so the board edges are all wrong. Don't worry this is an artefact of rendering.