Well, life is still not on a good keel. I picked up at Fry's a proto shield, and some optocouplers. So the world keeps spinning and I am using a software controlled power-supply

I don't have a formal sketch but this is what it will do:

Code ?

setup () {

     int relay[] = { pin2, pin3, pin4 };

     int sscr[] = { pin5, pin6, pin7};

     int lamps[] = { pin8, pin9, pin10, pin11 };

     int TRUE = 1;

     int ON = 1;

     int OFF = 0;


     int part;

     for ( part = 0; part < 3; part++ ) {

         relay[part] = ON; }

     lamps[3] = ON; // CPU IS UP}


loop () {

    for ( part = 0; part < 3; part++ ) {

         if( Vmax() == TRUE ) {

             sscr[part] = ON;


             relay[part] = OFF;

             lamps[part] = ON;}}


    return; }


void idel() {

    // just keep awake;

    do {

         delay(60000);  // this is a sixty second sleep for ever

         while (TRUE);  }}


int Vmax() {} // have to check on the code still.

When the unit is turned on, by depressing the power switch in, that powers up the auxiliary power which provides 12vdc, 9vdc, 24vdc via voltage doubler.

  1. The Arduino will come up and wait for about 5 seconds (to stabilize power)
  2. The Arduino will turn on relays 1 through 3 to apply to a resistive load to the toroids.
  3. The Arduino will loop through each toroid by using a counter in a for loop.
    1. The Arduino looks at AC voltage input (analog) and waits for max voltage when it sees the start of the drop
    2. The SSCR is now turned on.
    3. The Arduino waits 5-10 seconds
    4. The Arduino releases the bypass relay.
    5. The Arduino lights a status lamp
  4. fins but not done.


I have a problem deriving Vmax AC with an analog input anybody out there knows how? Using a digital pin an optoisolator will not work as I get very small pulses at z-cross. So I have to do it the hard way. I guess I will use a wall-wart taken apart, as I don't need the case or plugs. and I will use a small resistor to limit voltage and current to about 4 volts ac and apply it to an analog pin.