VCO

HI.
I would like to be able control a "voltage controlled oscillator" with an 08m. I have looked through the basic commands and can't seem to see anything that could control or give a variable output voltage. Can anyone give me a clue as to how to go about it?
 

Dippy

Moderator
Have a look at pwm.
With a bit of jiggery pokery with a couple of external components (R/C) you can get PICAXE to produce an analogue voltage within a certain range. Whether the resolution is good enough for what you is up to you.

I'm sure there was a recent(ish) thread where someone also posted a sketch or a link to a sketch.
 

kranenborg

Senior Member
Hello,

This is the link that provides the information:

http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=3381&forum_id=19&Topic_Title=PWM%2Banalogue%2Boutput&forum_title=No+new+posts+please%21+13

Of course it all depends on the resolution you want to have; you could maybe also use an opamp integrator that is fed by two picaxe lines delivering pulses with PULSOUT, allowing the voltage to ramp up and down at will. the integrator's capacitor would then determine the resolution. This only works if only a slow voltage variation is required to steer the VCO ...

regards,
/Jurjen
http://www.kranenborg.org/ee
 

premelec

Senior Member
for stable output voltages I use digital to analog convertors driven serially from the PICAXE or a digital potentiometer would work.
 
Thanks for input re VCO. I think that the digi-pot is the way for me to go.

I did some net searching and found a programme that "might" be usefull. It was to gradually light an LED, over about 30 secs.

for b0 = 0 to 255 step 1
pwm 2,b0,5
next b0

for b0 = 255 to 0 step - 1
pwm 2,b0,5'pwm pin 2, by factor of b0/255 % for 5 10uS cycles
sertxd ("The value is ",#b0,cr,lf)
next b0

I found by playing around with it, that the LED on/off time was increased to about7 mins when I changed the line:-
pwm 2,b0,5'pwm pin 2, by factor of b0/255 %
To;-
pwm 2,b0,200'pwm pin 2, by factor of b0/255 %

I have no idea what this line of code means. Could anyone tell me in simple terms?

David Miles.
 
Top