There is a simple way to convert analog to PWM using a comparator, but it will probably be faster to simply do it in a PIC if you only need one of them. With the PIC you just set up a PWM output and an analog input and copy the latter into the former.
To convert analog to PWM you take a triangle wave into one input of a comparator and the analog input into the other input. The triangle wave should be the same amplitude as the analog input. Which signal goes to which input will determine the polarity of the output. The thing that takes time in a one-off is generating a temperature stable triangle wave of the right amplitude. Javid ----- Original Message ----- From: "Anders Wallin" <[EMAIL PROTECTED]> To: "Enhanced Machine Controller (EMC)" <[email protected]> Sent: Saturday, January 19, 2008 1:22 PM Subject: [Emc-users] Analog to PWM or pulse-train ? > Hi All, > > My VFD has an analog output which can be programmed to indicate either > output frequency, current, or power etc. > > I'd like to read this into EMC so I can monitor and plot the spindle > load while the machine is running. > > I have a M5i20 card which doesn't have analog inputs, so I'm wondering > if any of you know a nice simple way of converting the 0-10 V into > either PWM or a pulse-train (FM) or something else that can be read by > one IO pin (read say every 0.1 ms) on the m5i20 ? > > I know a small 8-pin PIC could do this easily but if there are ICs that > do this out there I'd like to avoid the programming... > > > Anders > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
