Clock Project Journal Entry #1: What is it, and what’s the point?

One of the things my desk is missing is a clock. Yes, I have a computer, watch, and phone that can all tell time, but when I’m in a full-screen game, I don’t want to have to go looking for the time. I’d rather have a clock large enough that I can simply glance at. First world problems, I know, but in any case, I thought that this would make for an interesting electronics project, despite how simple it may sound.

I will be making two custom circuit boards for this project. One will be the control board and the other will be the actual LED clock display. The project will be controlled by at Atmega328p microcontroller and the time will be kept by the DS3231 real-time clock chip. The LEDs will be driven with the help of some 74HC595 shift registers since it should make programming easier as opposed to multiplexing… I always gravitate toward using shift registers, I guess.
20150926_150931

One of the things I wanted to make sure of was the LED configuration. As it sits now, each segment will have 4 red LEDs. At first, I tried driving them at their “full” 20mA each (so 80mA per segment) but I felt that it was too bright. Bumping up the current-limiting resistor brought it to a more comfortable brightness. With the higher resistor, the current drawn for the segment was about 4mA, which is low enough for a pin on the shift register to handle directly. With that, I don’t need any transistors, which makes me happy…

I was planning to use a single resistor for the four LEDs on each segment, but it’s bad form and I don’t want to go that route for the whole project. I already feel “guilty” about using shift registers instead of just multiplexing. I will be putting a resistor for each LED. The main reason why I wanted to go with the one resistor per four LEDs is because it saves space without having to go with surface-mount components. I’ll see how the layout goes with the 1/4 watt resistors and hope that I don’t have to go and get some surface-mount resistors. I’d like to use whatever I already have.
ds3231rtc_sch_1Here’s the schematic for the control board. The board layout is done, or at least the first draft of it is. The only thing left to add is a switch to either cut the power to the project or at least turn of the display. I haven’t decided yet. I’m planning on using some mini-slide switches I bought a long time ago but I need to create an Eagle part for it which may take a little time. I’m waiting on some digital calipers from Amazon so that I can measure the pin thickness.

The layout for the display is coming along slowly. There’s only enough space for two digits per board, which is not a bad thing since I could use them for other projects. The problem that does arise from not making them specific for the project is that I have to make a separate circuit board for the colon and AM/PM indicator (I don’t really want a 24-hour formatted clock).

That’s all I have to share for now. I’ll be back with more when more details get finalized. Stay tuned!

PS. I started working on this project about a week or so before Ahmed Mohamed’s clock incident happened. I found that to be a funny coincidence.

Advertisements

Shift Register Board Rev C – Vias everywhere!

Hindsight is 20/20, that’s for sure.

I’m currently waiting for Revision B of my 74HC595 Shift Register Boards in the mail. I’m eager to get them because they’re my first manually routed boards so I want to see if they turn out right. The revision is a minor one with the only real changes being a connection that was missing in the first revision and breaking out the Output Enable pin.

I plan on using 3 or 4 of these boards for an update to the Light Show. I only checked yesterday to see if I had enough shift registers. I don’t. I started looking around for some more and I quickly realized that using the SMD version of the 74HC595 would have been cheaper. That’s why I’m looking at another revision already…

SRrevCI’m not sure how likely it would be for me to get these made since I already have the new boards coming in but I was really excited to start this design anyway because I haven’t use SMD components very much. The only board I have used SMD components is my AMS1117 board, but the circuit was so much simpler… and at the time, I was new to Eagle so I just used the auto-router.

It’s an interesting adjustment for me to have everything start on the top layer of the SMD ICs. I ended up adding a lot of vias. There are vias that are only there to make a gap for the fill to reach some of the pins. I’ll have another go at it to try and clean some of that up.

Since I’m still new to Eagle, I like to go to websites like Adafruit and browse the boards to see how they’re laid out. I’d like to make my boards as pretty as theirs. That’s one of the reasons I’m trying the rounded corners again, which I didn’t do in Rev B for whatever reason…

Thanks for reading! If the mail service is good, the new Rev B boards should be here in a couple of days. Fingers crossed!

Moving on

It’s kind of depressing when you think about it, but my ESP8266 project is held up by two little switches I need that are somewhere in the mail. It’s going to sit off to the side until those switches come, so I thought I’d shift gears and give you a quick preview of what’s coming up.

RF Transmitter and Receiver

IMG_0001I’ve never been much of a communications guy. Protocols and accommodating for noise and interference and all that has always been confusing/boring to me, but I seem to be tip-toeing toward it these days. I received two RF transmitter and receiver pairs in the mail today. I didn’t have a project idea in mind when I ordered them, but they’re so cheap that I figured it would be would be nice to have lying around if I did come up with something one day. I’m still drawing up a plan, though I think it’s only natural that I try to use that temperature sensor that was originally destined for the ESP8266 project. I haven’t done enough research to see what is and what is not doable with this pair so I can’t confirm anything just yet.

bbIn the ESP8266 project, I have three mini-breadboards that each have a main purpose on them: One for my AMS1117 power regulator, one with the sensors, and one with the ESP8266 module. I decided to try and combine two of them so I could free up one so I could use it to play with the RF pair. I managed to cram the AMS1117 and ESP8266 onto one mini-breadboard… As long as it still works, it’s fine. I hope that this project will be on a perfboard soon anyway.

74HC595 Shift Register Boards Rev B / Light Show 7

I hadn’t mentioned it before but I sent the next revision of my 74HC595 boards to get manufactured and they are on their way to me right now. I’m pretty excited to see how they turn out because they are my first manually routed board.

I’m also excited because it’s part of some upgrades I want done to the Light Show Project before I start programming a new show. These new shift register boards break out the Output Enable pin which allows for some PWM control. The backdrop will definitely have that, but I’m also considering having all LEDs in the project controlled by shift registers, including the fountain LEDs which have always been controlled directly from the Arduino. There are advantages and disadvantages to that but, either way, I plan on taking a close look at how everything is wired.

In addition to working on the wiring, I’m still looking for ways to make it even bigger. For every version of the show, I watch the show and pick out things that I want to focus on. What I realized with Light Show 7 is that it’s not designed very well to watch on a widescreen… We’ll see what comes of that.

 

Thanks for reading! Stay tuned for more!

74HC595 Shift Register Board Revision B Preview

I said when the year began that I wanted to get back into Eagle and revisit some of my PCB designs, as well as start some new ones. My first project for the year in Eagle is giving some attention to my 74HC595 Shift Register Board. The original version, even with its flaws, was used in the latest Light Show to help control 10 RGB LEDs. It worked out quite well but, again, it had its flaws. I’d love to have a revised board in my hand by the time I’m ready to go back to the Light Show.

sch1

This is the new schematic for the board. It includes a breakout of the Output Enable pin which gives you some PWM control. Using this pin will PWM all outputs over the two shift registers (16 outputs), so my idea is to chain three together so I can dedicate each board to a color (red, green, blue). Of course, it’s not as flexible as something like the TLC5940 which has 16 channels you can PWM individually, but it’s cheaper…

Anyways, if the application doesn’t need PWM, I added another ground pin next to the OE pin so you can just connect them together. When you do that, the outputs have no PWM control. The first version of the board had the OE pin already connected to ground in the schematic.

brd

Admittedly, my first PCBs were auto-routed as I was just getting acquainted with Eagle. I’m still learning but I managed to route this one manually. There seems to be a lot of technicalities on what you should and should not do when laying out a board but I don’t think my design is too much off what the auto router would have done. I tried the auto-router earlier and it did some really odd looking turns and loops around pads… Anyways, it’s just like solving a puzzle, though it takes me a few tries to get it right.

If you’re interested in buying these boards, let me know. I’m trying to decide on how many to get made.

Thanks for reading!

Chaining Shift Registers (74HC595 PCBs)

IMG_20140916_123053I felt like doing some soldering as I wait for some PCBs in the mail, so I decided to assemble two more of my 74HC595 shift register breakouts. Up to now, I still hadn’t checked to see if the boards chain together as I designed them to. I chained them to the setup I already had with my first breakout board test and it was great to see that they work together just fine.

IMG_20140916_123258Shift registers can be a little confusing to program at first, but the benefit of being able to control so many outputs using just three pins is worth the learning period. Today, I controlled 48 outputs with my little Attiny85, though I didn’t bother setting an LED up to all 48 for the demo. For the new shift registers, I put an LED on every other output.IMG_20140916_123250These are the newly assembled breakouts. You can see the jumper wire that corrects the missing trace problem I discovered a little while back. For these boards, I decided to solder the output headers so that they plug into a breadboard. I don’t have enough male-female jumper wires to use them as I did before. Doing it like that makes everything messier anyway. I decided against soldering the boards directly together in case they didn’t work. If and when I use these in a project, I will solder them together by the headers.

Here’s a video of my example program. It’s just each shift register running from the first to last output.

The reason why the LEDs on the mini-breadboards look like they’re blinking is because there are times when all of the LEDs are off because they’re connected to every other shift register output pin. The LEDs on the large breadboard (blue LEDs) fill up all 16 outputs of those two shift registers so their sequence is a lot more fluid.

Here’s a screenshot of the loop code:codeLike I said earlier, all the code does is run through each output of each shift register. The for loops make it so that all shift registers are doing the same thing (each “data” byte is the 8 outputs of each shift register). Also, I probably should have declared “o” earlier in the code… Anyways, check out my shift register tutorial for more information on programming them!

Thanks for reading!

Shift Register Breakout – Rev B!

1In recent posts, I showed off my 74HC595 shift register breakout board in action. There is one major problem with it, as well a few things I observed that could be improved. They’re all included in Revision B of the board.

The major issue was that the Data In pad wasn’t connected to anything. It wasn’t an issue in the design file but it was somehow left out when I combined the Attiny85 Programmer/Breakout with the Shift Register Board to fit on the 5x5cm area to get manufactured. So there wasn’t anything to fix in the design, but it’s a lesson to double-check and triple-check the board layout before sending it off to get made.

One thing I learned since I designed this board was making ground planes, so now Rev B has ground planes on the top and bottom. The board functions without them, but since these are kind of dirt cheap (much like the manufacturer), it doesn’t include any capacitors so I suppose ground planes may help in that aspect. Another thing I learned from using my PCBs is how hard it is to solder individual headers or even a pair to the PCB. With that, I’ve combined all of the inputs and outputs to 5×1 headers. The shift register outputs at the bottom are also combined for 16×1.

That’s it for this board, for now anyway. Stay tuned for other projects and check out my eBay store!

1+1=Blue!

I’m not sure why it took me this long, but I finally tested my Attiny85 Breakout with my 74HC595 Shift Register Breakout.

IMG_20140903_235658I’ve only designed four PCBs so far, two of which are in the mail right now. These designs are circuits that I’ve used before so I’m somewhat familiar with them, except for the upcoming AMS1117 voltage regulator board. Anyways, I make these designs because I’m familiar with them but also because they can all work together. The AMS1117 will eventually be able to regulate power for the other three designs. You can swap between the Attiny85 breakout and the other upcoming board, the Atmega328p breakout, depending on which microcontroller is better for the project. Then the shift register board can be tacked on to the microcontroller boards to expand the digital outputs of them.

Anyways, I thought I’d talk about that just because I’m so excited to see these two boards work together. Here’s a short video of the test:

You may see the Arduino Uno in the background. It’s only supplying power.

Thanks for reading!