Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Converting Audio pins to PWM ?
Author | Message | ||||
StoveMan Regular Member Joined: 29/03/2013 Location: United StatesPosts: 51 |
I cannot seem to find info on stealing one raw PWM signal from CGcolormax2. Documentation (very nice CG) says mods may be needed. I can bash the SM components out of the way and use the trace from the PIC I guess? Do I need a weak pulldown to achieve a true 0% output after "PWM STOP"? I am driving a BLDC motor. The driver requires 0-5v signal which I plan to MOSFET up to the required voltage. I just need a real 3.3v pulse to work with. Hardware generation is probably the best here as the prog. is getting BIG already. Thanks, Frank |
||||
StoveMan Regular Member Joined: 29/03/2013 Location: United StatesPosts: 51 |
Hi all, I have sucsefully hacked the PWM output on my CGmax2. I am using a Sparkfun inspired level converter circuit and getting 0-4.96v out. Motor runs nice and quiet at 40K freq. Only thing is... When I issue a PWM stop command output goes to 100% and stays there? PWM 40000,0 gives me 0% output as expected. I did try a 10K pulldown to see if the pin was just floating up. No dice. Hmmm... Frank |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Yes, hmmmmm. From what I remember the output does go high when idle, which does not make sense in this case. The PWM OFF command was really intended to free up the resource for another use, so if you will always be using it as a PWM output you should just use PWM 40000,0. This is another thing that I can look at when I get back. Geoff Geoff Graham - http://geoffg.net |
||||
StoveMan Regular Member Joined: 29/03/2013 Location: United StatesPosts: 51 |
Geoff, Not a problem. I've coded a workaround using a UL2803 (which EVERY micro needs CG!) to ground an enable pin on my motor driver. I'll have to see how it acts on boot or program termination though; motor really screams with with an 8" radial blade cavitating cause the air shutters are closed! Resources huh? There's always a tradeoff, can't have everything. Frank |
||||
Print this page |