Next project time!
This one is rather simple and easy, just to introduce me to the arduino and its capabilites. A couple of analog panel meters to show realtime cpu and ram usage, then have the data logged onto an SD card.
I’ve got the panel meters and have tested them. How they are gonna work is a simple PWM signal with the duty cycle adjusted to current load sent from the computer via serial port. The panel meters I have chosen are 0->1mA. So some calibration circuitry is needed so i can adjust the voltage and get a linear approximation of the data from the cpu. Now, this is rather simple.
What we want is 1mA of current being drawn when the PWM is driven to 100% duty cycle, and 0 mA when the PWM duty cycle is 0%. So, back to basics. Remember V=IR? I surely do. Bit of gypsy magic and we get R = V/I. Lets just assume the panel meter has no resistance, when it actually does, and calculate a “Perfect” resistance needed to get out 1mA.
R = 5v/1*10^-3
= 5kohms.
Tweasy. All we have to do is add a 5kOhm resistor in series between the PWM pin of the arduino and the panel meter. If you want to check that the response is linear as the voltage varies, compute I = V/R for several points and plot. You will notice it is a linear relationship*. Just what we want.
Plug it into the arduino, and you will find that it works! Fancy! Maths is again useful! <- Much to my dismay…
Nexzt, I’m gonna be working on the data logging to SD card. Now this would be MUCH more useful if I could find a particular library called uFat2 made by SirMorris. But alas, his code host no longer has it and I cannot find links to it anywhere else, So if any readers out there have it or can find it, let me know! Please!
Peace out.
*Technically, Ohms law is not a linear realtionship, as temperature varies, the line becomes less and less linear. For most applications though, we can ignore that…

Some comments on SirMorris’s website point here: http://groups.google.com/group/micro-hacker
And say to click “Download Files”/ or go here: http://groups.google.com/group/micro-hacker/download?s=files
Ahh! Yes! Thanks heaps Lord_DeathMatch! The project moves forward!
Yes, and thank you for pointing out the Bluetooth module used in your Bluetooth media remote which I am about to order one of
To be even more specific for you:
http://www.ebay.com.au/itm/Bluetooth-Modem-Breakout-UART-serial-RX-TX-/160419132969?pt=BI_Electrical_Equipment_Tools&hash=item2559b9b629
Same device, different listing, should still be the same. Also, did the baudrate come pre-configured at 9600bpm?
Yeah, if I recall correctly, 9600, No Parity, 8 bits, 1 stop bit. Don’t hold me to that. But the baud rate was deffinatly 9600. Can be changed using the AT commands anyway.
Righteo, thanks, that appears to be the default baudrate on my micro of choice anyway, so there will be no need to modify what python and basic (a PICAXE, C’s beyond me) code i have already written; though i might have to learn a few things from your code…
How much W does the 5 kΩ transistors need to be able to handle?
Let’s calculate it!
So Power(Watts) = Voltage*Current (P=VI). We know we are using 5V and our max current draw is 1mA, we configured that using the resistor.
P = 5*0.001
= 0.005 Watts
So our max power loss across the resistor will be 5mW.
In this case, a 1/4W resistor (standard resistor) will suffice.
Hope it’s all coming together nicely.