Shop OBEX P1 Docs P2 Docs Learn Events
Using the Propeller as a controller for a high power switching power supply — Parallax Forums

Using the Propeller as a controller for a high power switching power supply

DomDom Posts: 3
edited 2011-09-21 19:59 in Propeller 1
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 tongue.gif ) 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 ...

Comments

  • RaymanRayman Posts: 14,999
    edited 2008-02-26 15:44
    I currently have a 50-kW DC-DC switch-mode converter controlled by a Propeller (just one module of a 150-kW supply)...· The core of it is a delay generator object with 1-us precision posted here:

    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

    ·
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-02-27 08:23
    Dom said...
    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.
    Mike Green posted a solution to this recently. Just use an inverter on the pin (or for leds just hook them up to +ve instead of ground) so that off is on. Than any cog can turn your device off by turning the pin on.
  • DomDom Posts: 3
    edited 2008-02-27 10:08
    Thanks to all who responded! Great forum when one gets so quickly useful responses!

    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.
  • zmrbillzmrbill Posts: 2
    edited 2011-09-02 15:29
    Ray,

    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 GreenMike Green Posts: 23,101
    edited 2011-09-02 15:44
    You may have gotten an idea from Chip's manifesto that Parallax generally keeps core products around for a long time. They still sell the BS1 as well as most models of the BS2. The BS1 has been around since 1992 (almost 20 years) and the BS2 since 1995. The Prop I has been around for 5 years already and they're working on the Prop II which will be a significant upgrade, but won't replace the Prop I since the Prop I has features that the Prop II will not have due to the different chip manufacturing processes used.
  • zmrbillzmrbill Posts: 2
    edited 2011-09-02 18:56
    Mike Green wrote: »
    You may have gotten an idea from Chip's manifesto that Parallax generally keeps core products around for a long time. They still sell the BS1 as well as most models of the BS2. The BS1 has been around since 1992 (almost 20 years) and the BS2 since 1995. The Prop I has been around for 5 years already and they're working on the Prop II which will be a significant upgrade, but won't replace the Prop I since the Prop I has features that the Prop II will not have due to the different chip manufacturing processes used.

    Mike, please forgive me but your reply is from left field...what are you replying to regarding high power switchers?

    Bill
  • Heater.Heater. Posts: 21,230
    edited 2011-09-02 23:12
    Zmrbill,
    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.
  • LawsonLawson Posts: 870
    edited 2011-09-03 15:01
    If you're oversampling with the ADC I've had good luck with using a CIC filter as the first stage. A CIC is an efficent implimentation of a moving average filter so it can easily be designed to only use add, subtract, and shifts. Not the best filter on it's own, but sufficient as a digital AA filter and cheap enough to cascade a couple CIC stages to improve out of band filtering. (a 3rd order CIC should be ~3 instructions/channel at full rate and 10 instructions at the reduced output rate assuming a decimation ratio less than 2^6 with 12-bit data)

    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
  • madrfskillsmadrfskills Posts: 24
    edited 2011-09-21 19:59
    Good luck on the design.

    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
Sign In or Register to comment.