The Mechanical Vivarium of Dr

download The Mechanical Vivarium of Dr

of 3

Transcript of The Mechanical Vivarium of Dr

  • 8/10/2019 The Mechanical Vivarium of Dr

    1/3

  • 8/10/2019 The Mechanical Vivarium of Dr

    2/3

    01/01/2015 The Mechanical Vivarium of Dr. Iguana

    http://www.dr-iguana.com/prj_LEDactus/LEDactus_synchronous_dc_driver.html 2/3

    To measure the spokes I used a small optical interrupt switch. This is combination of a LED onone side of a small gap, and a phototransistor on the other. When the gap is unobstructed (clear

    plastic) the LED shines on the phototransistor and it conducts. This pulls the line going to the PICchip low (logic 0). When the gap is obstructed (spoke is in the gap) the phototransistor does notconduct and the line going to the PIC sees 5V volts (well mostly, read below).

    Here is the circuit I used to contol this switch.The LED requires about 70mA of current. At70mA the LED has a drop of about 1.2V so theresistor must drop (5V - 1.2V) 3.8V. SinceR=V/I we get 3.8V/0.07A = 54ohms. The

    closest resistor in my parts box was 51ohms.

    If the variable resistor on the sensing side is set to a high value near 5Kohms, the switching time for the phototransistor becomes slower but we get a large voltage swing from 5V when gap is

    blocked to near 0V when the gap is clear. If the spoke on the encoder wheel is too narrow (lessthan 1mm) or the rotation speed is too fast (greater than 30-40Hz) the circuit may struggle toreach 5 volts while the switch is obstructed.

    As we lower the variable resistance the response time of the phototransistor becomes quicker butthe low voltage when the switch gap is clear begins to rise. By the time the variable resistance isabout 300 ohms, the PIC no longer recognizes the signal as a logic 0.

    A low rotation speeds (~40Hz), my firstencoder disk sufficed. But as I pushed therotation speed upwards, the drive would losesynchronization. I tracked this back to the speedat which the optical encoder could switch. It hasa switching time of 10-15ms. At fast rotationsthis meant that my 1 mm spoke would generatea progressively shorter rounder peak until finallythe PIC, that was monitoring the signal, could nolonger recognize it as a TTL pulse. The solutionwas to thicken the lines. I decided to split the 5degree arc into two even halfs; one half clear and one half black. Now the drive easily spinsup to 100Hz.

    Below you can see the schematic of the driver circuit. I've wired up all four darlington pairs

    although we only need three for this project.Perhaps we'll driver a unipolar stepper motor later on. The 1K pullup resistor on the ENableline turns the driver chip off when no pic is attached. The 33V Zener diode attached to theclamping outputs is there to provide a path for the current in the inductive motor coils when weshut the darlingtons off. Without this emergeny pathway, the current could 'pile up' at the L6220chip when we shut off a darlington and exceed the 35V maximum of the chip. This would be badin electronics parlance. The large capacitor shown in the circuit is not needed for this project. I'malways trying to plan ahead though. Finally, the V+ is typically about 12V. Provision is made to

    power the microprocessor board from this source although I'm not entirely sure that this is a goodidea.

    Synchronous Motor Driver

  • 8/10/2019 The Mechanical Vivarium of Dr

    3/3

    01/01/2015 The Mechanical Vivarium of Dr. Iguana

    http://www.dr-iguana.com/prj_LEDactus/LEDactus_synchronous_dc_driver.html 3/3

    Finally here is the PCB for this circuit. I'll try to make all the projects fit on the same 2" x 1.25" boards.

    Hover over the image above and use "Save Link As" (Firefox) or "Save Target As" (MSIE) tosave the full size PCB layout to your computer.

    Next Section: Synchronous Motor - Making it Spin

    http://www.dr-iguana.com/schematics/synchronous_driver_pcb.bmphttp://www.dr-iguana.com/prj_LEDactus/LEDactus_synchronous_make_it_spin.html