View Full Version : Charlieplexed SSRs
Photovor
12-04-2008, 11:50 AM
Ok, so I had this idea that we could Charliplex SSRs. (http://en.wikipedia.org/wiki/Charlieplexing) A minor re-write on the PIC end, and a standard PIC, with 8 control lines could control 30 SSRs. So a REN16 could control 60 SSRs, with only using 2 cat 5 cables, or 12 control lines (2 for +5 and 2 for GND).
Basically, the 8-pin connector would consist of:
1- +5v
2- GND
3-8 - Control Lines
At the end of each cable, you'd have a SSRoz on drugs, with 30 output channels, just from ONE PIC.
Refresh rate would have to be pretty high, but it could definately be done with standard PIC microcontrollers. This may be a good extension of the 'entry level' board that is currently being talked about.
In the attachment, imagine each LED being the diode side of the MOC3023 (for simplicity, I didn't draw all the other connections). It'd be interesting to design that PCB. So basically you'd have a low part count controller, but have the ability to expand into a ton of channels, all the while minimizing cabling from the controller.
Photovor
12-04-2008, 11:52 AM
Just had another thought- could also be used to upgrade Renard Controllers. Just add the new SSRPlex board, flash new firmware, and you'd be rolling.
P. Short
12-04-2008, 01:25 PM
That works OK for discrete LEDs powered from DC, but not very well for lamps driven through opto/triac pairs and syncronized to the AC line. You will need to run the microcontroller at roughly 30 times the current frequency (well, 30 times 8 MHz) if you want to charlie-plex 30 outputs, and you will also run into the speed limitations of the opto-couplers and triacs. After taking into account the extra code complexity you would not end up with much improvement over the current situation.
But go for it if you believe in it.
ErnieHorning
12-04-2008, 03:04 PM
Something else that’s being missed here is the fact that once you turn a TRIAC on, it stay’s on for the rest of the half cycle. So if you intend to do dimming, you’d have to keep track and turn them on in the order of brightness.
If you ran LED’s on DC and used FET’s, it would work.
Photovor
12-04-2008, 03:04 PM
You do have a good point with the speed for the Triacs or optocouplers. I could definitely see an issue there as each channel was updated, say through a fade or something.
I've been thinking of doing this on a proto board to see how it works. I'd be interested in seeing how PWM would work over these 30 LEDs first. Interesting concept none-the-less.
DynamoBen
12-09-2008, 08:34 PM
This is possible with an AC output and SSRs. Its called dimmer doubling look here:
http://www.doityourselfchristmas.com/forums/showpost.php?p=28648&postcount=1
Instead of looking just for a zerocross you have to know which way the sine wave is moving. In addition you need diodes to split the two sides and of course your voltage will be cut in half.
ErnieHorning
12-09-2008, 09:56 PM
Instead of looking just for a zerocross you have to know which way the sine wave is moving.Same thing, but different. The splitter uses half wave and charlieplexing would be able to use full wave.
Instead of looking just for a zerocross you have to know which way the sine wave is moving. In addition you need diodes to split the two sides and of course your voltage will be cut in half.The document shows that it uses SCR’s, though it could be a TRIAC's. The voltage is the same, the RMS value is less because of the pulse width is less.
Edit: The half wave method could be used with half wave LED's without a circuit board change.
Photovor
12-10-2008, 08:22 AM
Same thing, but different. The splitter uses half wave and charlieplexing would be able to use full wave.The document shows that it uses SCR’s, though it could be a TRIAC's. The voltage is the same, the RMS value is less because of the pulse width is less.
Edit: The half wave method could be used with half wave LED's without a circuit board change.
Just trying to follow this correctly. I'm good with electronics, but I've never done really anything with SCR's or TRIACS (other than putting together a renard board). So I'm still learning those concepts. Are we saying that a triac could be used, and would work correctly with half-wave LED strings? Would there have to be software changes for the detection of the wave?
ErnieHorning
12-10-2008, 12:29 PM
A TRIAC already works with LED’s on a Renard. The software needs to be assembled with PWM option enabled. LED’s may work with a non-PWM configuration, but you may have mixed results.
An SCR only works in only one polarity. A TRIAC is basically two SCR’s facing opposite directions with the gates tied together. You could replace an SCR with a TRIAC.
Photovor
12-10-2008, 01:44 PM
That's actually encouraging. This is a neat concept, but the downside is that even though there may be less parts needed for the controller piece, you're still spending the same amount per channel when it comes to the ssrs. I'm beginning to believe that the only benefits to this is just reduced cable count, which still could be attractive to some. Something that I'll have to play with.
P. Short
12-10-2008, 03:03 PM
Reducing cable costs is not such a bad idea. Unless you already have the cable or can get a big discount on it, the cable and connectors can be a significant part of the cost. And the fewer the cables, the nicer it looks if the daytime if there isn't snow on the ground.
In my opinion a 2:1 reduction in pins is the low-hanging fruit. Figure 4 in AN234.pdf from microchip shows a way to get this that is easy to design in hardware and fairly easy to program.
ErnieHorning
12-10-2008, 07:37 PM
... the downside is that even though there may be less parts needed for the controller piece, you're still spending the same amount per channel when it comes to the ssrs.Nope, it would only be a software change. You would just plug in half wave LED’s strings in opposite directions.
BTW, there is no such software available currently, but it could be done. There’s also no guarantee that half wave type will always be available. As more LED strings get sold, the cost differences for manufacturing the two types will become insignificant.
ErnieHorning
12-10-2008, 07:41 PM
Figure 6 is the Charlieplexing.
ErnieHorning
12-10-2008, 08:09 PM
You could do this with only 6 pins. http://www.youtube.com/watch?v=_SO1J1kP3YQ&feature=related
Photovor
12-11-2008, 10:18 AM
You could do this with only 6 pins. http://www.youtube.com/watch?v=_SO1J1kP3YQ&feature=related
Yeah, with 6 pins, you can control up to 30 different outputs. In my example, I said 8, but those other lines were to carry +5 and GND. Ernie- you definitely have a valid point with the half-wave LEDs. And it's not like they advertise the type on the box. At least in the dimming arena, the lifespan of something like this is definitely limited.
From what I'm understanding, with the right programming changes, this could be made as an add-on for a renard, however, without the dimming, correct? I'd plan to use zero-cross triacs in the design.
ErnieHorning
12-11-2008, 10:56 PM
At least in the dimming arena, the lifespan of something like this is definitely limited. The lifetime of LED’s, like incandescent’s, is proportional to actual time that they're on. So half wave LED’s should last twice as long as full wave ones.
… however, without the dimming, correct? You still have dimming.
I'd plan to use zero-cross triacs in the design. It’s the opto-couplers that are zerocross, you’ll need random phase ones to allow dimming.
DynamoBen
12-12-2008, 12:57 AM
Something to keep in mind with these methods; when you increase the number of lights you can control you also increase your current draw.
I can't count the number of times I spoke with ppl who were dimmer doubling that couldn't figure out why they were tripping breakers; double the lights double the current.
Photovor
12-12-2008, 08:13 AM
I should clarify what I meant with the lifespan. I mean, with the lifespan of the charliplexed board... if we're going to see half-wave LEDs slowly be replaced by full-wave leds, then as time goes on, it's going to be harder to find compatible sets.
As for the dimming, wasn't it said that you'd have to keep track of the timing in order to know what order to have them turn off in- or something along those lines. Just thought it'd be easier to first implement a non-dimming version.
ErnieHorning
12-12-2008, 10:24 AM
As for the dimming, wasn't it said that you'd have to keep track of the timing in order to know what order to have them turn off in- or something along those lines. Just thought it'd be easier to first implement a non-dimming version.The dimming comment was meant for the half wave method where you just double the channels. That one should be pretty easy to implement. You just need to control each half cycle separately. This only works with half wave LED strings though all of the full wave stings that I’ve seen could be converted; just replace the bridge diode with a single diode.
You will need to run the microcontroller at roughly 30 times the current frequency (well, 30 times 8 MHz) if you want to charlie-plex 30 outputs…I don’t know the time that it takes to set one output and then set another one, but would it be visible even if the timing spilled over to the next one or two dim positions? My experience with incandescent’s is the difference between two consecutive dim levels is only perceptible if you know it’s changing and are looking specifically for it. I know it wouldn’t matter if the last 5 or so were removed to make room for jitter.
Photovor
12-12-2008, 11:03 AM
If I had the parts for 30 channels, even to just do on/off and not dimming, I'd be prototyping this tomorrow. This would be especially easy to prototype since you're not having to worry about a ZC, just straight out 100% on. I got 16 MOC3023's from fairchild direct(samples), so that gets me partially there...
ErnieHorning
12-12-2008, 03:17 PM
If I had the parts for 30 channels, even to just do on/off and not dimming, I'd be prototyping this tomorrow. ·· I got 16 MOC3023's from fairchild direct(samples), so that gets me partially there...Can you use surface mount? If so, PM me.
Photovor
12-12-2008, 03:40 PM
Can you use surface mount? If so, PM me.
I was planning on developing this idea on a breadboard, and I really don't have the resources to work with surface mount (though I'm not afraid to solder it). So no, but thanks.
djulien
12-13-2008, 04:40 PM
That works OK for discrete LEDs powered from DC, but not very well for lamps driven through opto/triac pairs and syncronized to the AC line. You will need to run the microcontroller at roughly 30 times the current frequency (well, 30 times 8 MHz) if you want to charlie-plex 30 outputs, and you will also run into the speed limitations of the opto-couplers and triacs.
Would arranging them in a rectangular matrix instead of charieplexing help here? Then you can turn on one of more LEDs in a row at the same time (as opposed to 1 or maybe 2 or 3 at a time with charlieplexing). For example, with a 4x4 grid, you would only need to run 4x as fast (less than the 56 you would get with charlieplexing, but still better than 8). Also, if there is not discernable visual difference in brightness within a few %, could you still run at the same speed and then the dimmed values would just be off by +/- 2?
don
Photovor
01-05-2009, 03:52 PM
Ok, here's a question. Let's toss out the whole SSR deal. Say I want to just control a bunch of discrete LED's individually, with some PWM code as well. Any thoughts?
phenagan
01-05-2009, 06:10 PM
If you do away with the latching SSRs and drive LEDs, then charlieplexing works well because you no longer have to deal with 60Hz as your limiting frequency and you can drive the LEDs fast enough to eliminate perceived flickering. If you look at most of the apps you see using this technique, you'll see they're driving LEDs.
Photovor
01-05-2009, 06:18 PM
Should I look for PICs that have built in PWM channels, or just 'simulate' my own pwm by pulsing the ports fast enough?
Lets just say that I have 4 LEDs controlled by only 2 ports (charliplexed), I'm wondering how I'd keep track of which LEDs had which brightness values, as I'm swapping the ports back and forth. Now that I'm getting closer to a concept, I'm starting to confuse myself.
phenagan
01-05-2009, 07:11 PM
Can't use built in PWM as that'll defeat the 'plexing. You're going to have to do it the hard way...
Photovor
01-05-2009, 09:29 PM
Can't use built in PWM as that'll defeat the 'plexing. You're going to have to do it the hard way...
That's what I thought.
I've been thinking of a different design for this charliplexing, no longer on the 'using for grinch/ren/olsen' thread anymore. I'd like to use 4 control lines to control an array of LEDs, but I'd need to implement dimming as well. I may start to do this without dimming first just to try the concept.
phenagan
01-10-2009, 12:00 PM
Something else for you to take a look at: http://www.edn.com/article/CA6615603.html?spacedesc=designideas&nid=2431&rid=960326888. It adds a few transistors to help with the current issues, which allows more than one LED to be on at once and gives some savings in cycle times.
P. Short
01-10-2009, 12:24 PM
That is a nice circuit that will allow you to increase the drive on each LED to 25 mA, which is the limit of the PIC outputs. The problem is that if you are doing PWM dimming you will probably want to over-drive the LEDs, relying on the lower duty cycle to prevent damage to the LEDs. You can't really do that, though, because of the PIC limits.
phenagan
01-10-2009, 03:15 PM
Very true, that's an issue with either the Charlieplex or Chipiplex methods. Short of adding driver transistors, you're going to be stuck with the limit of the PIC.
djulien
01-27-2009, 01:09 AM
Photovor, did you end up pursuing the charlie-plexed SSR idea?
I was just re-reading this thread, and realized that I am looking into something similar. I'm also wanting to connect a larger number of SSRs to a controller using charlie-plexing, only I was thinking in terms of lower refresh rates and rely on the latching feature of triacs/optos to keep the AC SSRs on.
don
Photovor
01-27-2009, 08:27 AM
Photovor, did you end up pursuing the charlie-plexed SSR idea?
I was just re-reading this thread, and realized that I am looking into something similar. I'm also wanting to connect a larger number of SSRs to a controller using charlie-plexing, only I was thinking in terms of lower refresh rates and rely on the latching feature of triacs/optos to keep the AC SSRs on.
don
As far as charliplexing SSRs, I haven't gone any further. I've been messing around with PWM control of charlieplexed LEDs, and I have working examples, but I'm not sure if it could be applied to SSRs or not. My current example that I'm working on is for another project here, but not related to SSRs at all.
awhaley
01-28-2009, 05:59 AM
I have to agree with Phil here... coding a one output to one ssr phase angle dimmer is difficult enough... I can't really imagine trying to make the charlieplex thing work inside the time constraints with a reasonable dimming resolution... What Don's talking about in the other thread, where he only wants 4 or 8 steps of resolution might work, but trying to get enough steps to smoothly dim the lights would be near impossible without a serious increase in controller speed.
And I just wonder if the return is worth it, given that the largest per channel cost will always be the SSR... and there are low parts count options that don't involve the complexities of charlieplexing... I'm moving along nicely on a single PIC 32 channel dimmer, and there's no reason we couldn't do something similar to what RJ does with the Lynx Freestyle, where he multiplexes a single 40mhz PIC to control 128 channels...
I think the Parallax Propeller has some serious possibilities... for those that aren't familiar it's a single chip with 8 microprocessor cores onboard... a ton of ram (some shared, and some specific to each core) and a speedy clock... You could take a REN-C/Grinch style approach, and have each core drive 64 channels of output latches... for 512 channels on a single chip....
But the question is then would you want it if you could have it? I think distributing the dimmers in 8s, 16s, and 32s makes a lot of sense for most layouts. 4 and 8 channel integrated SSR dimmers with onboard power supplies would obviously be the most convenient... run power and daisy chain data and you're in business wherever you want to be... but the advantage of higher channel count boards is reduced cost... one 32 channel PCB is cheaper than four 8 channel ones, plus you'd only need one RS485 chip, one power supply circuit, one set of all the support components.
Anyway. I got a little off topic discussing other ways to get really high channel counts. I think charlieplexing is really cool, and a great way to drive a lot of LEDs, but I'm just not sure it would be worth it to me to develop a control board for SSRs based on it. But if you do, I'll certainly be interested in watching your progress and helping anyway I can. :)
Art
Art
djulien
02-13-2010, 07:25 PM
I know this is an old thread now, but if anyone stumbles across it I wanted to add a follow-up post containing some additional info. I put a write-up of what I did for chipiplexed SSRs in this thread:
http://doityourselfchristmas.com/forums/showthread.php?t=10889
don
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.