I must have made that swap early in the design, as the test circuit has the buzzer connected to RB7 as well. ![]() I think I did this because the RB7 pin was physically closer to the location on the board that I wanted to place the buzzer. Instead of connecting it to RA4, I had connected it to RB7. Somewhere along the way, I had reassigned the I/O pin that the buzzer was connected to. Finally, I realized what the problem was. ![]() I checked the code, but couldn’t find any issue there. I was pretty confused when that didn’t fix it either. Then, I thought I had a bad microcontroller, so I replaced it. I checked that line for continuity to the current-limiting resistor and to its I/O pin on the microcontroller. I took note of which ones were not coming on and realized their anodes were all connected to the same line. It turned out there were about a dozen or so LEDs that wouldn’t light up. Once I was done, I adjusted the code that I had written for the test circuit to work with the additional LEDs and button. It took me about four hours to solder all the components onto the PCB ( Figure 2). While I was waiting for the board to be made, I ordered more parts (mostly LEDs) to build the clock. ![]() DipTrace generated the necessary files to send to Bay Area Circuits so they could make the board. I used Bay Area Circuits (see Resources) to make the circuit board as they had a student special that allowed me to make a single board for a very reasonable price. DipTrace has a 3D rendering tool to show what the completed board will look like ( Figure 1).įIGURE 1. Once all the components were in place, I manually routed the traces. I entered these values into the Properties field of each component. To arrange the LEDs and other components in a precise circular pattern, I created a spreadsheet in Excel to calculate the position and rotation of the components. Then, DipTrace transfers the schematic to the PCB layout module. I played around with a number of PCB design programs and decided to use DipTrace as I found that it could most easily do what I wanted.ĭipTrace has a schematic capture module where I created the schematic for the clock. I wanted to manually route the traces so that the only traces visible from the front of the clock are the Charlieplexed lines, which would be laid out as concentric traces on the front of the board among the LEDs. I decided a PCB would be best to have for the final circuit, due to the large number of LEDs and the need to arrange them and the resistors and diodes in a circular pattern. Then, we’ll wrap it up with a discussion of how the software works and put the finishing touches on our unique timepiece. This time, we’ll expand the LED matrix to run the 182 LEDs that the clock uses and make a printed circuit board (PCB) for the clock. The final two I/O lines will be used to run the alarm buzzer and read the 60 Hz coming from the AC-to-AC wall wart. This allowed us to read the buttons without using any additional I/O lines. We also looked at how to incorporate the reading of four pushbuttons by connecting them to the LED matrix with a handful of other discrete components. Using Charlieplexing, we ran those LEDs with only four I/O lines and determined that expanding the LED matrix to 14 I/O lines would enable us to individually control 182 LEDs. In Part 1, we looked at a test circuit that had 12 LEDs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |