pwmout/ir singal drama

Gribble

New Member
Hey all, im building a robot vehicle for a uni project, the basic story is that it needs to be able to sense walls in a small maze so that by logic it can navigate its own way through.

Anyway, ive been toying around with the pwmout command this afternoon and cannot seem to get it to work. When I put a simple green led with with a "high, pause, low, pause, goto" program it works fine, but when I set the pwmout command i cannot see a thing, led or ir. Ive set the ir led with the previous program and with the phone camera i can see it flashing, however there is still no signal when pwmout is used. My pwm is set to 38kHz but ive tried all sorts of combinations, even 99% duty to see if it lights up.

What im i doing wrong? Ive used pin1 in both programs, ive also searched, but cannot find precisely what im looking for.

Any help is appreciated. :)
Thanks
 

bgrabowski

Senior Member
Please let us know what Picaxe you are using and if possible attach a circuit diagram or photo of your set-up.

If you just want to know if a wall is present or not I rcommend that you consider Hamamatsu proximity detectors available from www.active-robots.com at £4.23 each. They give a digital output, use visible light from a superbright red LED so you can see them working and are not affected by ambient light.

If you want to pursue IR sensors have a search for micromouse on Google. There is a lot of information available.
 

Gribble

New Member
28x1, using output pin 1, i can draw a circuit diagram later when im not at work, but its basically pin1 just switching a bc337 npn which switches the IR on and off at 38kHz.

Thanks again.
 

BCJKiwi

Senior Member
On a 28X1
In1, Out1, and PWM1 are all on the same pin - physical leg12

you might try hpwm in single mode - check the manual on how to set which port/pin to use - as an alternative hardware driven pwm instead of software pwm.
 
Top