6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 12:30 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Wed Oct 26, 2022 1:30 am 
Offline

Joined: Fri Feb 04, 2022 4:06 am
Posts: 10
Location: Mid-west - USA
Hey, I have somewhat, an embarrassing question. (Yeah, I’m still new to circuit design. :oops: )

What I am trying to do, is to supply a “stable” +5v 60kHz (50% duty cycle) square wave pulse signal for a replacement power supply of my CBM 710 computer. On my first attempt, on a previous replacement PSU, I used an adjustable 555 timer module, I got the desired frequency, but I got a little too much of the occasional flickering. Wasn’t sure, if this flickering was due to spikes/noise from the +5-volt supply. (or perhaps, I was lacking a 5v power regulator leading to the 555 timer)

However, this time, I’m using the TL494 ic. But for the examples, I'm seeing, even though resulting generated 2 PWM signals are 5v, it appears the VCC supply voltage is +12V or above. https://microcontrollerslab.com/tl494-p ... 4_Examples

Yeah, a bit confusing to me, as the novice, since original 710 PSU schematic http://www.zimmers.net/anonftp/pub/cbm/ ... -lp-ps.pdf
lists a 4N35 ic, but the actual PSU I have clearly has TL 494 ic.

Could someone, sketch out (or describe) an example 60kHz PWM circuit? I'll really be grateful. :D
Well, let me know of a simple alternative.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 26, 2022 6:40 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Is the purpose to get +5V from +12, or vice-versa, or something else? There's more to getting a well behaved switch-mode power supply (SMPS) than just doing a PWM, and it's not territory that hobbyists do well in. I might recommend going with a ready-made integrated switching regulator instead, or just buying a complete power supply. One such regulator supplier we've used at work recently is Pololu. See https://www.pololu.com/category/136/voltage-regulators .

If you don't want the whole thing in one little pre-made module, there are tons of switching-regulator control ICs that have almost everything onboard except a few capacitors, an inductor, and a Schottky diode like a 1N5817. One I've used in several products, to get +12V from a 9V battery that gradually drops to below 5V as it wears out, is the MAX732 which keeps a constant frequency, although it's 170kHz, not 60kHz like you mention. Even there though, the layout is very critical; and if it isn't right, you'll get a noisy output that will skip pulses if the load isn't heavy enough. If you want to use the MAX732, post your design before getting boards made, and I'll point out what changes it needs in order to make a quiet output. It's especially hard to get a quiet output with thru-hole parts. Their lead inductance tends to be too much, something which the newbie might have a hard time believing; but my experience proves it.

Jameco's offerings of complete power supplies starts at https://www.jameco.com/c/Power-Supplies ... pters.html . Prices are very reasonable.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 26, 2022 8:51 am 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
The 4N35 is an opto-coupler. And it looks to me as an output for a 60 Hz (not kHz !!) Signal, that is called "CP timing output".
If this signal isn't present most likely the 4N35 is damaged.

BEWARE: when replacing the 4N35 be sure that all caps are discharged !! Some hundred volts DC can do lethal injuries.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 12:54 am 
Offline

Joined: Fri Feb 04, 2022 4:06 am
Posts: 10
Location: Mid-west - USA
Hello,
GARTHWILSON wrote:
Is the purpose to get +5V from +12, or vice-versa, or something else? There's more to getting a well behaved switch-mode power supply (SMPS) than just doing a PWM, and it's not territory that hobbyists do well in. I might recommend going with a ready-made integrated switching regulator instead, or just buying a complete power supply. One such regulator supplier we've used at work recently is Pololu. See https://www.pololu.com/category/136/voltage-regulators .

Thank you for your response.
Sorry, I was mistaken, that should be 60Hz PWM, not 60kHz.
Trying keep the solution, as simple as possible. +5v in, and +5v PWM coming out.
I already have a Mean Well PT-65B power supply, which addresses the GND, GND, -12V, +12V, & +5v requirements.
All I wanted was to replicate the 60Hz signal that feeds into the Pin #1 of the power connector.


Yes, I agree,
"There's more to getting a well behaved switch-mode power supply (SMPS) than just doing a PWM, and it's not territory that hobbyists do well in."

But, you when you take your 40 year Commodore computer into a half dozen computer repair shops, and they look at you saying, what the hell is that? You realize, you are in for a rude awaken.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 4:33 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
OK, so you need a 60Hz square wave generator.

You can rebuild the circuit from the original power supply, but then you are dealing with the mains - not recommended.

Using a 555 should work:
Attachment:
555.PNG
555.PNG [ 54.58 KiB | Viewed 1438 times ]

with R1 = 20.5 K, R2 = 110 K, and C = 0.1uF https://ohmslawcalculator.com/555-astable-calculator computes 60.000 Hz (!) and 54,26 % duty cycle (7,6ms low / 9ms high).

(I would use 18K + 5K trimmer for R1 to adjust for 60 Hz. R2 = 2x 220K parallel. An additional 0.1uF decoupling C across Vcc/Gnd is never bad.)


good luck!


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 5:33 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
What is that signal used for? If it has anything to do with video syncing it may be best to have it based on the mains frequency. Using a 555 might (probably will) cause issues.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 11:19 pm 
Offline

Joined: Fri Feb 04, 2022 4:06 am
Posts: 10
Location: Mid-west - USA
Hey,
GaBuZoMeu wrote:
OK, so you need a 60Hz square wave generator.

You can rebuild the circuit from the original power supply, but then you are dealing with the mains - not recommended.

Using a 555 should work:

*** This is exactly what I wanted, thank you. :)
I'll build this circuit, tap into +5v lead from the replacement PSU.
Yes, I will never attempt, to rebuild a PSU.
That's why I'm here, squawking like a mad duck, since I can't seem to find a modern PSU which supplies square wave generator.

BillO wrote:
What is that signal used for? If it has anything to do with video syncing it may be best to have it based on the mains frequency. Using a 555 might (probably will) cause issues.

Yes, this is for the video syncing and the for the Jiffy clock.

I find it rather baffling, why the heck this B128 is requiring this pulse from the Power Supply Unit, instead of generating it on the board.
None, of the other 8-bit Commodore computers has this requirement.

But I'm thinking since this signal has to so precise, I'll likely need to resort to a crystal oscillator and divide the frequency down to 60Hz.
https://www.eleccircuit.com/60hz-clock- ... or_circuit


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 11:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Right. A 555 with no crystal will not be very accurate. With Schmitt-trigger CMOS gates like the 74xx14, there's not much reason to ever use a 555 again either.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 27, 2022 11:36 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
Those MM5369 chips are as cheap as borsht. So are color burst crystals. I'd just skip the 555 and make the MM5369 circuit.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 28, 2022 1:05 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
vmarcus wrote:
Trying keep the solution, as simple as possible. +5v in, and +5v PWM coming out.
I already have a Mean Well PT-65B power supply, which addresses the GND, GND, -12V, +12V, & +5v requirements.
All I wanted was to replicate the 60Hz signal that feeds into the Pin #1 of the power connector.

[...] But I'm thinking since this signal has to so precise, I'll likely need to resort to a crystal oscillator and divide the frequency down to 60Hz.

The oscillator/divider would be a worthy project, and would help develop your skills. But if you feel there's already enough on your plate then you could consider the following approaches, which are much simpler but are a bit clunky to use, as they require a separate AC adapter aka "wall wart" in addition to your Mean Well power supply. NB- many wall warts deliver DC output; you need to locate one that has AC output. Thrift stores are a good source of assorted wall warts. Any output voltage from about 3 VAC to 30 VAC is acceptable.

-- Jeff


Attachments:
60 Hz .png
60 Hz .png [ 20.54 KiB | Viewed 1389 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 28, 2022 11:57 am 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
vmarcus wrote:
Yes, this is for the video syncing and the for the Jiffy clock.

This is more important than you might think: if the clock isn't synchronized to the AC main you will have video issues for sure.

That is why I recommend Jeff's suggestion using a wall wart AC adapter is save and easy.


good luck!


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 28, 2022 2:05 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Are we sure about this? I had the idea that video timing on CBM machines is completely unrelated to the jiffy clock, other than approximately.
https://en.wikipedia.org/wiki/Commodore_CBM-II

Although it seems the Plus/4 models are different in this respect: the two are synchronous.
https://retrocomputing.stackexchange.co ... ng-flashin


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 31, 2022 5:27 am 
Offline

Joined: Fri Feb 04, 2022 4:06 am
Posts: 10
Location: Mid-west - USA
Hello,
as per the following:
BigEd wrote:
Are we sure about this? I had the idea that video timing on CBM machines is completely unrelated to the jiffy clock, other than approximately.
https://en.wikipedia.org/wiki/Commodore_CBM-II

Yes, you're right, I shouldn't say "jiffy clock" :oops:

Here is what, I'm seeing from the schematics:
1. Page 12 - the 50/60 Hz signal feeds into pin 1 of Power Connector. http://www.zimmers.net/anonftp/pub/cbm/ ... 059-12.gif
2. Page 11 - this same signal feeds into 74L14 (hex inverter) of which then is connected to the pin 25 (IRQ0) of the 6525A and pin 19 (TOD) of the 6526A. http://www.zimmers.net/anonftp/pub/cbm/ ... 059-11.gif
According the 6526a specifications - http://archive.6502.org/datasheets/mos_ ... reated.pdf
The Time of Day Clock (TOD) requires an external 60Hz or 50Hz TTL level input for accurate time-keeping.

It's unfortunate, it's my pea brain that associates a "jiffy" as the period of an alternating current power cycle, 1/60 or 1/50 of a second.
https://en.wikipedia.org/wiki/Jiffy_(time)#Uses And since, a clock was depended on this signal, I just automatically, said jiffy clock.

And it's really weird, someone else actually ventured this same journey of replacing a B128/C610 power supply. https://forum.vcfed.org/index.php?threa ... 610.66228/
And apparently, I really do need to pay attention to lessons learned.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: