The IcePIC is the first substantial project I worked on after the my decision to commit to learning digital design and embedded systems. I brushed up on my skills in Altium acquired from my time working as a summer program instructor at McMaster University, and I applied those skills in conjunction (along with a lot of research on the PIC!) in order to begin this project.
I chose the PIC32 microcontroller as a recommendation from Alex. Although the PIC had development boards sold directly from Microchip, I thought it’d be more fun to just build one myself. I began this board design by looking at the PIC itself and what I needed to simply get it working. From reading the datasheets, I added all the necessary decoupling capacitors and figured out a way to put a reset switch in.
After that I added in a circuit for the PICKit programmer. The female header on the PICKit is standard, but the plastic housing extends much wider and could get in the way so I made a mental note to measure it before doing the footprints. I didn’t want to keep the PICkit plugged in all the time when I wanted this thing to run, so I decided to go with USB power.
I used a PTC resettable fuse to limit my current to 500mA in case of any spikes in the connection. I used a variable voltage regulator in one of its typical settings to regulate the voltage to 3.3V, the power supply required for the PIC I was using. I followed the drawings in the data sheet for the voltage regulator I was using to find the typical setup and figured out the bulk capacitors and resistors I needed. What I then learned was that apparently this regulator was pretty popular, so I did a quick search on the web, and found several more designs of this circuit that I used to improve mine. This was super helpful because this was the first time I’ve needed a voltage regulating circuit, and I didn’t want such a crucial part of my board to be incorrect. From the schematic, I broke out the 5V supply too for future projects or if I ever needed to just use this board as a PS.
Some fun things I added are some external crystals, and the breakout accelerometer. I thought it would be a cool thing to play with to learn how to set up I2C. Plus, there are so many things you’d be able to do with an accelerometer on the board.
I stuck the 8Mhz crystal on the board mainly for configuring UART with a more accurate clock source. I’ve read online that for asynchronous clock functions like UART, you need something more accurate than the FRC. Alex suggested including a secondary crystal for low power applications so I did some research and 32kHz seemed to be the most popular one. I don’t have many plans for this yet, but it was an option I wanted to include for the future.
I drew up the component library and footprints all from scratch using information from datasheets (and some of them were hard, they were all written in Chinese and stuff). There was a point where i wanted to just look online for libraries, but decided not to since I’d probably spend more time correcting footprints to my liking anyway. There were several design considerations when it came to making this. I originally had my decoupling capacitors everywhere, then I smartened up and gathered them all around the PIC instead for a capacitor party! Reducing the trace length from the capacitors to the pins they are supposed to decouple for increase their efficiency in filtering out high frequency noise.
I made sure that both capacitors and the 8 MHz crystal was spaced evenly from the PIC and as close as possible to it. This was true for the other crystal as well, but was much easier seeing as the typical operation didn’t require capacitors. I kept the bulk capacitors near the regulating circuit as well. I really wanted to have the auto router do the work, but I quickly learned that it sucks. They had traces off the board area, used more vias that I wanted to use, and had traces beginning at a 45 degree angle. So l basically I just manually routed the whole thing.
This project has since put on hold since I needed a couple things that couldn’t be shipped locally. In the mean time, I have started reading up on I2C and Plib to get started on figuring out how to get this thing up and running when it does get assembled. The whole hardware component of this project, from research and initial drafting to final revision for manufacturing took roughly 3 weeks. This includes between 3 and 6 hours a day on weekdays and 5-6 hours a day on weekends.