Recent Changes - Search:



edit SideBar


Our new Elmo brain pcb contains the following:

  1. Atmega 168 microcontroller, Digikey# ATMEGA168-20PU-ND Powered from a 5V voltage regulator. To use the Arduino software and hardware interface to program this microcontroller, we burned the bootloader using the AVR ISP mkII.
  2. 16MHz crystal oscillator, Digikey# 300-8499-ND. This is the microcontroller's clock. We really should switch to a lower frequency oscillator to save power -- see datasheet p. 305, 307, and 317 -- but using a frequency other than 16MHz requires us to adjust the bootloader, which is getting deeper than time allows... save this for future revisions.
  3. Two 18pF capacitors, to set the crystal oscillator frequency. Mouser#
  4. L293D H-Bridge motor driver, Mouser# 595-L293DNE. Output stage is powered direct from Elmo's batteries. The logic stage is powered from a 5V voltage regulator.
  5. LM7805 in TO-220 package, Mouser# 512-LM7805CT. 5V voltage regulator. No -- the TO-220 package is too big, must use TO-92 package LM78L05: Mouser# 512-LM78L05ACZX. Max continuous current output is 100mA, but this is OK because the Atmega168 draws approximately 20mA. See datasheet p. 305. Assumng a 20mA load current and a 4V drop across the LM78L05 (9V - 5V = 4V), the LM78L05 will dissipate 80mW. It's good up to 750mW (datasheet p. 2).
  6. uA78M33 in TO-220 package, Mouser# 595-UA78M33CKCSE3. 3.3V voltage regulator. No -- the TO-220 package is too big, must use TO-92 package: this part is not available in a TO-92 package, so go with the LM317L adjustable voltage regulator, Mouser#512-LM317LZX. Max continuous current output is 100mA, but this is OK because the XBee Series 2 (not-pro version) only draws 40mA when transmitting, 15mA when idle. See datasheet p. 7. Assuming a 40mA load current, and a 5.7V drop across the voltage regulator (9V - 3.3V = 5.7V), the LM317L will dissipate 230mW. It's good up to 625mW (datasheet p. 2).
  7. XBee Series 2, Digikey# XB24-BCIT-004-ND (this is NOT the pro version). Powered from a 3.3V voltage regulator. The PRO version can transmit up to 300', but it requires 295mA to do so! Our non-pro version has a transmit range of 133' (which is more than enough for us) see datasheet p. 6, and draws only 40mA. This allows us to use a 3.3V voltage regulator with a small package.
  8. 28-pin DIP socket, Mouser# 535-28-6518-10. For Atmega 168.
  9. 16-pin DIP socket, Mouser# . For L293D.
  10. 10-pin SIP socket, 2mm pitch, Mouser# 855-M22-7131042 -- No, buy from Sparkfun: Sparkfun#PRT-08272. Need two of these for the XBee.
  11. 2-position, 0.1" pitch, female header sockets, Digikey# S7000-ND. We use three of these: one for the power in from Elmo's batteries, one for the arm motor, and one for the leg motor. This socket is similar to the type on the Arduino board. It allows us to connect/disconnect Elmo's wiring. It's low-profile and cheap (compared with doing this using IDC connectors).
  12. 5-position, 2mm pitch, header pins, Mouser# 538-48107-0520. We use two of these: one for plugging in the ribbon cable from Elmo's arm sensor, and the other for plugging in the ribbon cable from Elmo's gyroscope sensor.
  13. 6-position, 2mm pitch, header pins, Mouser# 538-48107-0610. For plugging in the ribbon cable from Elmo's leg sensor.
  14. Possible part (if we need it, and if it can fit on the board): 8-bit parallel-in, serial output, CMOS shift register, Mouser# 595-CD4021BE. Powered from a 5V voltage regulator. This part frees up five inputs: the arm and gyroscope sensor outputs are read as one 8-bit word, and the Atmega 168 uses three pins to pull this data out of the shift register. Note: there is really no space on the board for this part, and we don't really need it because we can sacrifice a few of the gyroscope connections. As it is, fitting all parts on the board using all through-hole components is going to be an interesting challenge.....

The pcb has to fit within Elmo's head: 2-11/16" x 1-3/4" (it's actually less than this because the original pcb is not exactly a rectangle -- it's shaped sort of like a piece of toast). The pcb artwork is drawn as if looking into Elmo's head from the front, so that the "bottom" is the side of the board that you see when you remove Elmo's back. Components on the "top" have about 1" of head room, but on the "bottom" only .49" (in the center) to .25" (at the edges). Make sure XBee indicator LEDs, XBee, and reset switch are inserted on the "bottom." The XBee has to go on the bottom simply because there's no room to put the XBee and the two ICs on the same side. The LEDs and switch have to go on the bottom so that they are accessible without removing the pcb. All the other components go on the top side of the pcb, including the sockets and headers for motor, sensor, and power connections. Although it would be easier to connect/disconnect these wires if they were mounted on the bottom side, there is not enough headroom on the bottom.

The pcb is mounted in place by three screws. Screw holes are .110", and the screw head diameter is .210"

Novembver 24, 2008:
It's done!! It wasn't as hard as I thought it would be, though I still doubt that I could squeeze another IC on there. I laid out the board in ExpressPCB, and named it ElmoHack. The board is 9.9 square inches. If we had two and a half weeks to spare, we could get 50 boards production service (i.e. with silkscreens) for $300! But since our deadline is Dec. 13th, and we need to do a test run before placing the final order, we're going with the standard service (i.e. no silkscreens). 2 boards standard service is $85. But it gets much cheaper in larger quantities: 24 boards standard service is $180. We're not going to order more than 24 boards because that requires an extra day for manufacturing, and we need to get this test run in our hands BEFORE the Thanksgiving holiday.

December 1, 2008:
The boards arrived on the 26th. We soldered up a board and it fit inside Elmo (yay!), but it didn't work!!!
Troubleshooting: we disconnected everything from the board except for power. We tried a simple "flash-an-led" program, and that didn't work either, so we concluded that the Atmega168 isn't entering the loop() part of the code.

Voltage regulation problem:
We noticed that the LM78L05 (TO-92) voltage regulator output only 4.88V, but would output 5V if we removed the Atmega168 from the board. We figured it was a bad part, so we desoldered it, and replaced it with an LM7805 (TO-220) voltage regulator. It behaved the exact same way!!!! So something is very wrong with my voltage regulator circuit. But there's not much to the voltage regulator circuit:
Pin 1 is the input voltage from the batteries (about 9.5V),
Pin 2 is ground,
and Pin 3 is the +5V output.
The datasheet calls for a .33uF cap at the input, and a .1uF cap at the output, but I thought the caps were unnecessary if your input power source is just batteries. That's what I get for not breadboarding things before making the pcb :(
I'll try it out with caps on a breadboard tomorrow.

Adrianne ordered all the electronic parts for 50 Elmos (see Google Docs Spreadsheet "Parts for Test PCB". They'll arrive at the lab on Thursday. As long as we place our final PCB order by next Monday, we'll be OK for our Dec. 13th Assembly line.

Dolu came by today. Looks like he'll start working with us on Monday.

December 2, 2008:
Very embarassed -- the voltage regulator MUST have a bypass capacitor at the input. It's not for noise -- it performs some essential function, so it's necessary even if you're running off a battery. The bypass capacitor at the output just helps with transient respsonse, so it's not important unless you're switching large loads on and off quickly. I did a quick test just connecting up an LM7805 and a couple of LEDs. With a 0.1uF bypass capacitor at the input, and 9.5V from a power supply, the voltage regulator output 4.98V. Without the cap, the output dropped to 4.77V. Interestingly, below about 6.5V, the voltage regulator outputs about Vin - 1.5V whether you have a bypass capacitor or not, and the microcontroller works in this range, even though the output is less than 5V. Take a look at the simplified schematic in the LM7805 datasheet to shed some light on this later....

For the six boards that we have, I'm just going to solder a .1uF cap "in the air" across the input and ground leads of the LM78L05. I'll fix the pcb layout to include this cap before we place the final order order of 50 boards.

Edit - History - Print - Recent Changes - Search
Page last modified on December 02, 2008, at 09:14 AM