1. franzschluter

    Thread Starter Active Member

    Jun 1, 2009
    95
    0
    Hello I am new to MCU. And I have a couple of questions regarding MCU specs..

    For starters to my project, I would like to get the hardware in the correct order not to purchase the wrong items. And hence the programming later on...

    I need the following requirements
    -2 input Analog Comparator of at least 200ns reading response
    -1~2 ouput Highspeed PWM at least 1Mhz. Pref 10Mhz.
    (This will be linked to a high power mosfet generating 90V~160V @ 1~10Mhz @ 25Amps. As an electrode in an EDM)
    -Enough pins available for LCD and a simple touchpad preferably (10 buttons)
    -If possible C language.. I am bad with assembly language
    -Multi-threading

    The scenario is in an EDM.
    The MCU will measure 90V~160V from a voltage divider. Once the electrode (Anode) touches the workpiece (Cathode) the voltage will naturally drop till it shorts or 0V.. The MCU detects this and will retract the electrode.. The user may be able to set a certain Voltage drop level to maintain the distance between anode and cathode..This is the basic process of EDM...


    -The pulse on the electrode must be PWM and adjustable like mentioned above.
    -The ADC integrated in the MCU must be able to react fast enough to retract the electrode in order to reach a preset voltage level. (Not shorted not open)...
    -A menu would be nice to set the desired voltage level and the pulses for its electrode.

    So far I have done this using analog parts. Aka LM339 and trimpots. Somehow I would like to upgrade my system using an MCU for more functions and perhaps even later on softwarewise a PID.

    Could anyone recommend me which MCU is best suited for this task?
     
  2. ctstoner

    New Member

    Jul 12, 2011
    3
    0
  3. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    Multithreading and C are not intrinsic to a microcontroller. Most popular micros these days have a C compiler available. Multithreading is usually operating-system dependent, and not all OSs support all micros.

    IF multithreading is really needed, look at the different OSs and which micros they support, then work from that shorter list.

    --Rich
     
  4. franzschluter

    Thread Starter Active Member

    Jun 1, 2009
    95
    0
    Thanks for the hint. I will look further into this type of MCU. The specs so far seems fast enough except for the 1Mhz PWM. Wish it would go further up.

    @RiJoRI

    I thought they were partially intrinsic. The last time I used a PIC was 7 years ago and it did not support C language. I dunno how it is today.



    A video example of a DIY EDM built with MCU is here..
    http://www.youtube.com/user/PromaElektronika#p/u/4/fCknNrlfFRo

    It works similar to a torch height controller in a CNC setup. The height between the electrode and workpiece is constantly adjusted to the preset voltage. Neither a short or open circuit should occur (though it happens) in a burn process.

    As far for price I wouldn't mind price. The most important aspect would just be speed to react and the generation of high PWM frequency. It would be great if the MCU had a lot of SRAM as well. As a lot of menu text might come in handy.

    Regards
    Franz
     
  5. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    The problem is the other way around -- is there a C language compiler for your micro!
    The compiling steps are as follows:

    [C program]->(C Preprocessor)->(C Compiler)->(Assembler)->(Linker)->[.HEX,.OBJ,etc. files]

    This was a lot more obvious in "the old days" when a separate program was run for each step. If you look at GNU CC, you will see that it is available for many micros. Chances are good that all that gets changed is the "back end" -- the assembler and linker.

    --Rich
     
  6. nikwal

    New Member

    Jan 21, 2011
    3
    2
    Not 100% sure as I've not used them but I'd have a look at the atmel at90pwm3 or similar. And my favorite compiler for avr is codevision but it's not free. I stick to the atmega series.
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Microchip basically gives away their C compilers, though after 60 days they don't do some advanced function (code optimization), but they can and do perform a very useful service.

    As your app is the only thing running and you have full access to all the system interrupts I would not be concerned with multi-threading: that entails an operating system and WILL be slower then not having such.
     
  8. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    I would suggest re-evaluating the device topology.

    You say you want 1-10MHz PWM at 160v 25 amps? That power stage alone is significantly complex and expensive that the extra complexity of doing the PWM in analogue is insignificant. I would make a 160v 25amp PWM driver with an extra few parts so the PWM is controlled by an analog input voltage 0v-5v. Then generate the 0v-5v via the microcontroller.

    Also re the "high speed comparator" requirement, the mechanism that retracts the electrode will be many times slower than the abilities of any microcontroller so it is not really an issue.

    I would start with the microcontroller that you can work with the easiest (have most experience with etc) and solve a couple of those other problems via hardware. If you don't have any micro experience then it's probably even wiser still to solve the harder or highest speed issues in hardware rather than reach for a much faster more complex micro... ;)
     
  9. franzschluter

    Thread Starter Active Member

    Jun 1, 2009
    95
    0
    Thanks a lot for the insights..
    Actually the EDM machine is finished and is working. It does its timing with a LM555 pushing its limits already 500Khz. I am generating 25A with it via a mosfet driver and a big mosfets... The mosfet driver and LM555 in between is an opocoupler.
    Now I'd like to upgrade its system to using Micro-controller. As the advance machinery have their parameters really flexible and variable. I would like the pulses to be programmable in the future.....

    I had copied some of the codes from a Torch Height Control.. So far I'm trying to get some C++ being done..

    Regarding hardware I am unsure which Micro-controller or kit is best suited..

    PS.. I am very aware of the high costs >.<

    Regards
    Franz
     
  10. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Which microcontroller do you have the most experience with? Or the greatest support with (ie friends, colleagues etc that use it)?

    If you are going to do it all yourself with no experience and little/no support network then an easy learning device like an Arduino might be a good choice. That has a great support community online and there is a ton of source code available.
     
Loading...