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.
I have the old Triang.. I have about 7 trains and tones of rolling stock... The trouble I have is the old Triang's wheels are too large.. I will have to turn them down... I have several newer engines but as you say, a bit smaller.

I have a full engineering shop at my disposal so modding is a bit easy for me..
 
The trouble I have is the old Triang's wheels are too large.. I will have to turn them down... I have several newer engines but as you say, a bit smaller.

Forgive me and with respect Ian, I have to ask.....why?

The engines have to be at best 50 yrs old, old XG4 ( was that what they were called?) 3 pole motors, probably need re-magnetizing etc.
Is it worth it? Or is it that you can do it? Or maybe just the challenge. Even a decent dcc decoder is not going to improve the operation of those engines is it?

Willy
 
The engines have to be at best 50 yrs old, old XG4 ( was that what they were called?) 3 pole motors, probably need re-magnetizing etc.
I have motors in abundance... I have already replaced most of them... Two are the motors you described they are in the tender.. I have machined the tender to take the newer motor and I have now a jig to machine down the wheels to fit on a standard rail. I don't have much Triang track anyway! Don't get me wrong.. I have quite a bit of Hornby, I just don't have DCC yet!... Yet!!! It'll be something to do...

On a side note! I have made an Android hovercraft controller ( Not quite finished the hovercraft ) I may use that as the station...
 
Yep 15v is fine, but you might want to make the pot on pin 9 2k2 as 15v takes it to 1/4 watt dissiapation, and to answer another of your question this pot on pin 9 is just something I added to generate the input voltage, hence the dotted line on the schem, on your final circuit you'll have your 0 - 10v signal connected here instead.
Yes the 47k sets the frequency, my circuit just has a 22k fixed resistor, but the 47k would be better as it'll give you loads of adjustment.
Yes the added transistor on pin5 disables the 4046 and sets the output low when the input on pin9 is below 0.6v.
I got my 4046's from cpc so yep they will work ok, cpc is just around the corner from me, allthough I tend not to use the trade counter as they make you stand for an hour.

As for old magnets, I have a bicycle hub dynamo, pre war, it had an alnico magnet its been replaced with neo's and still works fine.
I have some scalextric cars, before scalextric cant remember what they were called, anyway after 50 years the motors are still going strong with the original magnets.
 
Last edited:
Hi drpepper,
no work today? Late shift?
Anyway......having internet probs for 2 days this end have no malware or virus checker at moment as was knocking out mozilla...will get back to you.
Willy
 
Yep 2 -10.
Malware bytes is a good antivirus, you can have it free for 2 weeks.
 
Hi Guys,
Where to start?...................

drpepper, as always thanks for your time and comments. I have been trying to understand how the circuit works that you have posted. I have built a few failed circuits due to my lack of this and it dosn't do your confidence any good! Having read the data sheet I think I have a good idea now of whats happening.
On the output pin (4) what is the diode and second 2N2222 doing?

Last weekend I again looked at the AD654 which I now think ( rightly or wrongly ) offers some benefits over the 4046. I do not wish to appear ungratefull for your help with this aspect drpepper. It is with comments and input from the likes of yourself that I question and indeed learn from.

The AD654 can be fed from the midi 5v . The input has to be 1v at max as it has to be 4v lower than VCC. The output of this device is TTL compatible. It states in the data sheet (rev c) that it operates from 0 to FSS . Of interest this device is listed as a current to frequency converter. Cons? It costs about £10 but that not a prob. My only concerns at the moment are how to source a max input of 1 volt, 1ma input from a 20k pot. Ideas welcome.

With reference to timing capacitors I note (drpepper) you recomend using a tantalum capacitor as do'es the .pdf. However when I look for suitable items in the cpc catalogue they quote a +- 20% accuracy? Is there a better alternative?

Finally if only for now, Ronsimpson suggested the use of a micro. With the possibilty of someone writting a executable for one would that be the most sensible and easiest way to go?

I look forward to your comments guys,
Willy
 
cpc is just around the corner from me, allthough I tend not to use the trade counter as they make you stand for an hour.

As for old magnets, I have a bicycle hub dynamo, pre war, it had an alnico magnet its been replaced with neo's and still works fine.

I used to have a hub dynamo on my bike . Got fed up with the 'drag' so bought battery lights!

CPC? Near the old Fulwood Barracks? Last trip up north west popped into one of 'my' service stations. Morrisons in Blackpool Rd. Normally there or Sainsbury's at Bamber Bridge.
 
I dont notice any difference at all, it takes 200 - 300 watts to push a cycle, and draining 5 off for the lights isnt much, unlike a bottle dyamo your not creating loads of friction, I build my own wheels, even tried a 32 spoke sturmey archer dynohub on a 36 spoke wheel.
The barracks is just round the corner, I used to frequent the barracks chippy, till the old dear sold up now its not as good.
The garrison pub is no longer, I think its going to be a retirement centre.
 
I dont notice any difference at all, it takes 200 - 300 watts to push a cycle, and draining 5 off for the lights isnt much, unlike a bottle dyamo your not creating loads of friction, I build my own wheels, even tried a 32 spoke sturmey archer dynohub on a 36 spoke wheel.
The barracks is just round the corner, I used to frequent the barracks chippy, till the old dear sold up now its not as good.
The garrison pub is no longer, I think its going to be a retirement centre.

Yeah mine was a bottle one....
Willy
 
Like riding with the brakes on, noisy too.
 
Hi Guys,
Anybody got any comments on my post no 48 above?
I think I should have put my responces in chronological order!!
Sorry,
Willy
 
Tell me the functions you need, I'll write some code ( I'll even program a chip and send it to you) All I need to know is functionality.

BTW.. The SD card idea has failed... Too noisy... I thought it might be.. Booster station seems to work ok... I have a little Arduino as my decoder... Just LED's for functions... I won't give up though!! I'll have a sound card working soon..
 
Tell me the functions you need, I'll write some code ( I'll even program a chip and send it to you) All I need to know is functionality.


Hi Ian,
many thanks for your kind offer which I would like to take you up on if I may.
The idea is relatively simple . At a voltage of approx 14v and the speed control at max, my OO loco is traveling at a scalespeed of 25mph. Taking into consideration wheel dimensions etc this equates to 10hz which is = to 2.5 revolutions. Why 10hz then? There are 4 'chuff' sounds per revolution for a 2 cylinder loco. With possibly only one suitable pulse output from a device I can divide the 10hz down with TTL to 4 midi note inputs, or indeed do it in the music software (round robin count). Should it be better to use a multiplier within the micro then no prob I can divide down after.

The input will consist of a 0 to 5v analog input via a 20k pot which equates to a 0hz to 10hz output.
Why the 20k pot? This is the same value as one I have decided on for the speed control. By using a double ganged pot I am hoping to sort of sync the micro pulse outputs and the speed (voltage) together. Harry Tate and Fudge will spring to mind but I believe it is feasible. I have now got adjustment at both ends of the speed (voltage) control which because of the aforementioned pot is electrically isolated from the micro and onwards to PC. Also I can change the slope to better replicate that of the micro should I need to.

Ronsimpson suggested and I quote The disadvantage is that the micro can only measure the voltage in 1024 steps, so you can only have 1024 different frequencies. If you are turning the 10k pot by hand, the micro can read to 0.1 degree rotation. Is that good enough?

I do not see that as a problem and it certainly would be good enough.!

To recap then I wish to implement a simple circuit that takes a 0 - 5 v (or other) voltage and outputs 0 - 10hz (10.24) over the input range.

Is that it? Well no. As we now have a pulse that is relative to a wheel circumference then it is simple maths to ascertain distance travelled and use this to alter a 0 - 5v analog input pan control on the sound system. But that can wait...................

BTW.. The SD card idea has failed... Too noisy... I thought it might be.. Booster station seems to work ok... I have a little Arduino as my decoder... Just LED's for functions... I won't give up though!! I'll have a sound card working soon..

Its long been a dream of many model train buffs to utilise an sd card because of its better sound quality over DCC soundchips....


Again, thanks for your interest and help.
Willy
 
I was also wondering how you get the data out? Lets assume the loco has a switched output on the running gear ( I'm trying one out next week, I'll let you know how I fair).. Its the same idea that I use in my anemometer Anywho... The DCC is a one way communication system... How do you get the data back to the throttle?
 
I was also wondering how you get the data out? Lets assume the loco has a switched output on the running gear ( I'm trying one out next week, I'll let you know how I fair).. Its the same idea that I use in my anemometer Anywho... The DCC is a one way communication system... How do you get the data back to the throttle?

Hi Ian,
Simple. I am not using DCC! The control method is good old fashioned analogue with no decoders etc in loco's. The generated pulses are relative visual and audio wise to the chuffs of an engine and not connected electrically in any way. As I said the the double ganged 20k pot controls both aspects namely speed (voltage) and pulses (sound) The movement of both pots being relative to each other. So just think of the idea as simply a 20k pot varying a 0 - 5v analogue input with 0 - 10 hz out.

As far as the pot's concerned, There is enough time to oversample ( smoother output ) I normally oversample by a factor of 24... It will feel more like a 12 bit input ( 4092 steps)..

That sounds brilliant. Can you tell me which micro you would suggest as I would like to read up on it so I can have a better understanding?

Thanks,
Willy
 
That sounds brilliant. Can you tell me which micro you would suggest as I would like to read up on it so I can have a better understanding?
I mainly use pic's.... Any pic would do the job.. My favourite pic of the month is the pic12f1840... I use them daily!!
 
Love that chip too, but your other favorite , the 16F1829, will have more pins.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top