User:Jstapko/combolockpick

Write problem/project Goal
design/assemble mounting structure for existing parts,determine status of arduino software built by previous team, and find a way to link solenoid to both arduino and lock shackle. In discussion, other problems have come up, won't detail those now.

My First Task
Investigate ways to control the solenoid with the arudino, without overloading the arduino.

Summary of actual work over first weekend
I had originally planned to use a transistor and low voltage dc to run the solenoid, then changed that plan one using triac to switch ac to the solenoid under arduino control. Ultimately, I ended up using a relay and its associated driver circuitry from a microwave oven. It was a bit disappointing that the microwave used a relay, because a triac would have been able to switch the solenoid faster, but I did actually get the computer to control the solenoid, which was somewhat more progress than I had expected.

Week1 Narrative
I was originally planning to run the solenoid on a dc voltage much lower than the coil's 120 volt rating based on a description of pulling force. During our first project related presentation, our professor expressed a belief that the coil should receive its full rated voltage, so then I started thinking I needed a device that could switch AC line power on its output with only a small dc control voltage from an arduino supplied with the project. The first such device that came to my mind was a triac, because it can switch more quickly than a mechanical relay, which would be desirable for high speed lock checking. From experience dismantling microwave ovens for transformers, I knew that sometimes triacs are used to control the high power portions of the ovens. Coincidentally, I had salvaged a microwave oven from a curbside trash pile two or three days before, and thought that oven to be a perfect place to start searching for a triac. First, I tested the oven because if it didn't work, there could be many problems and it might not be the most efficient use of time to chase a dead part. Finding the microwave to be working normally, I pulled the cover and traced the wiring from the power components to the switching device on the circuit board, which was plainly labeled as a relay. This was disappointing because the mechanical characteristics of a relay limit its operating speed, but the relays, because they were small, seemed they could switch with acceptable speed, and at any rate with a cycle time considerably less than the main solenoid, so the time lost would be small in comparison the the solenoid. I therefore decided to follow the microwave oven controller lead, and disassembled the microwave oven to pull the control board. The control board is a single layer trace type, with traces on one side and discrete components on the other. Great care should be exercised when handling the control board, first to avoid damaging delicate components such as the vacuum fluorescent display, and secondly because full ac line voltage is present on the board itself. I first identified the power supply section of the board and then traced from coil leads of both relays through driver transistors to each side of the power line. I found that one relay was driven by a single driver transistor which was in turn driven by a preamp transistor, but that the other relay was driven by two transistors, one of which it shared with the first relay. This acted as an electrical interlock which prevented the magnetron relay from closing unless the fan motor relay was closed first. I then traced the circuit back from the transistors toward the inputs of the switching amplifiers, and found that each input path ultimately led to a pin of the processor chip. I figured that if I could measure the voltage or waveform at those pins, I would know what I would need to supply to the inputs of the relay amplifiers, and if I traced where those pins connected to, then where to put such voltages. However, in addition to knowing the input terminals of the relay amps, I also needed to know where the signal ground reference was, which was not obvious from the circuit board tracing. There was a part number printed on the processor chip, and a slightly different part number printed on the circuit board where the chip was mounted. I searched the internet first for a datasheet on the number printed on the board, which produced a hitachi datasheet of an obsolete microcomputer, showing pin 10 to be ground. Looking at the circuit board, pin 10 was indeed connected to many components, so it seemed reasonable that it was ground, but to be thorough, I continued the search for a datasheet for the number on the chip itself. That lead to the service manual for a microwave very similar to the one I was modifying, including a control board schematic where the portion of interest was almost an exact match to the one I had traced on the actual board (see pages 25-29). Included in the service manual are diagrams of voltage testing points and the values that should be there, as well as the chip ground connections. I then made up a cable using parts of the microwave wiring harness and some stock wire scrap to power the circuit board and simultaneously allow it to neatly connect to the solenoid through a cable. Then I connected it, outside of the microwave body, to its keyboard and power, and used the microwave oven keyboard to operate the solenoid. Then I disconnected some chip pins and made initial tests using the arduino. The initial results were promising, with the relay and solenoid momentarily, but not steadily. I did some troubleshooting, soldered a connector to the circuit board for conveniently jumping points to the arduino, and continued testing. I could get the solenoid to close, but only intermittently and momentarily. The board power transformer was also running very hot, so I suspected a fault had developed in the board. While attempting to troubleshoot that, the solenoid closed again, showing that the board was indeed functional, but the dc supply voltage seemed very high at 34 volts. This is something to look into in the future, preferably soon. Ultimately, I tried driving one of the input transistors with a pulse train instead of dc, because there was a capacitor in the input path and I knew that DC tends not to pass through capacitors. Using pulses of about 100 ms width, the relay chattered, and I thought that if I could cut the pulse width down enough, the mechanical inertia of the armature would prevent the relay from opening on the low parts of the cycle. At 20ms p.w, the RY2 remains closed continuously, and at 10ms or less p.w, RY1 remains closed continuously. Because I originally thought I had to supply two different voltages based on a chart in the service manual, I built an attenuator network with two 1.1k resistors, so sized that when shorted from an arduino pin to arduino ground, they would limit the current to a value safe for the arduino (recommended max current for arduino pin is 20 mA, output volts is +5) while providing the voltage division appropriate. One major problem is that the microwave relay amplifiers require a negative input to turn the relay on, but the arduino’s output is positive. My idea was to connect arduino ground to the -5 input and the center of the attenuation network to the -2.5 input, hoping that the attenuator would provide enough isolation between the two inputs. Each arduino pin would then go to microwave ground. When I made these connections and tried to drive each relay from a separate pin, I realized that if both arduino pins were connected to the same spot, It really didn’t matter which one turned on, the effect on the amp inputs would be the same. There was the other problem that RY2 required a pulse train to turn it on, but RY1 required dc. This problem was solved by using a pulse train to power both relays, described above. The end result is that the computer, through the arduino, is capable of powering either RY2 alone or RY2 and RY1 simultaneously, but not RY1 alone. From this point, minor hardware modifications would allow an arduino pin to power either RY1 alone or RY2 alone. The ideal case would be for two separate arduino pins to power two separate corresponding relays, but this will be impossible until the polarity reversal problem is solved, which might be as simple as changing a few transistors. Also, though the current setup allows the computer to control the relay, it is done by toggling the status of software commands by commenting them out or not and re uploading. Work needs to be done on the software side to create a subroutine that can be called by the main program that acts as a pulse modulated oscillator, a loop which makes a 10 ms p.w. train for a time specified by the main program.

'''I started with a microwave oven from a roadside trash pile

'''I established that it was working and then pulled the cover screws

'''I discharged the high voltage cap

'''and traced the power transformer wiring back to         the output device on the circuit board

'''I disconnected the wiring from the circuit board and removed the circuit board from front panel then I traced out the power supply connections on the trace side of the board ,

My Second Task
I am planning to use transistors and relays salvaged from some old circuit boards in the engineering lab to build a much simpler switching amplifier for the arduino solenoid output.

Summary of actual work over second weekend
I developed a circuit which allows the arduino to power the solenoid without overloading. This new circuit accomplishes the same result as the one from week 1, except that it uses 3 parts and a power supply instead of an entire microwave oven circuit board. I also identified potential problems with safety of AC output connections and investigated power supply options.

Week2 Narrative
Major Points:


 * Searched internet for datasheets covering parts salvaged from circuit boards at school
 * Found online only datasheets covering two transistors, and an unclear datasheet for relay
 * Measured electrical characteristics of relay to evaluate compatibility with transistors
 * Destroyed two transistors in initial efforts to build operating circuit
 * Final transistor was well suited mechanically and electrically to match relay to arduino

A: physical form of final circuit:

 * Solutions:
 * 1) transistor soldered to relay, appropriate connecting wires added, assembly surrounded with electrical tape and secured to lockpick board
 * Advantages: simple, low cost, compact, readily repairable
 * Disadvantages: mechanical security of I/O connections is questionable, causing a safety risk if the ac output connections were to break loose and reliability issues if power supply or control wires came loose; Aesthetically lacking
 * 2) as above, except that assembly is placed in enclosure of some material such as sheet metal, plastic, or even wood, and held securely in place with epoxy or other potting agent to secure connections, as in the style of certain transformers or telephone system apparatus
 * Advantages: more secure connections could result in greater AC output safety and operational reliability, aesthetic improvement
 * Disadvantages: Additional environmental impacts and financial cost due to usage of epoxy; considerably more difficult to repair
 * 3) salvaging or using a relay fitted with a more secure output terminal than PCB mounting pins
 * Advantages: simple and effective, because such a part is available on shelf.
 * Disadvantages: does not meet goal of making use of previously salvaged parts, in a way circumventing design challenge
 * 4) designing and fabricating a custom PCB optimized for the existing parts, perhaps including a connector or header pins for all external connections
 * Advantages: aesthetically elegant; mechanically secure; well matched to existing design of components; elements could be incorporated into design to facilitate a wide variety of mounting methods.
 * Disadvantages: high cost, time consuming, requires specialized knowledge and tools

B: power supply options

 * 1) switching power supply, Tandy
 * Advantages: could be donated to project forever without negatively impacting power supply abilities in personal work space
 * Disadvantages: Tandy unit does not power up per instructions, would have to be trouble shot and appropriate modifications made; power circuitry is exposed, it would have to be encased in some sort of enclosure; it is much bigger and more complex than it is believed the demands of the relay driver circuit require; compatibility with the arduino grounding system would have to be evaluated.  The Tandy unit makes +/- 12, totaling 24, which the relay circuit requires.  However, the arduino ground would have to be connected to -12V, and if both arduino and -12v are referenced to true ground or other common point, current would attempt to flow from the arduino ground to -12V, potentially causing serious damage to the arduino or power supply.
 * 2)	 30 VDC, 500 mA wall wart –
 * Advantages: low cost, such a unit is on hand and would not be missed
 * Disadvantages: this would have to be reduced by 5 to 6 volts, perhaps by a zener diode or other power supply.  The second method has been attempted once with a resulting voltage that fluctuated in an unpredictable way and in no case was the correct voltage
 * 3)	 Salvaged pcb which has dc conversion components, coupled to variable toy train transformer
 * Advantages: such a unit has been successfully built, and is slightly variable, making it compatible with other uses
 * Disadvantages: the toy train transformer had to be repaired, and if the repair fails, it could result in an unsafe condition (hot transformer case) or a blown breaker (leads short together).  Additionally, the age of the transformer ( unknown, but probably at least 60 yrs) makes it potentially unsafe and unreliable.  Finally, the setup is cumbersome and heavy, it should be possible to construct a much lighter and more compact version.


 * 4)	 All components mounted on lockpick board by soldering to a terminal strip
 * Advantages: takes up minimal space and allows use of minimum components needed to function; low cost, as parts are on hand to do so; simple, as requires only soldering and carpentry skills
 * Disadvantages: leaves electrical contacts, particularly the AC output, exposed, thus a safety cover of some sort would be needed; relay mount might not be mechanically  sound, though this could be corrected by mounting the relay directly to the board with epoxy and running leads to the terminal strip.
 * 5)	Using computer PS from school.
 * Advantages: zero cost, as such parts are on hand in ample quantities; perfect voltage and much more than ample current is available from a single unit
 * Disadvantages: school ps is much larger and heavierthan necessary to meet power requirements; grounding compatibility issue described in B (1) above would have to be confirmed.

Relay data, finder 40.31.9.024

 * Contacts: S.P.D.T.
 * 10 Amperes @ 230 Volts AC
 * Coil: 24 Volts DC
 * 26-27 mA @ 24Volts DC (measured)
 * (datasheet rating: 27 mA @ 24 volts, 900 Ohms)

Driver transistor: 2SD1765

 * Silicon NPN Darlington Pair
 * 100 max collector – emitter volts
 * 2 Amperes max collector current
 * Transistor turn on current to be measured

Value of limiting resistor remains to be calculated
'''After searching in vain for detailed information on the 40.31 relay, I decided to measure the current draw of the relay coil at its rated voltage. First, I tried to calibrate the meters to make sure that the analog meter would track the digital meter reasonably well, even though its precision would be inherently lower. When I powered the calibrating circuit, both readings were zero. '''



I checked for voltage at the PS 



'''I changed some connections, and still nothing. '''

I checked the meter fuse, which was good.

'''I reassembled the meter and reconnected the circuit, with the exception that this time, I put the red lead of the digital meter in the “mA” jack, not the “V-Ω” jack. (compare with "measuring current" above, noting that red lead is to left of black lead instead of to right). Success at last.'''



'''After checking meter calibration, I wired up the relay testing circuit and took some measurements. '''





'''Satisfied that the A952 could drive the relay coil, I soldered some leads to the transistor '''



'''And bread boarded the switching amp circuit. When trying to connect the base lead, however, it broke off at the case. (note blue wire no longer attached to transistor) ''' '''I tried the T6006 transistor, but burned it up while trying to determine what the wires connected to. That left me with the 2SD1765. '''



'''The ‘1765 drove the relay (though there is still work to be done on the input portion of the circuit), so I explored options for a portable power supply. '''



'''I tried soldering a small 25 v. transformer to a junk circuit board, but the result produced far too much voltage.  The switching power supply (shiny metal thing on left in pile of power supplies above) did not power up, so I repaired a multiple tapped toy train transformer(rusty block of metal on lower right in same picture).'''





'''The new power supply can be adjusted to provide a suitable voltage, but raises safety and reliability concerns due to the age of the transformer, and the circuit board is very cumbersome. There is much room for improvement of the power supply. Additionally, the switching amp itself needs to be assembled into a more compact, durable, and cosmetically decent form.'''

My Third task
I am going to download and learn how to use a CAD drawing software to use for producing final documentation of our final design to pass on to future teams. Additionally, I am going to work with Jbrown6389 to condense information generated during prior work into a more presentable form. An initial lead is Google Sketchup.

Summary of actual work over third weekend

 * Based on feedback from jBrown6389, I almost completely restructured the wikiversity entry for week 2, above.
 * I downloaded Google Sketchup, watched some tutorial videos, and made some models based on the tutorial examples.
 * On Monday, I measured some parts with a vernier caliper so that I could make sketchup models based on them.

Week3 Narrative
I downloaded Google Sketchup and then watched some tutorial videos to learn how to use it.

 I practiced using some of the tools  ''' and then attempted to make a model of the stepper motor.   I wanted to be able to pass on the entire model, not just a screenshot, so I learned how to upload them to 3D Warehouse. here is a model of the Dormeyer solenoid that we are using to pull the lock shackle.

'''To make the model of the solenoid, I measured many of its dimensions with a dial caliper and measured curvature of certain corners with a radius gauge

My Fourth task
I am going to continue developing the sketchup models of the layouts designed by Scarones7964 and Jbrown6389 and document them in a way suitable to pass to the next team. I may also return to work on the switching amplifier if the project progresses to a point where it becomes a limiting factor.

Summary of actual work over fourth weekend
So far, I have made a revised dormeyer solenoid model, adding to the prior work important mechanical details such as accurately placed mounting holes, the armature pin and pin holes, as well as cosmetic details such as armature guide supports and pole shading coils.

Week4 Narrative

 * I practiced using sketchup and getting comfortable with the tools
 * I watched an additional tutorial video, which showed the difference between a "component" and a "group" and used those principles to continue working with the model
 * I incorporated downloaded models into Version I of the lockpick based on a sketch by Scarones7964.  The stepper motor component in the model is a scaled version of the one by 3D warehouse user Chris Layton, while the combination lock component is a modification of the the one by 3DW userJimmy G
 * I learned how to use the keyboard in conjunction with the rotation and scale tools to very precisely size and align components in a model
 * I incorporated cosmetic details such as pole shading coils and colors into the solenoid component
 * I figured out how to extract the coupling pin from the solenoid in a way that lets us re use the fastening washer.

If I had had more time, I would have:


 * Continued refining the 3D model, adding cosmetic details and parts such as the arduino, fasteners, and lock mounting blocks
 * Posted pictures and a description of the process for extracting the pin
 * Measured the base current of the transistor in the switching amplifier and calculated the limiting resistor's value
 * Update:I found time to do this, a detailed discussion is found in the switching amplifier page


 * Worked on the enclosure problem for the switching amplifier

Return to Team Page