Update: Memory usage reporting fixed in Analog PC Stats application

I no longer maintain this project here, please visit the new website for it to download the updated software:

http://swvincent.com/pcmeter/index.html

Thanks! -Scott.


Updated PC Meter application

It was brought to my attention a couple months ago by mnedix that the application I developed for the Analog PC Stats Meter was not reporting the correction Memory usage. I looked into it, and it turns out that the PerformanceCounter I was using in C# ties into the page file, not just physical memory. Apparently it was close enough to the physical memory used when I tested the program initially, because I never caught it. I just released an updated version of the application today that get the actual physical memory percentage used (you can download it here). It utilizes the GetPerformanceInfo Windows API to do this, using code developed by Antonio Bakula. This post at Stack Overflow is what led me to his solution. As the screenshot above shows, it’s now very close to what Windows reports. It’s a little off, maybe due to rounding, I didn’t have a lot of time to dig deeper. It’s close enough, at least for me! In the screenshot, I’ve got a couple textboxes that display physical available memory and total physical memory for troubleshooting.

While I’m posting, I want to point out it’s been approximately a year since I last posted on my blog, but I’m still here. The last year-and-a-half has been quite hectic for me, but I hope to get back into working on projects and sharing them on here soon! I’ve heard from a few people who have enjoyed my posts and used the information I’ve shared to work on their own projects and it’s been great hearing from them. Thanks!

Crate built from upcycled pallet wood

Crate built from reclaimed pallet woodI recently inherited several tools and and pieces of equipment which I hope to put to good use someday. For now though, I live in an apartment, which means much of this stuff is going into storage. Some of the equipment is heavy and prone to damage, so I need a way to protect it. I decided to to build some small crates for these items, since cardboard boxes won’t be strong enough. However, I don’t want to spend a lot of money doing it, and lumber is expensive, so I figured I’d get what I need from old pallets. They’re a popular source of upcycled wood for DIY projects, which means there’s lots of info on how to reuse them, and best of all, they’re free. Last weekend I set about transforming some old pallets into crates and I’m quite happy with the results.

Read More

Install ntop on Ubuntu/Linux Mint

ntop graphIn a previous post, I wrote about how I setup a transparent bridge computer, which is able to monitor all network traffic passed through it. It works great, but to make it really useful, it needs some software that can report on the monitored network traffic in a useful manner. I decided to use ntop for this purpose, as it provides powerful reporting on bandwidth usage, which is exactly what I’m after. I’m not a regular Linux user, so I usually take the easy approach and install software through whatever GUI-based software manager is included. When I did this in Linux Mint however, I found the version available was not the latest, which is 5.0.1. I also learned that ntop has since been replaced by ntopng, which wasn’t available through the GUI. I’ve had some college courses in Linux/Unix administration, so I figured I could handle installing it “the hard way”. In this post, I’ll cover how I got ntop 5.0.1 running on my bridge computer.

Read More

Creating a Transparent Bridge with Linux

Two Ethernet cablesI recently became interested in getting a better handle on bandwidth usage on our Internet connection at work. I wanted to see what I can do for free (or at least very cheap) so I started researching solutions using Linux. Before I can try out any software though, I need a computer that can do the monitoring. I decided to build a transparent bridge or “Machine-In-The-Middle”, which is a computer with two network interface cards (NICs) which are bridged together so that any traffic going to one card is passed through to the other. The bridge computer is installed in between two other nodes on the network, and any traffic passed through the bridged NICs can be monitored by the bridge computer. The bridge creates a slight delay, but is otherwise transparent to the nodes it is connected to.

Most of the information I used to guide me in setting this up came from Bridging Ethernet Connections at the Ubuntu community wiki and this page on how to setup a bridge in Debian from microHOWTO. I thought it might be pretty difficult, especially since I’m not a hardcore Linux guy, but I found it to be surprisingly easy. For the rest of this post, I’ll cover what I did to setup my transparent bridge computer.

Read More

Infrared Pulse Sensor

IR pulse sensor and oscilloscopeLast week, I bought something I’ve wanted for quite some time: an oscilloscope. I’ve been doing more projects where a scope would be useful, such as audio amplifiers, PWM, and AC-DC rectification. And besides that, oscilloscopes are just plain cool. Of course, a scope by itself isn’t much fun, it needs something to measure. Something like an AC sine-wave, or an audio signal, or maybe… a person’s pulse rate? It’s possible, with the right sensor. Sean Michael Regan shows us how in the latest MAKE Weekend Project. I knew right away that it was perfect for trying out my scope. It was a bit of work, primarily because I modified the circuit, but the finished sensor is a lot of fun, and there is a lot of potential for doing more with it.

Read More

cigarMoy Headphone Amp

cigarMoy FrontI built my first cMoy earlier this year, and it came out really great for my first attempt at building a headphone amp. The only problem was that it’s a poor match for the headphones I use.  My headphones are all efficient low-impedance models (Grado, Ultrasone) that don’t require a lot of voltage. What they need is more current. The basic cMoy design doesn’t provide this, at least not with the OPA2132A OpAmp. I soon learned though that several DIYers have built similar “cMoy-esque” amps based on the circuit used in Grado’s RA1 headphone amplifier, which uses an NJM4556 (aka JRC4556) OpAmp, good for 70ma of current per channel. I decided to try building one, and I wanted it to be a little different.  So I built it in a cigar box.cigarMoy inside

There was quite a bit of drilling and cutting involved, and I destroyed a couple boxes in the process. The volume knob is installed where the cigar maker’s medallion was previously located, which had their logo. For the circuit, I took some ideas from both the cMoy and the RA1 clones. I used some pretty high-end hardware, such as the Neutrik locking 1/4″ jack. It wasn’t because I thought it was necessary, but because it was easy to mount to the cigar box.

cigarMoy backThe result? Not very good. It’s unique, and looks interesting, but it doesn’t work very well. I ended up building two of them, and both are very noisy. Copper shielding on the second build helped, but not a lot. It might be all of the wiring needed to connect everything, or just the result of a poorly engineered DIY project based around a potentially “cranky” OpAmp, but it just isn’t a great amp. So I’ve kept the second one as a “show piece” while the first gets picked away at for spare parts. Even though it was ultimately a failed project, I’m glad I attempted it. For my next headphone amp, I’ll be using a professionally-engineered and designed circuit based around a PCB which should help ensure success.

UNKLE77 / Mission Control Transcript

Guns Blazing (Drums of Death Pt.1) has long been a favorite song of mine since the first time I heard it on UNKLE’s 1998 album Psyence Fiction. The song features Kool G rap on vocal duty and some amazing production by DJ Shadow. Most interesting to me though is the conversation that takes place throughout the song between the fictional spaceship UNKLE77 and Off-World Technical Surveillance (also referred to as Off-World Mission Control.) I’ve never seen the conversation included in the song’s lyrics anywhere I’ve looked, so I set out to transcribe it myself.

Read More

PS2 Motor Controller header

Playstation 2 Motor Controller

I’m a big fan of the Playstation video game consoles, so when I learned about the PS2X library by Bill Porter, I had to try it out.  PS2X makes it easy to interface Arduino microcontrollers with Playstation 2 controllers.  After wiring everything up and testing it with the sample program, I set out to find something more interesting to do with it.  The result is a stepper motor that is controlled by the Sony controller.  Here’s a video of it in action:

Read More

pc meter header

Analog PC Stats Meter

I no longer maintain this project here, please visit the new website for it to download the updated software:

http://swvincent.com/pcmeter/index.html

Thanks! -Scott.


Intro

At some point while researching microcontroller projects, I came across several people who had used Arduinos and PICs to drive analog panel meters so they would display computer stats such as CPU load, memory usage, etc.  It immediately struck me as something I just had to do.  Here it is.  My PC meter uses an Arduino microcontroller and receives the stats from a .NET Framework application I wrote in C#.Net.  It’s housed in a plastic enclosure and looks quite professional IMHO.  It was a fun project, and something I think most any computer/electronics geek would enjoy.  I love mine, and I look forward to building more.

Here it is in action:

Read on for details on the parts and tools I used, some info on the process of building the device (and the problems I ran into) and links to download the source code and meter templates.

Read More