Introduction: 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:
Attachments
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.
Step 2: Tutorial
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.
Step 3: Errors
Step 4: Final Visualizations
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.