Which ACI improvements do exist (and work) ?

9 posts / 0 new
Last post
Offline
Last seen: 1 week 7 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 42
Which ACI improvements do exist (and work) ?

Hi Folks -

 

this week I finally got the PCBs from Newton Mike including an ACI.

I immediately proceeded to build the ACI, but decided not to follow the original circuit with the LM311 comparator.

Instead I did a few little cuts on the PCB and installed the components such that I have the LM741 based circuit from the Apple II.

The reason for this decision was all the bad experiences with the original ACI as documented on Applefritter and elsewhere.

I do not want flakey unreliable junk in my builds, to hell with authenticity here.

Based on the great reputation of the Apple II cassette interface, I expected a great outcome.

No so !

It did not work at all. Despite I had tested it on the lab bench (see attachments).

First I was bold and tried to load BASIC from a 22 year old cheap crappy dictaphone style cassette player with horrible tape wow.

Not one success at any volume setting.

Then I was humbled and tried to load BASIC from a sound file played on a notebook.

No success either.

Then I wrote some diagnostics routines and found the culprit.

A design bug.

After fixing this I could load BASIC even from the crappy dictaphone style cassette player. Every. Single. Time.

At any volume setting except very low and very high.

 

This said, I am getting curious what others may have done to improve the ACI.  Maybe I have just rediscovered a fix that already exists.

 

So, comments from all the Apple I gurus lurking on this lists are much invited.

 

(If anyone wonders why I did not do a search for other solutions before I tried the mine, well, I do this to kill time with some intellectual challenge that prevents brain rot so many retirees are suffering from. Further, did you ever hear the old adage that six months in the laboratory can spare you six hours in the library - - - which would be the internet today).

 

Bernie 
macnoyd's picture
Offline
Last seen: 3 hours 41 min ago
Joined: Oct 15 2012 - 08:59
Posts: 608
That's good news UncleBernie

Are you going to share the deatails of your findings?  Schematic of your changes?

I'd be interrested to see your details.  Great work BTW.

Offline
Last seen: 1 week 7 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 42
Improved ACI - Schematics

macnoyd wrote:

 

"Are you going to share the details of your findings?  Schematic of your changes?"

 

Uncle Bernie answers:

 

You betcha !

 

Do you know which day is today ?

 

Great celebration, the 70th birthday of the Woz !

 

Maybe he would cherish an improvement to his 45 year old "firstborn" as a birthday gift ?

 

In any case, I love the Apple I for its limitations, and my mission is to make it reliable and eventually add a floppy disk controller based on the Woz Machine.

 

I intend to publish every aspect of this work and make it open source, like I did with my various mid-1980's products for the 8-bit Atari.  Much like the Apple I, they are still in production after all these decades, although only made in small batches by enthusiasts and not anymore by the original business, and none are verbatim clones.

 

But before I do publish my findings on the ACI and the improvements, I need to review which improvements are  already out there. It would be too embarassing to write up my stuff only to find out it already has been tried by others.

 

Hence, again, my humble request to the Apple I "gurus" lurking on this list to point me to what they know about the exisiting / published ACI improvements other than the one by Mike Willegal (larger input capacitor).

 

Any comment invited. If you have a comment you don't want to show to the public, use the Applefritter message system to contact me directly.

 

Bernie

 

P.S.: I also need to go back to the lab and find out whether the original ACI using the LM311 suffers from the same bug I did see in my Apple II ACI knockoff. My current hypothesis is that the 741 based circuit just did exacerbate the effect of the bug over the 311 based circuit just enough to completely render my "improved" ACI useless, which then nudged me to do a thorough  root cause analysis, which then led to finding the bug and a remedy.

The LM311 in the original ACI circuit, may add its own problematic effects. The LM311 is infamous for having nasty habits in certain circuits. For instance, parasitic oscillations that appear under certain output loading conditions even when hysteresis is present: there is a LM311 based LC meter circuit all over the web which exhibits this problem if the LC time constant is large (kHz-ish) and there is a certain output load and some other diffuse features in its surroundings. Otherwise this LC meter circuit is quite brilliant (minimum component count) and works well. So people build it, sell kits, or finished LC meters, and most users seem to be happy with it. I was unhappy with it and over my 40+ years in electronics had enough run-ins with the nasty LM311 that I learned to avoid it like the plague. The LM311 having so many bad habits (under some conditions) did not prevent it from becoming immensly popular and it still is being made in huge numbers by various manufacturers, after half a century. The LT1011 made by my ex-employer is a much better part that does not turn around to bite you without any prior warning signs. Alas, the customers for analog ICs seem to prefer the cheap "jellybean" types and don't cherish much better parts designed by great designers. To cite an old adage: "Eat more sh*t --- millions of flies can't be in error". This is how Microsoft got so immensly "successful" ... but enough of that for now. -B.E.

 

Offline
Last seen: 16 hours 33 min ago
Joined: Jun 5 2008 - 07:26
Posts: 448
I presume that you have seen

I presume that you have seen this page on my web site.  The main improvement that Apple made on the Apple II cassette interface was to increase the value of the input coupling capacitor.  With this single change, I found reliability is good enough for my purposes.

 

http://www.willegal.net/appleii/aci.htm

 

Note that I have found that the older and much slower SCELBI audio tape interface is more reliable  and less sensitive to input volume than either of the Apple designs.  The SCELBI design uses FSK encoding instead of zero crossing, which accounts for the speed difference.  The SCELBI recieve circuit has AGC and filter stages, which I think accounts for at least some of it's ability to handle a bigger range of input volume levels.  If you want to experiment with changes that might make make performance better, you might consider adding an AGC  and filter stages to the input.  The downside of all this sophistication in the SCELBI tape interface, is that the hardware is significantly more complex.

 

regards,

Mike Willegal

 

 

 

Offline
Last seen: 1 day 8 hours ago
Joined: Oct 9 2011 - 12:54
Posts: 1291
I will just say that the

I will just say that the LM311 with the updated input coupling cap is dead on reliable if you are using an iPod.  If you are using a cassette tape, it is very reliable if the cassette deck has a reasonably new drive band.  With an old worn out band the audio to vary a bit in rate and pitch.  

 

if you are doing this with a replica-1  the eeprom can thow extra noise on the bus.  Simply using a regular eprom solves that issue.

 

You may also have problems with an ACI if you are using the edge connector for expansion as that can mess with the unregulated -12V and add noise onto the lines.   

Finally, your choice in transformers can affect reliabiity.   If your out of spec to what is recommended in the manual you can have issues.  I was working on an original Apple-1 which used some radioshack transformers which had lower voltage outputs than the Triad or Stancor which caused all sorts of problems including a very unrelable ACI even with the input coupling capacitor updated.

 

Cheers,

Corey

Offline
Last seen: 5 hours 34 min ago
Joined: Sep 4 2009 - 21:04
Posts: 97
Data Check

A further problem with the ACI data is that there is no check sum so you get no warning of a bad load except the visual timing of the CR and the end of the audio if you can hear the audio.  A pretty good substitute is to keep a record the final two bytes of the recording and then see if they are correct.  Since the time length of zeros and ones in the data pattern is different read errors tend to cause a shift in the information sequence and it almost always disturbs the last bits read.  The ACI record format is one of the very few where the record length is data dependent which makes the last bytes read a good check.

Offline
Last seen: 1 week 7 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 42
Answer on Mike's comment:

Mike Willegal wrote:

"Note that I have found that the older and much slower SCELBI audio tape interface is more reliable  and less sensitive to input volume than either of the Apple designs.  The SCELBI design uses FSK encoding instead of zero crossing, which accounts for the speed difference.  The SCELBI recieve circuit has AGC and filter stages, which I think accounts for at least some of it's ability to handle a bigger range of input volume levels.  If you want to experiment with changes that might make make performance better, you might consider adding an AGC  and filter stages to the input.  The downside of all this sophistication in the SCELBI tape interface, is that the hardware is significantly more complex."

 

Thanks for the comment, Mike. Of course I knew of your improvement, which I think most ACI builds nowadays do use. I am also quite aware of the SCELBI interface (and others, like Tarbell etc.) because I am ... just that old. At around the time the Woz built the Apple I, I was a teenager who designed and built his own 8080 based machine.  My cassette interface used pulse counts to discern 0's ad 1's such that a single dropped or added pulse would not have made any difference. It was very robust. But much slower than the ACI. No problem though as my machine had only 1KByte of RAM unlike the whopping 8KBytes found in the Apple I ;-)

 

But back to the ACI. As far as my modified ACI goes, I do not seek sophistication and filters and AGC and stuff because I think that the minimalistic approaches both in hardware and software used by Woz are sound. As always, minimum parts count and elegant, small software. I am quite amazed how well the ACI works after my fix, with no mods to the software at all, no AGC, no filtering, etc. If you would see the "wow" of that cheap cassette recorder on the oscilloscope you would never believe it could work as flawlessly as it does. Actually, Woz did a great design here. Except for that one bug.

 

The big open question is whether my current hypothesis is correct: the Apple II ACI circuit based on the 741 exacerbating the impact of the bug. Maybe the 741 based circuit did create the bug (although I believe the bug is real and must also be manifest in the 311 based circuit, but it could strike less frequently, so the 311 circuit does still work OK under certain conditions).

 

As I dislike the LM311 I have none in the house so at this time I can't investigate. But I did order a few LM311 a few days ago and expect them to arrive soon. Then I will change my ACI back to the '311 circuit (without the bug fix) and run the same diagnostics. This experiment will prove or disprove my hypothesis. I have a hunch that it may be that very bug that makes the '311 based ACI circuit so finicky and sensitive to volume settings and power supply, the latter possibly having an effect because of some quirks inherent in the LM311. I learned to avoid that part as it did cost me many pitfalls in the lab.  All of them can be avoided, of course, by doing it right and by paying attention to every detail. But comparators in general are temperamental to work with especially when used in hand-wired lab setups.  The frustrating experience goes like this: while bringing up the lab bench circuit to test your latest and greatest IC design, you need a comparator, so you grab a 311 and slap it in. Big mistake !  You will spend the next few hours beating the 311 into submission instead of doing  productive work. For low speed (i.e. audio) work an opamp has much more benign behaviour. But in case of the ACI, it seems the opamp exacerbated the effect of a latent bug and hence, brought said bug to light. And unlike cockroaches in the kitchen, that bug can't speed away into hiding when that light is turned on. In any case, a lot of fun for me to kill time doing (commercially) useless projects.  This, of course, is intentional ! I have sworn to never create anything anymore that even remotely has any chance to be  looted for profit. Read Atlas Shrugged if you want to find the reason why.

 

Bernie

 

 

 

Offline
Last seen: 1 week 7 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 42
Answer to Corey's comment

Corey986 wrote:

"You may also have problems with an ACI if you are using the edge connector for expansion as that can mess with the unregulated -12V and add noise onto the lines.   

Finally, your choice in transformers can affect reliabiity.   If your out of spec to what is recommended in the manual you can have issues.  I was working on an original Apple-1 which used some radioshack transformers which had lower voltage outputs than the Triad or Stancor which caused all sorts of problems including a very unrelable ACI even with the input coupling capacitor updated."

 

Uncle Bernie answers:

 

This are exactly the arguments why I wanted to avoid the original '311 based ACI circuit in the first place. IMHO if any ACI is so sensitive and finicky with the power supply then something must be wrong with it. The problem with any comparator is that they combine high gain with high speed and no internal frequency compensation which is a recipe for inviting disaster in any feedback circuit. You need to pay attention to every detail in the surrounding circuits and in the physical construction to beat these beasts into submission. The venerable LM311 due to its kinks / quirks adds some further possible pitfalls.  On the other hand, I found the '741 based ACI circuit of the Apple II behaves very benign and has none of the temperamental tendencies often seen with comparator based circuits. For instance, in the '741 circuit there are no influences of the negative power supply as long as it exceeds a reasonable value. -5V on the 741's V- supply (pin #4) certainly is good enough. The circuit ceases to work at -2.6V there, so there is plenty of margin left.  There are also opamps which might work in the ACI even when their V- supply is at 0V (GND). I will investigate this option at a later time. This would be great for Apple I replicas lacking a negative power supply.

 

This said, I would not want to go back to the '311 based ACI circuit even if it works OK under certain circumstances. The '741 based ACI circuit is much less temperamental and much more robust. Alas, it just did expose a latent bug. But this bug can be fixed easily. Still, as I did mention above, as soon as I have the '311 in my mailbox I will proceed to try proving whether the bug also is manifest in the '311 based ACI circuit or not. I wouldn't be surprised if a lot of the finicky behaviour of the '311 based circuit would go away after the bug fix is applied. At the moment however all this is just conjecture.

 

If my conjecture happens to be valid, however, this would mean the problems with the ACI are just another case of a "feature" (synonym for any "bug"  when used by the  marketing department) that has a completely different root cause than people think but manifests rarely enough so nobody cares enough to dig down to root cause. The consequence being "cargo cult" like magical behavior patterns of some users seeking best results by turning volume knobs or trying to find the "magic" cassette player that "works", or, in case of the rest of the Apple I main board, find the "magical" DRAM brands, types and date codes that work better than others. All these futile (but sometimes alleviating) efforts to solve a problem by applying magical thinking (like an Amzon tribe's witch doctor) in lieu of proper root cause analysis using a well equipped lab.

 

(Of course I write all this anecdotal drivel such that the casual reader can learn from my mistakes ;-)

 

Bernie

 

Offline
Last seen: 1 week 7 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 42
Update on my ACI investigations

I got the LM311 end of this week and proceeded to rip out all the improvements I did to my ACI.

This unfortunately can't be avoided as I do only have one PCB.

This sucks.

With two ACI PCBs a could compare the two circuits without hours of desoldering and resoldering components.

 

Here are the preliminary results on the original ACI circuit:

 

1. The LM311 based original ACI circuit works - - - somewhat.

2. I can load BASIC from a notebook soundfile with no problems.

3. Trying to load BASIC from the same crappy cassette recorder that worked fine with the '741 based circuit always failed, with all possible volume settings and all reasonable negative supply voltages.

 

These results show that my LM311 based circuit was slapped together correctly. Same problems seen as with all other "normal" ACI circuits.

 

My diagnostics were run (briefly) and the bug did not manifest itself, unlike with the 741 based circuit, where it manifested itself.

 

The conclusion so far from my experimental work is that the 741 based ACI circuit from the Apple II indeed is much more robust and can work very well (even with real cassette recorders) but in the Apple 1 ACI subsystem provokes a latent bug to manifest itself, which must be exterminated with some further changes to kill it dead. This vulnerability allowing the bug to rise its ugly head is only present in the Apple 1. It cannot happen in the Apple 2.

 

Further experiments are necessary to see if the bug  ever strikes with the 311  based original Apple 1 ACI circuit.  I'd guess from my experience with this type of bug that it should happen with the LM311, too, but significantly  less often than with the 741. Maybe it never happens, though. Which would surprise me bigly.

 

Even with the 741 it is a rare event so catching it with the 311 is tedious and time-consuming. But it is interesting experimental lab work which is perfect for me to kill time. Much more welcome than cleaning the house ...

 

 

 

 

Log in or register to post comments