Author Topic: MCU based PWM meter input isolation  (Read 4138 times)

0 Members and 1 Guest are viewing this topic.

Offline RoadRunnerTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: de
MCU based PWM meter input isolation
« on: March 03, 2012, 03:10:30 am »
hi guys
     i 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% accuracy
is that much range is fine or should i do some improvements
like should i go to more higher in mhz frequency like 6 mhz
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10223
  • Country: nz
Re: MCU based PWM meter input isolation
« Reply #1 on: March 03, 2012, 10:47:43 am »
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.
« Last Edit: March 03, 2012, 10:49:59 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: MCU based PWM meter input isolation
« Reply #2 on: March 03, 2012, 11:15:44 am »
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.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline RoadRunnerTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: de
Re: MCU based PWM meter input isolation
« Reply #3 on: March 05, 2012, 01:30:21 pm »
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.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: MCU based PWM meter input isolation
« Reply #4 on: March 09, 2012, 12:31:43 am »
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/2170659

You 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.
 

alm

  • Guest
Re: MCU based PWM meter input isolation
« Reply #5 on: March 09, 2012, 12:46:56 am »
and moving the pic hot side is not quite a possible thing  for this type of condition.
If 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.

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/2170659
But 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.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: MCU based PWM meter input isolation
« Reply #6 on: March 11, 2012, 03:11:21 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf