Stupid Pet Trick – IPC

October 17th, 2010 in Electronics by 1 Comment

Phase 3 of 3 for Stupid Pet Trick. While its a fun and games designing and implementing the project, there comes a time for documentation and presentation.

Ladies and gentlemen, my stupid pet trick.

In a nutshell, this is Tic-Tac-Toe, using pushdown buttons to select position, a rocker switch to select player, and a nice middle-of-nowhere reset switch (like most of today’s devices, the reset switch seems to be hidden away from the user).

Equipment for this project is as follows:
  • (1) Arduino
  • (1) 74HC595
  • (2) 74HC165N
  • (10) Momentary Push-Down Buttons
  • (1) Rocker Switch
  • (12) 220-ohm resistors
  • (36) Green LED’s
  • (36) Yellow LED’s
A few notes of some of the equipment:
  • 595 chip – The LED’s are set up via row-column scanning, with the column (cathode) connected to the Arduino, and the row (anode) to the 595 chip.
  • 165N chip – These two chips are daisy chained to each other, with the first chip (#10 pin) connected to the second chip (#9 pin). The clock and clock enable (in the code) share the same value, with the clock (#9 pin) connected to the Arduino and the clock enable (#15 pin) connected to ground. The momentary push-button’s cathode is connected to the chip, with the anode’s to power.

As mentioned earlier, the LED’s set up via row-column scanning. The momentary push-button anode are all parallel connected.


  • I’m having trouble lighting up the LED’s to their full potential. I tried using transistors, and it worked for a small scale row-column scanning (2×2), but when connected to the project (6×3) it made the LED’s dimmer. I’m assuming it might either be an issue with my wiring or with the code.
  • Buttons connected directly the Arduino will not play nicely with 165 chip. Originally the reset button was connected to the Arduino, but this kept reseting the LED’s after each player made a move. I’m assuming its an issue with the code, and not the wiring.

References and sample code used are from Arduino Playground (for 165 chip) and ITP Tutorials (for 595 chip)


Author: ezraezra

I see you looking...

One Comment

I’m glad you got it all working, I know putting all the pieces together can be tricky but you seem to be on top of it. Also, listing the parts you used on the blog is a great idea, same with the circuit diagram.

Tom Gerhardt


Leave a Reply