It is amazing how one project can teach you on another
TC
Posts: 1,019
Hello all,
This is not a question post, but a post to express one victory I had with my self.
A few years ago, I was in a major motorcycle accident that left me with some brain damage. You can add my A.D.D. on top of the damage. So for me to figure A problem takes a little more time than most, but I will never let that stop me.
I am currently working on 3 projects, a power supply, my wife's table, and a reflow oven. I have to do many project at a time (have to change it up), if I don't I lose interest, and I could not figure out problems anymore.
Well for the reflow oven, I have been trying to figure out for weeks how to do a simple PWM for it. I don't need one that can do 1khz, I just needed one that can turn on and off a heating element. But I also didn't want just on/off control.
While doing a little code for my wife's table, I noticed that the TLC5941 uses a 12-bit counter to control the PWM outputs. so I thought, why could I not use a repeat that counts from 4095 down to 0, then have a if that compares the PWM value. Here is what I came up with
The code works great. I'm happy with the output, now to do more work on the PID.
Thanks
TC
This is not a question post, but a post to express one victory I had with my self.
A few years ago, I was in a major motorcycle accident that left me with some brain damage. You can add my A.D.D. on top of the damage. So for me to figure A problem takes a little more time than most, but I will never let that stop me.
I am currently working on 3 projects, a power supply, my wife's table, and a reflow oven. I have to do many project at a time (have to change it up), if I don't I lose interest, and I could not figure out problems anymore.
Well for the reflow oven, I have been trying to figure out for weeks how to do a simple PWM for it. I don't need one that can do 1khz, I just needed one that can turn on and off a heating element. But I also didn't want just on/off control.
While doing a little code for my wife's table, I noticed that the TLC5941 uses a 12-bit counter to control the PWM outputs. so I thought, why could I not use a repeat that counts from 4095 down to 0, then have a if that compares the PWM value. Here is what I came up with
repeat count from 4095 to 0 if count > C dira[16] := 1 outa[16] := 0 else dira[16] := 1 outa[16] := 1
The code works great. I'm happy with the output, now to do more work on the PID.
Thanks
TC
Comments
Having previously designed an AC dimmer that uses a zero-cross detector (opto-isolator), I thought I might do heating element control like this:
This input is a byte (0..100), the code counts the cycles, enabling the triac at the zero cross point.
HOLY COW! I cant believe I didn't think of that. I have been testing everything with a resistor and a transistor(less chance of getting shocked).
That would work, but I have a couple questions;
1) I am trying to use old parts as much as I can, and I have an old crane machine(the game with the toys inside) board. it has 7 triacs with opto-isolators for each. I was going to use 2 for the oven, 1 for the top heater, and one for the bottom. so that leaves me with 5 left. could I use one of them? there part number is K3023P, and the triacs are.MAC210A8FP.
2) I was hoping to take that PWM driver combine it with my PID, and my MAX31855 object, so I have one object that all I have to do is pass the set value, and it will make it happen. and I also wanted to be able to read the max31855 from my main program so it can be shown on the display. and last, I wanted to have 2 separate objects that would control the heaters. one for the top, one for the bottom. and to be in its own cog. (i know a lot of stuff) What do you think would be my best option for this?
Thanks
The datasheet says they have a On-State Current RMS (TC = +70°C) of 10A, Peak Non-repetitive Surge Current of 100A. I am trying to make this as cheap as I can. I already have the triacs, and since they will only be driving one heater each, I should be well under the max current. so far, I have only bought the oven its self.
That might just be my final direction, after I get the PID working at 8-bits. right now if I try to change it, I overshoot to much (+10C). But again, that is with a thermocouple hooked to a 1W resistor(as the heater). I know its going to be completely different with the oven.
If you decide to do phase-angle control, I can show you the PASM code I used to do that.
That is great, and the part is less than $1 each.
I completely agree, there is no need for a PASM driver for this. I don't think I would ever see a difference between them.
Thank you so much Jon.