I guess resolution is never an issue because the human eye can't see much past 60hz anyway?
Exactly. Since the human eye is inefficient it just looks like the light is dim, but in reality we are switching it on and off really quickly. It's really just PWM.
I'm looking at your code and I've never done anything with a DAT portion, so it make take me a while to figure out exactly how it works, thanks for linking to that!
Remember this code is intended to control 4 shift registers, which makes it a bit more complex. If you removed the shift register code it's as simple as sensing zero cross, waiting the requisite amount of time, and then turning on the SCR.
Since you have to switch the triac/scr each half cycle you're actually working at 120Hz. The code treats the "angle" in a linear fashion but, of course, this doesn't always result in a linear brightness output. Many advanced lighting consoles/programs allow for the definition of a compensation curve to "bend" the values for an output to achieve the desire results. I think Ben's code includes a compensation table for the output, something pretty easy to do in Spin.
The code treats the "angle" in a linear fashion but, of course, this doesn't always result in a linear brightness output. Many advanced lighting consoles/programs allow for the definition of a compensation curve to "bend" the values for an output to achieve the desire results. I think Ben's code includes a compensation table for the output, something pretty easy to do in Spin.
.
The development version of my channel driver (in the dev branch) does include a compensation table which isn't yet implemented in code. The released version (in the trunk branch) doesn't have this table in it.
It is easy to implement in spin (I have one project doing that already), I'm hoping to implement it in assembly at some point.
You all are going to laugh ... I'm trying to follow the DAT portion of the code but I don't even see where you define the output pins for the shift registers, it appears the phase monitoring pin is pin0.
Are you using an optocoupler to interface monitoring the sine wave?
You all are going to laugh ... I'm trying to follow the DAT portion of the code but I don't even see where you define the output pins for the shift registers, it appears the phase monitoring pin is pin0.
When you say DAT portion do you mean the assembly code? If so the pin assignment comes from spin via a memory location.
Are you using an optocoupler to interface monitoring the sine wave?
Look at the schematic for the propcontroller, specifically the power schematic.
That schematic is a little busy, I'll have the pull up the data sheet on the m74hc4094 tomorrow.
Sorry, its just duplication to accommodate all four chips. You don't need to understand the 4094 specifically any shift register tutorial should give you an idea how they work. Long story short is you shift out the data (32 bits in this case) and the latch the ICs (latching just applies what you sent to the ICs pins).
No need to apologize, I have just forgotten (in detail) how shift registers work, so it's taking my brain a while to remember. How many prop pins are you using? One for the clock and one for the bit stream? I'll try and walk through this while typing ...
I see the gates, I guess those are because the prop cannot provide enough current to be directly connected to the registers? Looks like output enable is tied high. All strobes are tied together and controlled by a single gate. Serial in is tied to the other chips output and all clocks are tied together and controlled by a single gate. So the first set of 8 bits end up at U1.1, the second set of 8 bits end up at U4.1, the 3rd set of 8 bits end up at U3.1 and the last set of 8 bits end up at U2.1 . It appears you are using 4 pins on the propeller which J1 connects to.
How do the connections J3-J10 interface with the A/C?
Sorry, its just duplication to accommodate all four chips. You don't need to understand the 4094 specifically any shift register tutorial should give you an idea how they work. Long story short is you shift out the data (32 bits in this case) and the latch the ICs (latching just applies what you sent to the ICs pins).
Sorry, its just duplication to accommodate all four chips. You don't need to understand the 4094 specifically any shift register tutorial should give you an idea how they work. Long story short is you shift out the data (32 bits in this case) and the latch the ICs (latching just applies what you sent to the ICs pins).
I see the gates, I guess those are because the prop cannot provide enough current to be directly connected to the registers?
It's more a matter of voltage than current. I'm running 5V to the SCRs but the prop is 3.3.
Looks like output enable is tied high. All strobes are tied together and controlled by a single gate. Serial in is tied to the other chips output and all clocks are tied together and controlled by a single gate.
Correct, that is 3 pins total that drive the shift registers.
So the first set of 8 bits end up at U1.1, the second set of 8 bits end up at U4.1, the 3rd set of 8 bits end up at U3.1 and the last set of 8 bits end up at U2.1 . It appears you are using 4 pins on the propeller which J1 connects to.
Actually I believe its opposite of this because of the direction in which the code shifts the data out.
How do the connections J3-J10 interface with the A/C?
Good question, I connect to these, which actually performs the dimming.
Comments
Exactly. Since the human eye is inefficient it just looks like the light is dim, but in reality we are switching it on and off really quickly. It's really just PWM.
Remember this code is intended to control 4 shift registers, which makes it a bit more complex. If you removed the shift register code it's as simple as sensing zero cross, waiting the requisite amount of time, and then turning on the SCR.
The development version of my channel driver (in the dev branch) does include a compensation table which isn't yet implemented in code. The released version (in the trunk branch) doesn't have this table in it.
It is easy to implement in spin (I have one project doing that already), I'm hoping to implement it in assembly at some point.
Are you using an optocoupler to interface monitoring the sine wave?
http://www.imaginarycolours.com/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=12vBulbs
When you say DAT portion do you mean the assembly code? If so the pin assignment comes from spin via a memory location.
Look at the schematic for the propcontroller, specifically the power schematic.
That schematic is a little busy, I'll have the pull up the data sheet on the m74hc4094 tomorrow.
Sorry, its just duplication to accommodate all four chips. You don't need to understand the 4094 specifically any shift register tutorial should give you an idea how they work. Long story short is you shift out the data (32 bits in this case) and the latch the ICs (latching just applies what you sent to the ICs pins).
I see the gates, I guess those are because the prop cannot provide enough current to be directly connected to the registers? Looks like output enable is tied high. All strobes are tied together and controlled by a single gate. Serial in is tied to the other chips output and all clocks are tied together and controlled by a single gate. So the first set of 8 bits end up at U1.1, the second set of 8 bits end up at U4.1, the 3rd set of 8 bits end up at U3.1 and the last set of 8 bits end up at U2.1 . It appears you are using 4 pins on the propeller which J1 connects to.
How do the connections J3-J10 interface with the A/C?
It's more a matter of voltage than current. I'm running 5V to the SCRs but the prop is 3.3.
Correct, that is 3 pins total that drive the shift registers.
Actually I believe its opposite of this because of the direction in which the code shifts the data out.
Good question, I connect to these, which actually performs the dimming.