Introduction: Pi...In a Single Digit

Ah yes. It has been a long time since I posted an Instructable...well here goes:

It has been a while since I have been otivated to write an 'ible. During this idle time I have been writing, rewriting and editing code as well as designing lots of PCBs.

For my new ible which I have refined the code for I have made the Arduino Uno display pi one digit at a time I only went so far.(depending on how many digits you are willing to copy, paste and edit you can have more or less. )

So, let's build it!

Step 1: Parts, Parts, Parts

You will need:
1 Arduino Uno
1 Single Digit Seven Segment Display (Try to get common cathode. If you don't you will need the transistors.)
7 Transistors (I used these to drive the single digit seven segment. If you got common anode then you need these.)
7 1K resistors( You will need these if you have transistors.)








Definitions:
Common anode: All the pins have the positive lead in common.
Common Cathode: All the leads have the negative lead in common.

Step 2: A Bit of Theory Before Moving On.

A common anode seven segment is a bit harder to use and is less welcome in a world of common cathode. Common anode is reversed compared to common cathode. Therefore, everything is the inverse. On means off and off means on. (see my 'ible on Sinking and Sourcing) Therefore we place a transistor to drive it allowing it to be common anode but we cannot omit the resistor (All 1Kohm on the base pin of the transistor because to prevent the transistors from pulling too much current and burning the ATMega328(Guess how I know this.)

Step 3: Programming.

I tested every pin and wrote the code in a way I would understand. Here is how I did it:

T1=Pin 7=E                                          
T2=Pin 8=D
T3=Pin 9=C
T4=Pin 10=G
T5=Pin 11=F
T6=Pin 12=A
T7=Pin13=B

The T's indicate the transistor numbers like on the page before or the page after this one. The A,B,C,D,E,F,G are standardized seven segment letters. Above I have standardized seven segment letter names for your reference. 



Upload this code to the Arduino:


Step 4: Build.

Although there may not be resistors in my pictures they are certainly a necessity if you have transistors. Resistors are also a necessity if you are using a common cathode display to prevent the LEDs from burning themselves out.

So in the end resistors are essential. 

Build according to the schematic. I used a bread board. Depending on my mood I might use perf board or even print a whole PCB...that will be coming soon.


Step 5: Done!

You have now reached completion of your single digit pi viewer! 

You can edit the string to your pleasure...your birthday, your name...whatever you want!

I hope you enjoyed this Instructable.

Leave a comment if you have any questions or comments.

Comments

author
jensenr30 (author)2012-09-18

very cool!
keep it up!

author
amandaghassaei (author)2012-08-31

fun idea, I'd love to see you go for it and fill the arduino's entire 30kbytes of memory with pi!

author

Thanks! I actually tried doing more (like triple the amount) and it wouldn't compile...or upload.

I actually used parts of your POV instructable (if statements) to go and speed up the code writing process.







author

try storing the string in the flash memory:
http://arduino.cc/en/Reference/PROGMEM

author

Store it on an SD card with the SD Card Shield.

author
schumi23 (author)2012-09-03

I wonder... would it be possible to have the arduino calculate pi - thus making it never ending?

author
blinkyblinky (author)schumi232012-09-03

When I saw your comment I laughed because I had just been thinking of the same thing. I thought maybe I could have the Arduino generate triangles so thin they would form a circle when bound. Then it could calculate a pretty exact circumference and probably...wait, that's probably going to take extreme coding and a pretty powerful processor.

No , it probably wouldn't be possible.

But if you're willing to take up the challenge by all means go ahead. If you do ending up making something be sure to share!

author
schumi23 (author)blinkyblinky2012-09-04

After posting that comment, I thought a bit, and read the wiki article on pi - and now think that it wouldnt be possible :)

About This Instructable

3,164views

4favorites

License:

Bio: I love building things and taking pictures. If you want me to build something...I'm open to ideas. My motto? "If you want something ... More »
More by blinkyblinky:Keeping Up Appearances with ChindoguA Complete Beginner's Guide to Raw Files And Raw ProcessingHypercard - An Impossible Paper Object
Add instructable to: