Sunday, October 19, 2008

Ratio Metric Power Factoring


I got around to building a power supply which would allow me to track the AC waveform. I have several uses for this wave. First i plan to use it to control the power factor to the spot welder. The concept here is to count every half wave. I can easily reconstruct a complete wave or a number of waves. This is interfaced with the host microcontroller via two diodes wired for full wave rectifcation. (not to be confused with full wave bridge). The DC side already has a full wave bridge. The reference point being ground, and the output of my full wave rectifier gives me a pulse for every 180 degrees of power.

In theory i should be able to fetch the zero power condition, ie.  0,180,360.  but the reality of my electronics thus so far is 20 degrees on either side of the wave. I need to work on the resistor divider section. I may end up using a summing amp so that i can offset the wave by 1.5v and limit the amplitude to a safe 5v.

As can be seen in the photo my code is doing what it is suppose to. However the hardware is not scaling the wave correctly. I have a small phase shift that is offsetting the zero cross detection. The high current transformer is very reactive when near saturation and it would not take kindly to an abrupt disruption in current flow. I don't want to see exactly what happens if i try to use it as is.

Before i attempt a test run i need to correct the phase shifting and offest the voltage in order to properly align the IRQ with the power wave.

Friday, October 10, 2008

Handpeice button naming


I replaced the shift register inside the handpeice and added some wire to test everything. The stick works just as expected. After talking with a good friend Matt, i found that the directional section is called the point of view. And of course the trigger (which i knew before hand).

The other three buttons still have no names as far as i can tell. I tried to find a user manual for the Gravis Blackhawk(which is what i believe the originally joystick to be) I had no luck finding a manual. So untill someone corrects my convention i will assume the below.

Up = Bit4

Down = Bit3

Left = Bit0

Right = Bit7

Trigger = Bit5

Select = Bit1

Start = Bit2

Manual = Bit6

Ok, see i named three of the buttons. They are Select,Start,Manual. These will be spot welder specific buttons. The exact use will be covered later. 

Now that have an input device that works as i expect i can begin to work on the menu subsystem and the spot welder base program.

Thursday, October 9, 2008

Finally got the shift registers


I got the shift registers today. After putting them away i assembled the test circuit which is listed below. My driver almost worked as it was written. I did verify that the shift register in the joystick was damaged. I then found a small bug in my driver, not really a problem with code but a problem with the concept. After looking at the data sheet a little closer i noticed that the eighth bit(H) was directly coupled to the output stage. Initially i assumed that all stages were symetrical in terms of clock relationship. 

Well, after noticing the problem i restructured the driver so that the clock pulse would occur after the data bit reading.

The driver works perfect. I need to replace the damaged shift register and fix some wires i managed to break in the process. After i get the stick assembled and verify that it still works i will be able to write some code to get this thing done.