I have taken the Open Source Christmas Tree Ornament project from Brian Schulteis and put it on GitHub under newmatik/Weihnachtsbaum (please Fork!) with a couple of modifications:

enter image description here

  1. Added 20mm cell battery (CR2032) as power source so the ornament can work without being connected to permanent 5V through cables
  2. Added a LDO Voltage Regulator (LP3985IM5-5.0/NOPB) to convert our 3V into 5V


I believe I have done that correctly. However now I want to do the following and I am stuck since this is my very fast Eagle project and I am not an Electronics Engineer:

  1. Adding the Tag Connect TC2050-IDC-NL and wiring it correctly to J1 (2x6 connection header). I did not find a good instruction on what pin goes where and it doesn't seem like it is 1-1, 2-2, ... 6-6. I find the Tag Connect makes it much easier to connect the PCB for programming.
  2. Enable SMD tactile switch to (1st click) switch device on all lights on (2nd click) LED blinking effect every 3 seconds (3rd click) LED cycling various effects and (4th click) turn it off again saving battery. How can I switch on the ATTiny45-20SUR and make it enable to input logic of the LP3985IM5-5.0/NOPB? Do In need a ATTiny with more IO for that?
  • Post a link for your schematic in a comment and it can be added to your question. A LDO can only reduce voltage, not increase it. The tag connect cable needs to match your programmer. Which programmer are you using? – W5VO Dec 6 '15 at 11:26
  • The schematic is here i.imgur.com/pSsH0TJ.png?1 I am trying to use the AVRISP mkII as the programmer. – Dominik Dec 6 '15 at 11:33
  • OK so the LDO is not the right thing to use, am I right to assume a 5.0V Buck/Boost Charge Pump would be the right thing to use here? REG710NA-5/250 by Texas Instruments seems to turn 1.8V–5.5V to 5V OR would I leave all of this out and operate the ATTiny45-20SUR directly at 3V since the data sheet says Voltage - Supply (Vcc/Vdd) 2.7 V ~ 5.5 V? – Dominik Dec 6 '15 at 12:03
  • Dump the regulator entirely. Both the '45 and red and green LEDs can run off 3V. – Ignacio Vazquez-Abrams Dec 6 '15 at 12:54
  • Thanks @ignacioVazquez-Abrams it seems like the blue LED (VAOL-S8SB4) has a forward voltage of 3.3V so that will have to be replaced. Any suggestions for my actual problem of using the switch and hooking up the tag connect? – Dominik Dec 6 '15 at 13:03

As mentioned, you could run the whole circuit off the battery. Blue and white LEDs may be a bit difficult on 3V. That being said, if the forward voltage at 20mA is 3.3V, you will probably get some light out of them.

You could put the mode switch on the reset line, and program the next power up state in flash. A bit hackish, but it probably would work.

You need to pick the right Tag-connect for your programmer. As Ignacio mentions, you probably would want the 2030 model. I would recommend against using the Tag-connect altogether, as it will easily double your project cost. Just use the existing pin header connector. If you must get the Tag-connect, get the one with latches, as it will make debug sessions easier.

A gotcha with Eagle is that you can set the net name in the schematic without actually displaying the label. There are probably some connections that are in the file that are invisible because the microcontroller pins aren't labeled.

Don't forget that you need to match footprints of your new parts to the actual parts you buy. To increase the chances of your board coming out right the first time (and in time for the holidays) I recommend you buy all your parts now so you can make sure they fit on a 1:1 printout of your PCB layout.

Good luck

  • TBH I wouldn't debug it on the ornament if I could help it. Set up the circuit on a breadboard and develop it there, then upload once to the ornament. – Ignacio Vazquez-Abrams Dec 6 '15 at 17:08
  • And you can definitely get light from a blue LED when using a CR2032. First hand experience comes from modding a LED tea light to use a ATtiny85 and a RGB LED. – Ignacio Vazquez-Abrams Dec 6 '15 at 17:10

You are well ahead of yourself if you are already trying to make the circuit board artwork in Eagle. It is essential work out all the design details and have confidence that what is in the schematic will have half a chance of working before you commit the PC artwork.

Let me make clear one very important detail... the LP3985IM5-5.0 is indeed an LDO regulator but it will not convert 3V to 5V.

  • Thank you for your reply. I am not trying to do the artwork in Eagle for the artworks sake. I am trying to figure out the dimensions to figure out how to place things and what to put on and what to leave off. The board file is just a draft until the schematics are done. So instead of an LDO I would need an 3V to 5V Step-Up Converter such as LT1111 or what would be the best way to do that? – Dominik Dec 6 '15 at 11:35

Aside from the LDO being a device which drops voltage, rather than boosts it, there is a bigger issue with the idea of the Coin cell.

CR2032 coin cells (in fact most of them) are rated to at most 2mA continuous draw - typically this rating is actually less than 1mA. You can't actually draw much more than this limit without the terminal voltage of the battery dropping off significantly - the internal resistance of this type of cell is quite large.

So trying to power 9 LEDs and an ATTiny off a CR2032 is really not going to work. If you sequence the LEDs in your code so that only one is ever on at a time, and find some which are rated for ~1mA (these do exist but not in so many colours and are not very bright), then it might be possible to power the board from a coin.

For reference I designed a dice circuit using a '45 and 7 ultra low current LEDs. It does work quite well, and the battery life is pretty good. In this circuit only two LEDs are turned on at any given time. For numbers like '6' the lights are shown in turn to ensure that current draw is kept below the rating of the battery.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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