Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Very Low Frquency V to F convertor.

Status
Not open for further replies.
Okay... Question!

I have a pic12f1840 with two analogue inputs... I have mapped a frequency output to the "Speed" pot and I now I get 0~10hz that is linear to the input!! What will be the min and max wheel sizes?
If I put mid position at 0~10hz , min at 0~15hz and max at 0~7hz..

Are we good to go? I'll build it on breadboard at work tomorrow ( if I can, work sometimes gets in the way ) and I'll do a video..
 
Okay... Question!

I have a pic12f1840 with two analogue inputs... I have mapped a frequency output to the "Speed" pot and I now I get 0~10hz that is linear to the input!! What will be the min and max wheel sizes?
If I put mid position at 0~10hz , min at 0~15hz and max at 0~7hz..

Are we good to go? I'll build it on breadboard at work tomorrow ( if I can, work sometimes gets in the way ) and I'll do a video..


Hi Ian,
You are of course a star!
What will be the min and max wheel sizes? Ok. I think without doing the maths that +/- 30% would be great. Thus min = 13hz and max aswas = 7hz

Thanks,
Willy
 
You are of course a star!
Not so fast!!!!

I just need to change the output... Silly me! I have tried to keep it simple...

Two things.... There is no stop!! When the pot is in the zero position I need to stop the pulse completely BUT!! There is always a but... Your pot may differ from mine, so I have to program a dead zone.. Say the first 2% of the pot!

Second.. When the train is moving slow ie.. 1hz all the pic is doing is delaying.. So when the pot is moved it seems unresponsive until the cycle is done.. So I'm going to shift it into an interrupt, then the pot will be responsive..

Three!! ( I know! There wasn't a three ) Real time is slightly different to sim, so when we are at 10hz, it was 7hz... Bugger!!

I'll do a vid in a mo!!
 
Not so fast!!!!

But your still a star!

OK.
Two things.... There is no stop!! When the pot is in the zero position I need to stop the pulse completely BUT!! There is always a but... Your pot may differ from mine, so I have to program a dead zone.. Say the first 2% of the pot!

Lets not forget Ian that these are basically toy trains we are playing with! It was only ever going to be a good aproximation. In fact with DCC systems allthough back emf is utilised, the wheel/chuff sync is still only an aproximation.

but... Your pot may differ from mine, so I have to program a dead zone.. Say the first 2% of the pot!

I am aware of this factor to some degree as a similar situation arises with the dc motor. It does not start to turn on .5v probably more like 1.5v and I have taken this into account. Know what stiction is? In fact by having what I would call a holding voltage when the loco is stationary it should improve response of same when playing I think!

I have now, thanks to a contact who is more analog circuit savvy than I got not only a variable voltage when the pot is at max but also, via a sort of variable zener circuit a variable voltage when the pot is at zero. It is the age old maths problem when is zero zero? So the deadzone is of little importance and probably doing me a favour. Dont forget the whole idea is based around a double ganged pot. One for dc motor voltage and one for pulse speed output. This gives me not only electrical isolation between the 2 actions but also the ability to tailor the movement to that of the pulses independent of the latter.

I don't think I need to mention this but I am working with linear taper pots.

Oh yes, if it is easier I can always divide down the pulses if you need to higher the freq of the pic? Not a problem.

Regards and thanks,
Willy
 
HI Ian,
Just noticed your vid!
You are probably not aware but the output is divided by 4 (for the chuffs as mentioned) so I think what you have done is great! If you imagine that 4 pulses are required per revolution then that is slow! Also when a steam engine initially moves it dosn't always chuff at the same instance. It depends on the position of the cylinders.

When an engine slows down it dosn't chuff as it is coasting so pulses are not required . I can take this into account on the way down and program sounds acordingly. Music Software Samplers. I love them.

Will pm you later.
Thanks again
Willy
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top