Using the Propeller as a controller for a high power switching power supply
Hi all,
I am new to this forum and to the Propeller and its very original architecture. I am sorry for this long post, but I could not sum up my questions in two sentences...
I am currently designing a multi-kW 3-phase to high-voltage DC switching power supply and for the controller I always thought about using a fast 8-bit micro as the regulation requirements are not exacting, or a DSP but this might be overkill.
I came upon the Propeller chip and my first reaction was skepticism, until I found the data-sheet and Chip's manifesto. Then came enthousiasm and I looked for devices to implement with this chip, and thirdly thought why not use it as a power supply controller? Availability of the DIP-format propstick is great as I have one board less to manufacture - and only this would have to be redesigned if needed.
I have two questions:
1. Perennity/obsolescence: the SPS design I am doing must be manufacturable for 10 (-20) years (I am waiting for comments here
) but in low yearly numbers. So obsolescence could be coped with by a LBO provided the right person gets the right information at the right time...
2. architecture:
The controller shall do the following functions
a) measure converter current and voltage, of input and output in real time (4 params). Handle a few bit I/O. All the transfers are galvanically isolated already.
b) generate PWM waveforms for the 4 power switches according to the above parameters, at a fixed frequency but with duty cycle given by an algorithm which involves a few operations of division and multiplication.
c) implement safety functions (shutdown in case of overload etc.)
d) optionally, drive a display
I'd probably implement a) with 4 single serial 12-bit ADCs, running around 500ks/s, interfaced to 1 cog, with some crude digital filtering done at this point. BTW Why the heck isn't there any 16x16 multiply/MAC function on chip??? It is greyed out on the data-sheet which is all the more frustrating... In the meanwhile couldn't this be handled by a small external co-processor as for the stamps but faster.
As for (b) there are only 2 timer outputs per cog, how is it possible to sync two PWMs from different cogs together.
As for safety (c) how can you reset a pin (switch driver) which is set high from a different cog? It seems the logic OR function is an obstacle here, as things have to be done very quickly. And as for the display (d) it seems its the easiest part, it would have been the most annoying on a normal uC...
Any comments welcome!
I am not a SW guy, being an analog designer who must do some uC programming sometimes. The Propeller "down-to-hardware" philosophy suits me
very well... Congrats for the great chip!
Waiting for your comments and suggestions ...
I am new to this forum and to the Propeller and its very original architecture. I am sorry for this long post, but I could not sum up my questions in two sentences...
I am currently designing a multi-kW 3-phase to high-voltage DC switching power supply and for the controller I always thought about using a fast 8-bit micro as the regulation requirements are not exacting, or a DSP but this might be overkill.
I came upon the Propeller chip and my first reaction was skepticism, until I found the data-sheet and Chip's manifesto. Then came enthousiasm and I looked for devices to implement with this chip, and thirdly thought why not use it as a power supply controller? Availability of the DIP-format propstick is great as I have one board less to manufacture - and only this would have to be redesigned if needed.
I have two questions:
1. Perennity/obsolescence: the SPS design I am doing must be manufacturable for 10 (-20) years (I am waiting for comments here

2. architecture:
The controller shall do the following functions
a) measure converter current and voltage, of input and output in real time (4 params). Handle a few bit I/O. All the transfers are galvanically isolated already.
b) generate PWM waveforms for the 4 power switches according to the above parameters, at a fixed frequency but with duty cycle given by an algorithm which involves a few operations of division and multiplication.
c) implement safety functions (shutdown in case of overload etc.)
d) optionally, drive a display
I'd probably implement a) with 4 single serial 12-bit ADCs, running around 500ks/s, interfaced to 1 cog, with some crude digital filtering done at this point. BTW Why the heck isn't there any 16x16 multiply/MAC function on chip??? It is greyed out on the data-sheet which is all the more frustrating... In the meanwhile couldn't this be handled by a small external co-processor as for the stamps but faster.
As for (b) there are only 2 timer outputs per cog, how is it possible to sync two PWMs from different cogs together.
As for safety (c) how can you reset a pin (switch driver) which is set high from a different cog? It seems the logic OR function is an obstacle here, as things have to be done very quickly. And as for the display (d) it seems its the easiest part, it would have been the most annoying on a normal uC...
Any comments welcome!
I am not a SW guy, being an analog designer who must do some uC programming sometimes. The Propeller "down-to-hardware" philosophy suits me
very well... Congrats for the great chip!
Waiting for your comments and suggestions ...
Comments
http://www.rayslogic.com/propeller/Programming/RaysStuff/RaysStuff.htm
I use PCA9554's on the i2c bus to control relays and other slow stuff:
http://www.rayslogic.com/propeller/Programming/i2c/i2c.htm
I'm using a MAX1270 to measure output voltage:
http://forums.parallax.com/showthread.php?p=700426
·
Rayman: your spin objects are very interesting, I'll have a careful look at them. I'd need the best resolution I can reach as the switching period on the converter is 10us, therefore I need sub-microsecond PWM resolution. Ideally resolution corresponding to the timer clock period (12.5 or 10 ns). Frobably free-running pwms, no hub activity, no spin except for setting up, just synced at the start, or periodically resynced. Assembler compulsory here! But Prop asm looks a bit like PIC asm...
Stevenmess: thanks for this easy solution! Sometimes one looks too far...
Wastehl (Bill): I am using a Hall effect sensor from LEM, (www.lem.com) the Minisens. It is a hall effect sensor for current measurement where the current does not flow in the SO-8 chip, but outside. Depending on the PCB tracks you can achieve a full scale of a few amps to about 100A. Tracks on the top side mean higher sensitivity but low iolation, and when tracks are on the opposite side you can achieve 2kV isolation at the expense of sensitivity. The better sensitivity means several turns of thick tracks, which takes a lot of PCB space. The bandwidth is 100kHz. This is better than the Allegro chips which have 20kHz BW. If you need more BW you should use a Hall effect for the lower frequencies and a coil for the higher ones (and a tricky crossover filter), thereby reproducing what happens in tektronix current probes meant for lab use.
I also checked CY sensors (http://www.cy-sensors.com) a german company (yes!) but I am not sure that they are up to it commercially.
BTW it is good to see that several people are using the Prop in the same field!
I will be ordering very quickly the eval board for parallax (for playing around, especially the easy video output is amazing), but I will be putting the DIL module version in the design. Easy to change in case there are some obsolescence problems.
You mention using the propeller for controlling a 50kW switcher. Is the propeller in the main loop controlling the switching element? Could you please shed more light on this...or more code?
I am working on a multi 100kW buck that is being controlled by a LT1243. It works fine but I would like more control of soft start, current limit, sub harmonics etc.
Thanks in advance, Bill
Mike, please forgive me but your reply is from left field...what are you replying to regarding high power switchers?
Bill
The openning post mentions a concern about the availability of the prop chip into the far future. Mike was just commenting on that. Looks like it will not be a problem
Dom,
No you don't want to move your MAC operations off chip to a coprocessor. It will take longer to write out the operands and fetch back the result than just doing it on the Prop in assembler.
You might also try sampling synchronous with the PWM. This will alias PWM harmonics down to DC, but if you pick the sampling instant correctly you can also zero out all the pwm harmonics. (this usually means sampling halfway through an ON or OFF period)
Are any of your 4-pwm signals complimentary? Because the counters can do that automatically. (though dead time would need to be added with analog elements) Also, since the counters need a bit of minding to do PWM, you can likely do at least 3-channels of PWM/cog with the spare time between counter updates. For precise synchronization, CNT is a god-sent. (CNT is the shared, free-running 32-bit counter) Pick a CNT value far enough in the future and have both cogs wait for that CNT value before they start the synchronized code. (could also wait for a pin transition) Additionally, all WAITCNT instructions should be offset from the initial CNT only. This keeps hub operations or branchy code from screwing up the synchronization.
Lawson
For whatever its worth I've had some issues getting decent accuracy out of the LEM hall effect sensors. It may be worth your while to look at the F.W. Bell closed-loop sensors (i.e. Rugowski coils) these have much better tempco and noise immunity than classical hall effect sensors.
Obviously you will pay more for closed loop, but it sounds like you are not really doing mass production runs. If you were doing large quantities I might suggest a dsPIC uC solution and open-loop sensors with some sort of cheesy temperature compensation to keep your price point down ... but for dozens of parts decent sensors and $10/chip Propellers are not bad to go at all.
My attitude is that if I do low rate, then I should use whatever chip makes the development easiest, as the engineering time is driving my price point. For a lot of things I build, the Prop saves me a vast amount of time, and that's $ saved...
Good luck!
Mike