PDA

View Full Version : analog help



cphillips82
- 23rd September 2008, 12:30
just wondering if somebody could give me a hand with some old ohms law, I am using the hpwm command to a 4n35 isolater so I can interface with a hendon OM5428 phase controller IC. This chip supplies me with 0v and -14v dc of which I need about -.3v to -7 volt to control the chip's phase output.I have managed to do this with a little persistance and dumb luck in putting a circuit together but it doesnt work well enough, by which I mean out of the commands 255 most of the dimming occurs from 0 to full bright at about 50 and I'm all out of ideas
anyone??
p.s dodgy pic of circuit included
Thankyou in advanced

Darrel Taylor
- 23rd September 2008, 18:06
... by which I mean out of the commands 255 most of the dimming occurs from 0 to full bright at about 50 and I'm all out of ideas anyone??

You could use 10-bit HPWM.

Then the 0-255 would give the same output as 0-63 with the 8-bit version, and you'd get 4 times the resolution.

Here's an easy way to do 10-bit HPWM ...

HPWM10
http://www.picbasic.co.uk/forum/showthread.php?p=37805&#post37805
<br>

Acetronics2
- 23rd September 2008, 18:27
Hi, Darrel

Glad to see the site again ...

Alain

Darrel Taylor
- 23rd September 2008, 19:31
Glad to see the site again ...
Hi Alain,

Wow, I just got it running again yesterday.
Nothing get's past you. :)

Cheers,

cphillips82
- 23rd September 2008, 21:42
Thanks for your suggestion but I think that would just close my window even further,I wouldnt think this would do much except bring the sweep down to 0 - 20 ,I think this is simply not having the correct value components in place in the voltage divider. But I do think alot which I'm often wrong!

Darrel Taylor
- 23rd September 2008, 23:01
Thanks for your suggestion but I think that would just close my window even further,I wouldnt think this would do much except bring the sweep down to 0 - 20 ,I think this is simply not having the correct value components in place in the voltage divider. But I do think alot which I'm often wrong!

Yup, you're thinking the wrong way.

If the usable range was 0-50 before, then changing to 10-bit will increase that range by a factor of 4, which gives 0-200.

You could change the resistors in the divider to retain pure PBP. But you may also want to consider the other benefit of HPWM10 ... Glitch Free Operation.

Constantly updating the normal HPWM command can really mess up the waveform. But with Glitch-Free, it doesn't matter how often the DutyCycle is changed. You'll still get "Clean" PWM.
<br>