So I've read a lot of threads where the possibility of phase control is debated. The main issue seems to be the slowness of SSRs to trigger. The second problem is that a triac will have 230v on the variable resistor, which means it's impossible to use transistors. And a triac needs 10v to trigger anyway, which the arduino doesn't put out.
I think I have found a solution but need help coding it.
I am using a 8 SSR module, so 8 inputs. Across each pair is a resistor. The output of the first feeds the input of the second (link) and so on. Lets use 50k resistors. The end result is 9 possible outcomes.
- No relays activated. Sum the total of resistors (400k)
- Relay 1 activated. Sum the other 7 resistors (350k)
- Relay 1-2 activated. Sum the other 6 resistors (300k)
- Relay 1-3 activated. Sum the other 5 resistors (250k)
- Relay 1-4 activated. Sum the other 4 resistors (200k)
- Relay 1-5 activated. Sum the other 3 resistors (150k)
- Relay 1-6 activated. Sum the other 2 resistors (100k)
- Relay 1-7 activated. Sum the other 1 resistors (50k)
- Relay 1-8 activated. No resistors (0k)
This resistance is put across the triac. Thus giving 9 different output levels at 230v.
The controlling variable is current going to the battery. I want a min of 1A going to the battery. All excess solar capacity should be sent to the triac.for simplicity let's say the triac range is 1 to 9A.
Output pins (1,2,3,4,5,6,7,8)
So if A (battery current) > 2, increase triac (make next output pin in string go high)
if A < 2, decrease triac (make current highest pin in string go low)
default triac would be 400k ie no pins high
How to write this?