You are on page 1of 7

Food

Living

Outside

Play

Technology

Workshop

Visualizing Current Flow through a Resistor Circuit


by StumpChunkman on January 28, 2013 Table of Contents Visualizing Current Flow through a Resistor Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: Visualizing Current Flow through a Resistor Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3: Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4: Final Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 2 3 4 5 7 7

http://www.instructables.com/id/Visualizing-Circuits/

Author:StumpChunkman

Intro: Visualizing Current Flow through a Resistor Circuit


I tend to help people out when they have electronics projects they want advice on. I have a basic understanding of electronics, and don't really know how electricity works. I had that idea that creating a visualization of the electron flow within a circuit might help me understand better what's going on, and this is my attempt to accomplish that. A few things to understand before you go in, I used electron flow and my interpretation of what's going on within a circuit to make this visualization. If you don't agree with how I displayed things, that's totally fine, and a whole lot of people would probably agree with you. There's a whole bunch of conflicting arguments about what's going on at the electron level since we can't see what's going on there, that's why I made this, and that's why no one can be right. Personally, I ascribe to Kenn Amdahl's view of tiny green men who just like to party. It actually makes the most sense to anything I've read. Here's a quick video of the finished application:

link: http://youtu.be/rg8dMVCfwSM

File Downloads

ResistorCircuit.zip (31 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'ResistorCircuit.zip']

Step 1: What you need


You only need a couple of things to you this, and chances are, if you're reading this (and not on a moblie device), you're already well on your way to having all the materials. What you'll need: Computer capable of running: Processing (which also needs the ControlP5 library installed) Zip files (linked to in intro step). (This program works as of versions 2.04 of Controlp5 and 2.0 Processing.) Basically, if you have a computer, you're good.

http://www.instructables.com/id/Visualizing-Circuits/

Step 2: Tutorial
In order to run the application, download Processing, ControlP5, and the zip file in the intro step. Install Processing, then install the ControlP5 library according to your systems requirements . Finally, once everything is installed, and you've run Processing and know where your sketch folder is, you're ready for this sketch. Unzip the ResistorCircuit.zip file (linked in the first step) to your sketch folder. Open Processing, in the file drop down, select Sketchbook, and then select ResistorCircuit. All files should be opened. You can click the run button to start the code. When you first run the code, you'll be presented with a tutorial on how the interface works. You can look at the image over text for further explanations.

Image Notes 1. Guess what this does. 2. Contains basic information on what's happening in the circuit. 3. All the controls needed to interface with the program. 4. Circuit Selections menu. Lets you choose between a series and parallel circuit. 5. Main window.

http://www.instructables.com/id/Visualizing-Circuits/

Image Notes 1. Default window once tutorial is skipped. Options for both series and parallel present in menu below.

Step 3: Errors
I've done my best to anticipate any errors that might come up and pre-code for them. There is still one issue in the program, I didn't want to create another set of code for the tutorial circuit, so one of the resistors changes all of the circuit's information but isn't represented in the visualization. It was around this point that I got a bit tired of programming.

Image Notes 1. Switch connects circuit.

Image Notes 1. Power Control

http://www.instructables.com/id/Visualizing-Circuits/

Image Notes 1. Battery ground is connected directly to power, you blew up the battery, you should add some resistance.

Step 4: Final Visualizations


As I stated in the intro, I decided to use an Electron Flow model to visualize the current flow. If it makes you feel more comfortable thinking in a Conventional Current view, just reverse everything you see in your head. Electrons are represented by the tiny dots flowing through the circuit. Wattage is displayed by color of the resistor. I set the rating of the resistors to 1/4 watt. Once they reach 1/4 watt they become bright red. There are variations of red and it isn't until it's at it's brightest that the resistor is blown out. Current is displayed by flow of electrons. Electrons flow from the negative side of the battery to the positive side. Voltage is displayed by how far the electrons are able to spread from the wire. I saw voltage as excitement, and excitement I decided would best be represented by bouncing off of the walls. The more voltage there is through one leg of a circuit, the farther the spread of electrons. Differences between current and voltage in a series circuit vs a parallel circuit can be easily seen here, and can be further displayed by clicking back and forth between the series and parallel circuit selections. The details menu shows total Wattage Amperage and Voltage being used in the circuit. It also shows percentage of that amount present on each resistor. The percentages are associated with the resistor color bars. Final Thoughts: Overall this project was a lot of fun, and there's a lot more that I'd like to add to this application, but I really don't want to code anymore, which means this is probably it's final state. I hope you like! Also, I haven't printed the code in any step for two reasons. First, it's linked in the zip file in the first step. Second, and more importantly, there is a lot of code, and it wouldn't look good.

http://www.instructables.com/id/Visualizing-Circuits/

Image Notes 1. More Wattage then should be put here, the resistor might explode.

Image Notes 1. R1 color 2. R2 color 3. R3 color 4. Background colors associate R1, R2 and R3 with values in the details section below.

Image Notes 1. Only one color for series as Current in series in constant throughout the circuit.

http://www.instructables.com/id/Visualizing-Circuits/

Image Notes 1. One color for voltage, as voltage in parallel doesn't change.

Related Instructables

How electricity and electronics works by rickharris Electronics For Dummies: Resistors by Beta Mode

Electronics for Absolute Beginners, Chapter 2 by elektrobot

Introduction to the Light Emitting Diode Using Snap Circuits (Photos) by KRA5H

Install an LED in a Tone Generator Circuit To Visualize a Square Wave (Photos) by KRA5H

A Complete Guide To Basic Electronics. by Cew27

Advertisements

http://www.instructables.com/id/Visualizing-Circuits/

You might also like