Schematic Review: Classroom Timer - Page 1
Forum section: electronics / projects

author: Youkai
author_rank: Regular Contributor
timestamp: November 28, 2023, 12:32:10 am
content: This project is for a "Classroom Timer". The timer will be a strip of Dotstars. User can click buttons to add/subtract minutes. When start is pressed the LED's will turn off as appropriate to show the countdown.Planned Materials:MC: Sparkfun Pro Micro 5vLED: Dotstar LED (ideally 1 meter of 60/m strip)LCD:128x32 I2CButtons: Standard 4-pin momentary push-buttonsPower Switch: toggle buttonCapacitor: I was thinking one of those non-polarized tan things assuming it has the needed capacity. I forget their actual name.Notes / Questions:The biggest change in current at any one point would be when the LED's go from all-off to all-on as the timer is started. Not sure if I need to put a capacitor on the ProMicro to prevent this from causing issues. If so what value?I don't know what the value of the debouncing capacitor should be.For a power source I'm planning on putting a barrel plug on it and finding a cheap 5v wall plug that will provide the necessary amount of powerMax curent draw would be when the 60 LED are on, they would be set to green at that time and would stay green for 50% of the countdown. Does that mean 1.2 amps (20ma per green LED) just for the LED's?How many Amps does the wall plug need to be for this circuit? Led Panel specifies 0.08W for full panel on. I think the Pro Micro needs up to 500mA? Would a 2A plug cover as long as I'm careful about the LED settings?

author: Thunderer
author_rank: Regular Contributor
timestamp: November 28, 2023, 03:13:26 am
content: Quote from: Youkai on November 28, 2023, 12:32:10 am1. No need for additional caps. The regulator on the Pro Micro has the needed ones.http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf?_gl=1*afrzte*_ga*MTA5NzY0NjE1Mi4xNzAxMTQwNTkw*_ga_T369JS7J9N*MTcwMTE0MDU5MC4xLjAuMTcwMTE0MDU5MC42MC4wLjA.2. Put anything between 10n and 1u.3. This is linked to 5 below.4. I would go with 5mA per LED (if visible enough), as most modern LEDs are more efficient than the standard old 20mA ones. I would provide with a 2A 5V wall plug (maybe a phone charger?).5. There is need to understand how you power the LED panel. The Pro Micro cannot provide directly the power to 60 LEDs (5 to 20mA per LED). So, you can assume max 1.2A for the panel and 10-20mA for the Pro Micro.So, I'd go with a 5V @ 2A power supply if you want to go with 5V.Questions: any datasheet on the LED strip? Most are 12Vdc supply.

author: Youkai
author_rank: Regular Contributor
timestamp: November 28, 2023, 03:41:25 am
content: Thanks Thunderer.I might not have the LED on full intensity so I could probably keep it to below 20ma even if that's actually what they draw. Though when I'm doing fading to Yellow and from there to Red I'll have at least two LED on at once so that will increase the draw. I'm planning on usingthese from Adafruit. You can see the specs there. It's a 5v DC power source.The 5v power rail is going to go to each component individually. The Pro micro will not be powering the other components. I imagine it's not a good idea to have all the current for the LED's flowing through the micro controller. Though I just realized that I forgot to put the Power and Ground lines in my pro micro. Updated schematic attached.

author: Youkai
author_rank: Regular Contributor
timestamp: November 28, 2023, 04:08:26 am
content: I updated the schematic again. Changed the resistors from 100K to 10K since that is more inline with the debouncing circuits I saw while browsing. Also set the caps an 0.1u.Will this structure do the denouncing? The actual circuits I see have more complicated circuits with Schmitt triggers. If I need to have it be that complex to work I'll just do software debouncing. I've done that before; but I thought if I could make the program simpler at the cost of a resistor and capacitor it was probably worth it.

author: Youkai
author_rank: Regular Contributor
timestamp: November 28, 2023, 08:29:36 pm
content: Was doing some research about using a USB-C breakout as the power source for this project. I have updated the schematic to include that. Please review and let me know if I missed anything.Also will the debouncing work as I have it drawn? If I need to do the full Schmitt trigger setup I'll handle it with software.

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: November 28, 2023, 11:53:09 pm
content: USB-C breakout is a good idea - having a commonly available power brick is better than having one with an oddball plug or voltage. Debouncing - the network shown may work, I would rather use an external pullup (rather than relying on the one built into the Arduino) and just have the cap go straight to ground (rather than through a 10k). The cap will smooth out any contact bounce, the tiny arc produced by discharging the cap through the switch will provide wetting current for the switches, and the external pullup will be a bit stronger than the one from the Arduino (use a 1k instead of 10k).If you notice contact bounce, you can always implement a software debouncer in addition to the RC filter method shown.

author: Youkai
author_rank: Regular Contributor
timestamp: November 29, 2023, 12:37:53 am
content: Quote from: radar_macgyver on November 28, 2023, 11:53:09 pmOk so are you suggesting something like this?Also I guess theUSB-C BreakoutI'm planning on usingalready has the resistorson CC1 and CC2 so I don't need to put them in myself; correct?

author: Thunderer
author_rank: Regular Contributor
timestamp: November 29, 2023, 01:05:01 am
content: The 100n caps are in parallel to the contacts, not in series. The series resistor (with each contact/push-button) should be 10-47k.I understand now about the LEDs strips, thanks for the schematic.

author: Youkai
author_rank: Regular Contributor
timestamp: November 29, 2023, 07:53:32 pm
content: Thanks for the help. I see what I did wrong with the caps.I decided to save myself the trouble and go with software denouncing. I'm a software developer so that's "easier" for me than extra soldering. Also it will allow me to make the footprint of the circuit smaller.Here's the (hopefully) final circuit.

author: Youkai
author_rank: Regular Contributor
timestamp: December 19, 2023, 12:10:01 am
content: Thanks for the help everyone. The project is complete! Here's mybuild journalif anyone is interesting in seeing it.