Show Posts
Pages: 1 ... 23 24 [25] 26
361  Forum 2005-2010 (read only) / Exhibition / Chart recorder on: November 28, 2009, 03:36:52 pm
This chart reflects the discharge process (@1C) of a 1.2V AA battery:

The diagram is obtained using Stamp Plot light from Selmaware.
This freeware can be obtained here:   smiley-wink

Additional code:
#define     CHART             1             // Trend mode

In setup():
#if defined CHART
  delay(200);                                                       //------- Stamplot ---------------
  Serial.print("!TITL Battery tester");  Serial.print(13, BYTE);    // Set window title
  Serial.print(MESSAGE);                 Serial.print(13, BYTE);    // Set Status message
  Serial.println("!PNTS 6000");          Serial.print(13, BYTE);    // Set number of data points to collect
  Serial.println("!SPAN 500, 1500");     Serial.print(13, BYTE);    // Set maxi & mini range
  Serial.println("!AMUL 1");             Serial.print(13, BYTE);    // Set the value to multiply da
  Serial.println("!CLRM");               Serial.print(13, BYTE);    // Clear the message list
  Serial.println("!CLMM");               Serial.print(13, BYTE);    // Clear the MIN/MAX values
  Serial.println("!RSET");               Serial.print(13, BYTE);    // Reset the plot and all data
  Serial.println("!TMAX 3600");          Serial.print(13, BYTE);    // seconds maxi on x axis

in display():
#if defined CHART                                                 //StampPlot data for trending
    Serial.print((int)mVolt);            Serial.print(13, BYTE);
362  Forum 2005-2010 (read only) / Exhibition / Code modification for Version 2 on: November 28, 2009, 03:26:39 am
Code modification for Version 2 as suggested by Alvaro:

getmVolts() should be modified as follow:

int getmVolts()  {
  return int((analogRead(Vpin)-analogRead(Apin))*4.8828125);          // read the battery voltage
363  Forum 2005-2010 (read only) / Exhibition / Re: Smart battery discharger/tester on: November 23, 2009, 12:52:05 pm
Yes, but since you also know V(R2) you can compensate.
Got it: V(bat) = V(A0) - V(A1)   smiley-wink

This is Version 2:
I have also modified D1 and D2 to A1 and A2 to reflect the (analog) type of measurement

Thanks Alvaro

364  Forum 2005-2010 (read only) / Exhibition / Re: Smart battery discharger/tester on: November 23, 2009, 11:32:38 am
Hi Alvaro,

Thanks for the kind words; As your mention, the objective is to measure capacity (mAh) and the influence of current load (mA) on battery behaviour.

If you place R2 between ground and battery (-), then you can more accurately see discharge current.
I do compute mA based on mV between D2 and ground
If I place R2 between ground and battery (-), the battery voltage measured at D3 will be biased, won't it??

I might help here  Send me an email or so if you're interested to test my new serial protocol
:o  :o good job... may be overkill for this application.
I just need to pass one integer every other second
I am developping the project using StampPlot lite
Will report progress this week-end
365  Forum 2005-2010 (read only) / Exhibition / Re: Smart battery discharger/tester on: November 22, 2009, 12:23:50 pm
Oops... forgot the code   :smiley

Here it is
//Battery monitoring      V1      Basic edition
// Copyleft KAS         November 2009

#define     VMIN              700           // Battery protection      Vmin > WMIN
#define     WMAX              2000          // Transistor protection   Wmax < WMAX
#define     LOOP              2000          // loop time (ms)

#define     Vpin              0             // battery voltage pin
#define     Apin              1             // Amp reading pin
#define     RELAY             3             // relay pin

long loopTime = LOOP;
long loopUsedTime = LOOP;
long loopStart = 0;
float mVolt = 0;
float mAmp = 0;
float mW = 0;
float mAmpH = 0;
long loopCount = 0;
boolean testOn = false;

void setup()  {
  pinMode(RELAY, OUTPUT);
  digitalWrite(RELAY,HIGH);                     // Close relay
  testOn = true;

void loop()  {
  loopStart = millis();
  mVolt = getmVolts();
  mAmp = getmAmps();
  mW = (mAmp * mVolt) /1000;
  mAmpH += mAmp * loopTime / 3600 /1000;
  if(testOn)    display();
  else          while(1);                    // Loops forever
  testStop(VMIN, WMAX);

  loopUsedTime = millis()-loopStart;
  if(loopUsedTime < LOOP)         delay(LOOP - loopUsedTime);
  loopTime = millis() - loopStart;

int getmVolts()  {
  return int(analogRead(Vpin)*4.8828125);          // read the battery voltage

int getmAmps()  {
  return int(analogRead(Apin)*4.8828125/0.47);      // read the Amps

void display()  {
  Serial.print(loopCount/(60000/LOOP));                Serial.print(":");
  if(((loopCount%(60000/LOOP))*LOOP/1000)<10)          Serial.print("0");
  Serial.print((loopCount%(60000/LOOP))*LOOP/1000);    Serial.print("    ");
  Serial.print((int)mVolt);                            Serial.print(" mV   ");
  Serial.print((int)mAmp);                             Serial.print(" mA   ");
  Serial.print((int)mW);                               Serial.print(" mW       ");
  Serial.print((int)mAmpH);                            Serial.println(" mAh");

void testStop(float Vmin, float Wmax)  {
  if((mVolt < Vmin)||(mW > Wmax))
  {  digitalWrite(RELAY,LOW);                      // disconnect tested battery
     testOn = false;
366  Forum 2005-2010 (read only) / Exhibition / Smart battery discharger/tester on: November 20, 2009, 09:47:50 am

Some (most) of us are P*R**L*X renegades  smiley-wink
During this Dark Age, I built a battery discharger using a 12V lamp as resistive load. This was the good old time when an Analog Input had to be emulated through an RC circuit...
The purpose of such a device is to evaluate the actual capability of a AA (R6) battery, in term of mAh
This smart version is based on an electronic load, with fixed/adjustable discharge current.

Here it is:

Smart battery discharger/tester diagram

The NPN transistor acts as a variable resistor
Current is sensed through a shunt resistor; the corresponding voltage is fed back to the inverting input of an OpAmp configured as a comparator. The non inverting input is set at a reference voltage value through an adjustable voltage divider.
In an effort to have both input at the  same level, the OpAmp will output the adequate signal which is fed to the NPN transistor base
To avoid full depletion of the battery, a relay disconnects the battery below 500mV. This sub miniature relay is directly driven by the Arduino
I used TIP41C and LM324, but any GP OpAmp and NPN transistor will fit the bill; just make sure that the max allowable collector current is over 2 Amps.
Volts and Amps are acquired through AI0 and AI1, mAh are computed by integrating Amp over time

Breaboard implementation

Caution: This device is designed to convert electric power to HEAT  :o
The power dissipation can be calculated, or simulated in LTSpice
according to datasheet, the TIP41C transistor can dissipate up to 65W. Don't take the info for granted; this value assumes that collector temperature remains at 25°C which is unrealistic.
For more than a couple of Watts, install a suitable radiator on the component.
To avoid destroying the component it is advisable to limit max power within the code

LTSpice simulation       X axis = potentiometer wiper relative position (0-100%)

Arduino code is straightforward. The main point is to create a fixed time loop for accurate mAh integration.

What I learnt on batteries:
Not all batteries are created equal; I get results from 662 to 2764 mAh (all AA size)
Ageing does reduce battery capacity; some batteries where discarded after test
Internal resistance is a real issue, 1500 mAmp will definitely bring voltage down, below 1 Volt.

What I learnt as a bonus:
NPN Bipolar Junction Transistor in the active region, versus saturation region
Operational amplifier (comparator configuration)
Circuit simulation using LTSPICE (a magic world)
and... learning to post on a message board

Additional readings
TIP41C datasheet:
LM324 datasheet:
LTSpice Homepage:
LTSpice Tutorial:

Next steps
- Add some decoupling capacitor (should I ???)
- Take into account Base/Emitter current in calculation
- Use a MCP3208 12 bits A/D Converter for further accuracy
- install an LCD display and piezo buzzer for stand alone operation
- reconnect to PC for graphical trends of voltage versus time

Thanks for reading
367  Forum 2005-2010 (read only) / Exhibition / Re: Parametric mixer on: September 19, 2010, 08:13:55 am
Hi Selfonlypath, nice to see you here  smiley smiley

Your work and findings are now too advanced for most lurkers, including me
Anycase keep up your track, I supect it is the right one
368  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: July 12, 2010, 12:42:34 pm
I have no clue if ZPE can be extracted or even exists, but I can admit that all energy has not been identified and accounted.
Therefore this energy could be extracted (not created) without violating conservation of energy and/or thermodynamic laws.

Oh... one more point
Some centuries ago, a person trying to work on, say... electricity, would have been considered as a witch and sentenced to be burnt at the stake
If you are looking for "intellectual shocks" , read some quantum theory articles

We all now that deviating from mainstream ideas can't turn out to be difficult at best, and sometime to be dangerous...
369  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: December 15, 2009, 04:04:40 pm
Hi Selfonlypath,

Thanks for your prompt response
I have difficulties to find  IL610 and MCP1403 in my (our  smiley-wink) country
Please let me know where you sourced those parts

370  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: December 14, 2009, 04:12:40 pm
Hi selfonlypath

For your video #7, you implemented the AN25 opto / IRF840 FET  combination
what is your current setup for video #8 ???
Do you use IL610 isolator ?? any FET driver ?? which Mosfet ??
What about a IL610 / Logic level Mosfet combination ??

Thanks for your help
371  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: November 25, 2009, 05:46:14 am
Thanks for the code, I will experiment with it
Can I assume it is valid both for Duemilanove and Mega  ??

Keep up the good job   smiley-wink
372  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: November 24, 2009, 01:07:59 pm
Thanks for your prompt response

Well, I had to train myself hard on this domain because not too much info about this so far which is why I started my YouTube channel plus also a private blog
I have seen the 7 videos; You really should build a web site, I strongly suspect that, beyond plasma technology, you have a lot of other ideas to share  smiley-wink

The trick is to control pulse length, frequency of pulse length and voltage
Would you please let us have a relevant Arduino code snipet for the PWM management ??

373  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: November 24, 2009, 04:09:24 am
Please note that if you're confortable in building mosfet drivers and opto-isolators, just buy a plasma globe made in China (really cheap for 5" or 8" globe), remove its electronic board to only keep it High Voltage transformer & the globe. After you just need to PWM pulse

Would you care sharing with us the basics for producing the adequate signal to feed a small plasma ball, from an Arduino ?
Any pointer to a Web site ??
A simple circuit with only one mosfet should be adequate
Do we really need opto's for such a small device ??

TIA   smiley-razz
374  Forum 2005-2010 (read only) / Exhibition / Re: Ball Balance Machine II on: May 02, 2010, 09:51:31 am
Hi 0zimbra0

Welcome to the forum, thanks for being here  smiley  smiley

I noticed that you connections with the servos are made of plastic material, why is it so?
I would possibly expect rigidity issues with this design

Thanks for this very creative project
375  Forum 2005-2010 (read only) / Exhibition / Re: Ball Balance Machine II on: April 24, 2010, 03:32:41 pm
ABC-King, TchnclFl, and everybody

I suggest you leave a message on youtube
We need this guy here  :smiley :smiley
Pages: 1 ... 23 24 [25] 26