Repairing burnt out transformer. Oscilloscope repair.

The Arduino code reading the photo interrupter and stepping the motor:

/*
Reads pulses on digital pin 2 Interrupt (0)
and sweeps the motor left to right one step at a time.
Comments and complaints http://www.nicknorton.net
*/

#include <Stepper.h>

int stepCount = 0;                  // steps the motor has taken
int maxSteps = 70;                  // steps to take before reversing direction
int turnsCounter = 0;               // Miscount and it'll be a nightmare
int stepsPerRevolution = 48;        // steps per motor revolution

// initialize the stepper library on pins 8 through 11 for a unipolar motor.
Stepper motor(stepsPerRevolution, 8,9,10,11);

void setup() {
  Serial.begin(9600);
  attachInterrupt(0, pulseright, FALLING);   //  photo interrupter on interrupt(0)
}

void loop() {
}

void pulseright() {
  detachInterrupt(0); // Stop the interrupt routine from being interrupted.
  turnsCounter++;
  motor.step(1);  // step one step clockwise
  Serial.print("Right step: " );
  Serial.print(stepCount);
  Serial.print(" Turns: " );
  Serial.println(turnsCounter);
  stepCount++;
  if (stepCount == maxSteps) {
                         pulseleft();
                       }
  else
      {
      attachInterrupt(0, pulseright, FALLING);
      }
}

void pulseleft() {
  detachInterrupt(0); // Stop the interrupt routine from being interrupted.
  turnsCounter++;
  motor.step(-1);   // step one step anticlockwise
  Serial.print("Left step:  " );
  Serial.print(stepCount);
  Serial.print(" Turns: " );
  Serial.println(turnsCounter);
  stepCount--;
  if (stepCount == 0) {
                         pulseright();
                       }
  else
      {
      attachInterrupt(0, pulseleft, FALLING);
      }
}

Maplin Electronics no longer sell transformer kits.
At the time of posting this video, transformer kits are available from:
http://livinginthepast-audioweb.co.uk

Comments

Hi Nick This may seem a bit

Hi Nick This may seem a bit random however I have an APC ups smt1500rmi2u which has developed a fault nobody local to me (Leeds) seems interested in even taking a look at it you seem very knowledgeable with electronics and wondered if you were interested in taking a look at it I cant seem to find a private email address for you so i have had to post here. Lee

Hi Lee, with my current

Hi Lee, with my current commitments, I won't have time to look at this for you sorry.

Very informative video! Its

Very informative video! Its been many years since i have wound a power transformer. My biggest one was for the B+ of a 500 watt homebrew transmitter and another one for a 10 amp filament transformer. Do you have information on how you built the coil winder and will it wind small rf coils? Thanks for posting this video! Mick Bradford - WB4LSS