ProPOV Day 1

16 May, 2011

Today was day 1 of capstone week and the ProPOV build! It was my designated day for schematic capture. I completed the schematics to the best of my ability, and I will elaborate on them in this post.

The Bill of Materials

I chose to base my ProPOV off of the Arduino, so I could leverage the powerful development environment it offers. Accordingly, the whole clock runs on an Atmel ATmega328P-AU (the 8-bit microcontroller with 32KB of program flash and 8 DACs). The real-time portion of the clock uses a Maxim/Dallas DS1307 RTC with I2C interface.

Keeping things compact is important, so the backup cell for the RTC is an Energizer CR1632 3V coin cell. I found a surface-mount battery holder for 1632s on DigiKey, so it will be easy to install one.

Below is a tentative list of materials for the project; I will nail down the quantities once I’ve built the thing.

Index Quantity Part Number Description Ind. Price Tot. Price Supplier Datasheet URL Notes
1 1 ATMEGA328P-AU MCU AVR 32K FLASH 32TQFP $4.87 $4.87 Digi-Key Atmel
2 1 XC1282CT-ND CRYSTAL 16.00MHZ 20PF SMD $0.56 $0.56 Digi-Key ECS Crystal
3 10 PCE3915CT-ND CAP ELECT 10UF 50V VS SMD $0.44 $4.40 Digi-Key Panasonic
4 10 PCE3912CT-ND CAP ELECT 1UF 50V VS SMD $0.45 $4.50 Digi-Key Panasonic
5 1 AP1084D50LDICT-ND IC REG LDO 5A 5.0V TO-252 $1.52 $1.52 Digi-Key Diodes, Inc.
6 4 568-1483-1-ND IC SHIFT REGISTER 8BIT 16SOIC $0.31 $1.24 Digi-Key NXP
7 10 RHM10KKCT-ND RES 10K OHM 1/4W 5% 0805 SMD $0.14 $1.42 Digi-Key Rohm Semiconductor
8 10 RHM220AECT-ND RES 220 OHM 1/4W 1% 0805 SMD $0.23 $2.29 Digi-Key Rohm Semiconductor
9 2 P12932SCT-ND SWITCH LT 6MM 50GF H=3.1MM SMD $0.30 $0.60 Digi-Key Panasonic
10 10 478-1268-1-ND CAP CERM 22PF 5% 200V NP0 0805 $0.22 $2.20 Digi-Key AVX
11 1 CR1632 Energizer Lithium 3V coin cell $4.49 $4.49 Walgreens
12 1 728-1003-1-ND CRYSTAL 32.768KHZ 12.5PF SMD $1.05 $1.05 Digi-Key Digi-Key
13 1 BU1632SM-JJ-GCT-ND HOLDER COIN CELL 1632 GOLD SMD $0.65 $0.65 Digi-Key MPD Choose one of the battery holders.
14 1 BH600SM-G-ND HOLDER COIN CELL 16MM SMD $1.19 $1.19 Digi-Key MPD
15 1 620-1021-1-ND IC SENSOR HALL EFFECT SOT23W $1.58 $1.58 Digi-Key Allegro Microsystems
16 1 469-1004-ND MAGNET 1/4”DIA X 1/8”THICK $0.30 $0.30 Digi-Key Photo: Digi-Key
17 1 DS1307Z+-ND IC RTC SERIAL 512K 8-SOIC $3.72 $3.72 Digi-Key Maxim IC
18 1 ??? 100PCS,0603 Ultra Bright SMD, White LEDs, 500mcd $9.39 $9.39 eBay
19 1 ??? 100 pcs SMD Chip Surface Mount 0805 Resistor 100 ohm $3.50 $3.50 eBay
Total $49.47

The circuit is conceptually simple, but its constricted form factor complicates the design quite a bit.

The Schematics

So far, I have four schematic modules:

  1. The CPU, including the AVR, the programming headers, and some supporting passives
  2. The LEDs, including all the LEDs and shift registers, resistors, and capacitors to support them
  3. The Peripherals, including the Hall effect sensor, IR phototransistor, and real-time clock
  4. The Power, including the regulator and capacitors

Each of these modules is logically isolated, and they all connect via nets with overlapping names.

The CPU Module

The CPU Module revolves around some core requirements:

  • Must be compatible with Arduino
  • Must be fast enough to write to all the LEDs enough times during each revolution
  • Must be surface-mount

For these requirements I chose the ATmega328, in a TQFP32 (Thin Quad Flat Pack, 32-lead) package. I’m clocking it (get it? eh? because it’s a clock) at 16 MHz with a standard HC49/US crystal in surface-mount style. I’ve included headers for both ICSP (bootloader burning) and FTDI (serial programming through the bootloader). There’s also a reset switch, which pulls the RST line low (it’s active-low) from it’s high-floating normal state.

ProPOV CPU Module v1

The LED Module

The LED module comprises 32 0603 LEDs that I found on eBay for a good price. I didn’t order these from a parts distributor, because they get pretty pricey. You can always find some good sales of factory leftover on eBay, perfect for small-scale hobbyists.

Driving the LEDs are 4 74HC595 Serial-in, Parallel-out (SIPO) shift registers. These registers take a serial input of 8 bits, and when signalled to do so, they expose all 8 stores bits simultaneously on individual output pins. So, you get 8 outputs for every single input line, which is great for saving microcontroller pins.

The 74HC595s are rates just high enough to handle the 20mA per pin each LED requires. To scale the voltage and avoid damaging those LEDs, each one has its own resistor. Because the LEDs are asynchronously on and off, they cannot share resistors; the changing load current would create unsteady voltages.

Each register also had two capacitors, one on its power line and one on the serial line. These decouple the registers from the rest of the circuit and help smooth those pesky voltage spikes.

ProPOV LED Module v1

The Peripheral Module

The clock is of course incomplete without some valid way of keeping time! I chose to use the hobbyist-friendly DS1307 from Dallas/Maxim. It uses a standard 32.768 kHz watch crystal as its reference frequency generator, and communicates with the CPU with I2C (Inter-Integrated Circuits).

I also included a liner/ratiometric Hall effect sensor. This sensor can detect a magnetic field and generates a linear voltage based on the field strength. It will tell the clock when it passes over a calibration magnet attached to the mounting bracket, so the CPU can determine the frequency of revolution and thus how quickly to draw.

Finally, there’s an infrared phototransistor in there. I included it just in case I want to use a TV remote to control the thing later on.

ProPOV Peripheral Module v1

The Power Module

The power module is all based on the AP1084 from Diodes, Inc. The AP1084 is a low-dropout linear voltage regulator (LDO) capable of supplying the necessary current. It can vary its output voltage but I use it in fixed +5V mode. Some big aluminium filter capacitors keep the input clean.

ProPOV Power Module v1

The next step is PCB layout, starting on day 2!