Kingdom

Concepts

KC Icon

How it all Started

Joseph Miller

12/04/2023

I grew up in a small Amish community in Aylmer Ontario. Yeah, I'm a Canadian, sorry bout that.

I got an 8th grade education in a parochial school, well actually 7 1/2 grades. I failed math in the third grade and was one year behind in math so I only have a formal 7th grade education in math.

When I was 16 I joined the Amish church cause that was the normal thing to do and there would have been raised eyebrows and questions asked if I hadn't.

I also started working at the local vegetable Co-op that same summer. Back in the 80s my maternal grandfather started selling tomatoes to Loblaws, a fairly large chain store and this had grown to quite a large business. A normal day for me started at about 10 AM and ended anywhere from midnight to 3 AM. The worst I remember was getting home and dragging myself into bed at 6:30 AM only to be back at it by lunchtime later that same day. I worked at the Co-op for 12 years. Dunno what was wrong with me.

When I turned 21, the official age of financial independence in the Amish circles, I took my first paycheck and bought myself a Miller welder. As the years progressed I kept picking up machines and equipment and by the time I got married I had a full blown metal working shop as well as woodworking equipment.

I had always had a facination for wind energy and I built my first "successful" windmill when I was 14. It was successful in that it worked quite well in spite of the fact that it was made entirely out of wood. It even had a 2" wooden post for the shaft. It was not successful in that I never was able to hook anything to it to capture usable power.

Once I had equipment to work with metal I launched full bore into building wind turbines. I found a book at the library on the theory and design of wind turbine blades and picked up a scientific calculator, a device not really sanctioned by the Amish church, and designed a wind turbine blade following the concepts in the book. The turbines turned out remarkably well, had lots of startup torque, were quiet and fast.

Because I was Amish, building a wind turbine that generated electricity was not helpful since we were not allowed to use it. The Amish ecosystem back then ran on compressed air. So I started designing a wind driven air compressor.

I immediately ran into trouble. Air compressors take a lot of torque to start off under load. Wind turbines get their power from speed. So once the thing got running it worked great, but to get it running while under pressure was almost impossible.

The other problem is that the power available in the wind is proportional to the cube of the wind speed. So if I have turbine that can run a 2 hp compressor at 10 mph it will have 8 hp at 20 mph and 512 hp at 30 mph. Long story short, wind turbines are almost impossible to control in high winds so the only option is to turn then off. The question is, how?

I tried various methods of manual control but the problem with this was the human tendecy to not want to get up at midnight and venture out into a storm to shut down that helicopter in the backyard. I had several total disintegrations due to centrifical force. Scary, let me tell you.

I needed some kind of automated shutdown mechanism.

I tried to build a mechanical governor that would that operated on centrifical force and would shut the turbine down once it hit a certain speed. It failed miserably.

Next I tried a pneumatic system that actually worked quite well but the mechanical valves could not handle the constant wear and tear and failed every few months.

Then I started playing around with 5v digital logic but pretty quickly came to the conclusion that that this also was not going to work out well. I started shopping around and found somebody in TX that programmed micro-controllers. I explained to them what I needed and they sent me a price quote for over 20k.

Fortunately the guy I was working with was a great guy and he told me I should try do this myself. He even gave me a suggested part number that would be very easy to get started with. I of course did not have a computer so doing this on my own was not going to work, or so I thought.

When I got off the phone curiosity suddenly took over. I called my supplier and asked them if they would email the data sheet for said part number to my email delivery service.

Quick time out here, the email delivery service was a guy who would print off the email and then drop them off in my mailbox for a fee. Such was the life of an Amish man in a modern world.

Come next day I opened the mail box and found a 3" stack of paper.

Seeing as I had paid a per page fee to have this email delivered and all I was jolly well going to read this epistle. And besides, I was genuinely curious about how a micro-controller actually worked.

I pored over that manual for several days. It was like Greek in the beginning but after a while it all started to make sense.

The chip my friend from TX had recommended was an eZ8. The eZ8 product line is one of the few micro-controllers with an on-board debugger. The on-board debugger communicates with the outside world via a serial RS232 debugging pin and is able to read and write to both the RAM and the flash memory on the chip as well as having various debugging functions.

When I realized this I had a major eureka moment because I knew enough about general electronics to know that I could buy an 8 bit parallel bus to RS232 serial converter integrated circuit and be able to interact with this micro-controller.

We were allowed to have small digital displays so I also bought a 2 x 20 alphanumeric display which would display all 255 possible values in a byte with about one or two edge cases. This meant that I could have the display listen in on the RS232 wire and could see both what I wrote to the micro-controller and read what it sent back to me.

I built a keyboard with buttons that were connected to a parallel bus through diodes. The diodes for each button were connected to the correct lines on the 8 bit parallel input to pull the right lines high to make the byte I wanted to send.

The diagram below only has a few buttons wired for the sake of brevity but should convey the general principle.

my first computer

I had 32 keys split into 16 on the left and 16 on the right with the values 0 to 16 or 0 to F in hexadecimal which is half a byte. With the combination of left and right I had a full byte. I hooked up an AND gate so that when both one button on the left and one button on the right were pressed simultaneously it would trigger the parallel to serial converter and send the byte over the wire.

The first thing I made was a program to program other chips with.

The programmer had different modes. It had a read from chip mode to copy the byte-code from the chip I was programming into memory. Then it had an edit mode where I could navigate through the memory and see what was in it as well as edit it. It had a write mode to write the current contents in RAM on the programmer into the flash of the chip being programmed. It had an erase mode that would erase a block of flash in preparation for re-writing an updated program.

I also changed the design sightly so that I only needed 16 keys instead of 32 with 4 keys for navigation. Now when I wanted to enter the byte 3C for example I would simply press 3 followed by C and the micro-controller concatenated the first half of the byte, 3 to the last half, C to make the full byte.

my programming computer

And thus I started my programming journey.