Hi. I’m a kinetis newbie. I bought a Frdm-K02z for $13.50 to smarten up a big tesla coil I’m building. I thought it would be easy to set up and program an mcu since all the kids these days are doing it. But after dozens of hours of reading, learning and cramming, frustrating failure and so few golden breakthroughs, I’m finally able to do things with KDS 2.0.0 and PE on Ubuntu 14.04. But only some things.
I have to run kds as root out of a terminal, which is good because I can see what it’s up to. The PEmicro dubug link worked right away but was very slow, Segger J-link only worked the second time I installed it, and OpenSDA has never worked for me. Printf eluded me for a long time but I finally got it working through segger. I can only dim 2 led colors with pwm at once and I never got the TSS Library to work. Ksdk doesn’t work. I never got any examples to work and most tutorials I followed led nowhere. The only stuff I have made work is what I write from scratch. Now I can add and configure components, jump to methods, spell the property names correctly and things are happening. I really like PE and all that it does for me, and Eclipse (never used it before) always shows me where the warnings and errors are so I don’t have to track them down. Very slick.
Now I can start to develop my project which is a basic single phase 120vac to 3 phase 230vac inverter to drive a synchronous acim motor. I already have a 3-phase driver board that’s good for 1000 watts even though I only need 200. It provides the voltage and big igbt switches. It just needs 3 pwm signals that correspond to sine waves each 120 degrees apart from each other. With up and down signals for each wave that makes 6 wires total. So I want to set up a 6 channel timer in complementary mode with dead time insertion to feed the driver board.
The source of my sine waves is novel: I will transform the ac line down to 1 or 2 volts, add a dc bias to put it up above ground and then sample it with an A/D converter. Fill one or 2k of ram with the data, then read it out from 3 different places while continuing to sample and record, overwriting the old data with the new. Sounds like I’ll need some multi-threaded code there. I need to do this because my motor spins a disk studded with electrodes and the rotation must be synchronized with the ac line. So when the ac line voltage peaks the electrodes are in the firing position. That’s why an ordinary vfd won’t do, they rectify the line and all the phase information is gone. See my pictures at teslafirma.shutterfly.com. Commercial vfd’s often output pwm signals in the 12 to 16 khz range which is several times faster than I will be sampling. I suspect that I will use an interrupt to sync the input samples with the output pulses but I’m not there yet.
What I’m hoping to get from the Kinetis community is any ideas, tips, gotchas and flashes of inspiration that immediately spring to mind. I don’t need my app to be written for me, just any advice experts can throw me to help make this easier. I can assemble the final project myself. So if any part of this project no matter how small jumps to mind then please let me know. Thanks for your time and have a great day!