MCU based PWM meter input isolation  - Page 1
Forum section: electronics / general

author: RoadRunner
author_rank: Frequent Contributor
timestamp: March 03, 2012, 03:10:30 am
content: hi guysi have created a PWM meter based on a PIC microcontroller, the software is working fine and very accurate.but my problem is who to isolate the input pin of the mcu from the external circuitry?what are possible ways to do that?and one more thing , the current range of the meter is 1 to 64 Khz accuracy with >0.1% accuracy and >64khz to 640 khz with 1% accuracyis that much range is fine or should i do some improvementslike should i go to more higher in mhz frequency like 6 mhz

author: Psi
author_rank: Super Contributor
timestamp: March 03, 2012, 10:47:43 am
content: I think up to 1-2mhz would be nice, that would cover most switch mode pwm circuits.An opto-isolator sounds like a good idea for isolation but you may have to look around for the right one, or add some input amplification, if you want high impedance inputs.

author: Bored@Work
author_rank: Super Contributor
timestamp: March 03, 2012, 11:15:44 am
content: If you can't isolate the input to the PIC, consider isolating all outputs in use. I.e. move the PIC to the "hot" side.Regarding accuracy, this depends very much on your frequency reference. Assuming you got the measurement circuitry and algorithm right. If you use a crystal, then your accuracy values don't seem to be too great.

author: RoadRunner
author_rank: Frequent Contributor
timestamp: March 05, 2012, 01:30:21 pm
content: Sir,i think the optocoupler will not be a good solution for a signal that can go high up to 5-6 MHz(i have increased the range up to this level with 0.01% accuracy) . the optocoupler are really very slow.and moving the pic hot side is not quite a possible thing for this type of condition.did any one has some other better Design solution.

author: gxti
author_rank: Frequent Contributor
timestamp: March 09, 2012, 12:31:43 am
content: Traditional optocouplers might be too slow but there is no shortage of digital isolator chips that can run to hundreds of megabits per second. This is the first thing I found on Digi-Key, it goes to 150Mbit/sec and is available in up to 4 channels in various configurations:http://search.digikey.com/us/en/products/SI8410BB-D-IS/336-1752-5-ND/2170659You should consider a hot-side MCU, it doesn't make a difference for basic PWM but it gets you a high-impedance input and if you add any analog capability then it makes the front-end design much simpler. If you need a hot-side power supply, there are reasonably inexpensive (about 5 USD) potted devices that will bring the power across with isolation.

author: Unknown
author_rank: Unknown
timestamp: March 09, 2012, 12:46:56 am
content: Quote from: Gaurav on March 05, 2012, 01:30:21 pmIf you want people to help you, giving more information that would be helpful. Why not? Too bad that the information is now split up over two threads, since I believe you gave more information in the other thread.Quote from: gxti on March 09, 2012, 12:31:43 amBut will they reproduce the pulse width, which may not be a CMOS-level signal by the way, with 0.01% accuracy? I believe they modulate the digital signal to RF, send it to the other side, and demodulate it again. I wouldn't be surprised if this caused some minor distortion, which would be irrelevant for digital signals. Pulse width distortion is specified as 2.5 ns max, which would be > 1% for a 6 MHz signal.

author: Baliszoft
author_rank: Frequent Contributor
timestamp: March 11, 2012, 03:11:21 pm
content: Use a plain resistor to limit the current going into the pic. It has got internal clamping diodes on its pins. I did a 20hz-20khz freq counter this way. As long as you do not turn on the clamping diodes the speed can go up quite high with a 33k resistor for example. May worth a try as it does not require anything just a resistor.