Experimentation and Engineering

Frederic Vecoven is software engineer living in Luxembourg who enjoys experimenting with everything from his home’s central heating controller to FPGAs. He has been designing micrcontroller-based projects for more than a dozen years and is currently working on an EPROM emulator.—Nan Price, Associate Editor

 

NAN: What is your current occupation?

FREDERIC:: I am a software principal engineer at Oracle.

NAN: Your website Vecoven.com features projects involving capacitors, microcontrollers, and EEPROM and hardware emulators. Tell us a little about the projects and your design process.

vecovenFREDERIC: At work I design firmware for high-end servers. At home I like to design my own stuff, so I have full control and can create new devices and/or enhance existing ones. I work on various projects and I don’t find enough time to document all of them on the website. For example, I designed a controller for the central heating in my house, but never documented it (it’s too “custom”). I love retrocomputing, which is how my FreHD project started. This is a hard-drive emulator for TRS-80 computers.

My design process starts from an idea (I have too many, so I must carefully select one) then a lot of thinking about the future implementation (as always, designing something is about compromises). Once I have a clear view in my mind about how things should work, I start prototyping. If possible, I use a breadboard or I create a PCB. Sometimes I do a lot of simulation before starting the prototyping, as this will save a lot of time. However, that cannot be done for all projects.

NAN: How long have you been designing microcontroller-based systems?

FREDERIC: More than 15 years.

NAN: How did you become interested in technology?

FREDERIC: When I was 13 years old I fell in love with computers when I saw a TRS-80 model in high school. I am thankful to my parents, who gave me a computer one year later.
I went to college and got a master’s degree in computer science. But I wasn’t satisfied, so I studied some more years to get another master’s degree, this time in electrical engineering. The combination of software and hardware is really powerful. A few years later, I relocated to the San Francisco Bay Area, but I am back in Europe now.

NAN: Describe the first embedded system you designed. Where were you at the time? What did you learn from the experience?

FREDERIC: My first big experience with a real embedded system was when I was working for Sun Microsystems. My group was writing the firmware for the system controllers of the SunFire 3800-6900 line. The embedded system was a small SPARC CPU running Wind River Systems’s VxWorks and the firmware was almost entirely written in Java.

NAN: What was the last electronics design-related product you purchased and how did you use it?

FREDERIC: I bought some FPGAs recently. I haven’t released any project with it yet, it is still a work in progress. My hobby time is very limited.

My idea is to use a CPU core and enhance it with new instructions to enable the generation of real-time signals. FPGAs are very powerful in that area, where a microcontroller would spend most of its time processing interrupts.

NAN: Are you currently working on or planning any projects?

Vecoven_PWM

This is Frederic’s PWM prototype for his Roland Super JX synthesizer.

FREDERIC: Yes, I have rewritten the Roland JX-10/MKS-70 firmware from scratch because I wanted to add PWM waveforms. This quickly turned into a big project. Currently, the prototype setup involves a simulator running the “assigner” code on my laptop. The laptop sends the sound board commands in System Exclusive (SysEx) Musical Instrument Digital Interface (MIDI) messages, which go to a microcontroller that extracts the payload from the SysEx. The payload is then sent to the sound board, which believes it got its instructions directly from the assigner. The sound board (which runs its own microcontroller) uses an EPROM emulator connected over USB, so I can easily modify the assigner code (running in the simulator) or the sound board code (running in the EPROM emulator) without having to program any chip. Note that I didn’t have an EPROM emulator, so I designed mine.

Vecoven_scope

This oscilloscope capture shows the generated PWM signal.

FREDERIC: The power of CPUs and GPUs are really exciting. You can pretty much do everything with software now (a 32-bit core costs less than $5).
On the other side, people don’t pay enough attention to optimization, so I am sad anytime I see poorly written code. I am also excited with all the tools and hardware available today for so little cost. That wasn’t the case in the past, so it opens door to students and hobbyists.

NAN: Last question. Let’s say you had a full year and a nice budget to work on any embedded design project you wanted. Call it your “dream project.” What would it be?

FREDERIC: I would love to do some robotic design, but I am not an expert in mechanics and I don’t have the tools (e.g., lathe, milling machine, etc.). That would fill the gap: hardware, software, and mechanics.

DIY Single-Board Computer (EE Tip #131)

In the early 1990s, nostalgic users wrote software emulators to relive the “vintage” experience of their old Commodore 64 or Apple II. Others preferred the actual hardware and began collecting classic computers. As their old machines occasionally broke down, people began cultivating the art of computer diagnosis and repair into a new form of retrocomputing.

RETROCOMPUTING
Next to software emulation and hardware maintenance, a third strain of retrocomputing has emerged: designing and building your own system from a “bag of chips” and a circuit board. It is easy to create a functional computer on a little circuit board—considering all the information now available on the Internet. These retro machines may not have much practical use, but the learning experience can be tremendously valuable (see Photo 1).

Photo 1—Here is a homebrew N8VEM system with a single-board computer (SBC) and disk/IDE card plugged into the ECB backplane. The ECB card on the far right is a bus monitor, which adds classic “blinkenlights” to the system. In front is a vintage-style hex keyboard/monitor. (Photo courtesy of Nik Brisevac, The N8VEM Home Brew Computer Project)

Photo 1—Here is a homebrew N8VEM system with a single-board computer (SBC) and disk/IDE card plugged into the ECB backplane. The ECB card on the far right is a bus monitor, which adds classic “blinkenlights” to the system. In front is a vintage-style hex keyboard/monitor. (Photo courtesy of Nik Brisevac, The N8VEM Home Brew Computer Project)

Hobbyists with no background in electronics somehow pick up the required skills, and they often share their homebrewing experiences online. Although some of their creations are stunningly exotic, most people build simple machines. They use a CPU and add RAM, ROM, a serial port, and maybe an IDE interface for mass storage. And most hobbyists run either BASIC (e.g., the 1980s home computers) or use a “vintage” OS such as CP/M.

Running CP/M, in fact, is a nice target to work toward. A lot of good software ensures your homebrew computer can do something interesting once it is built. As the predecessor of MS-DOS, CP/M also provides a familiar command-line interface. And it is simple. A few days of study are enough to port it to your circuit board.

Still, one challenge remains: If you want homebrewing to be an enduring hobby instead of a one-off project, you should have some perspective beyond putting together a minimal computer and switching it on. Working on your own, it can become progressively more difficult to take the next steps (i.e., building graphics subsystems or using exotic processors) or to add state-of-the-art microcontrollers to create “Frankenstein” systems (i.e., blends of old and new technology that can do something useful, such as automate your home).

This is where the N8VEM Google group comes in. In 2006, Andrew Lynch published his own single-board CP/M design to engage and involve others. He intended the N8VEM (named after his ham radio license) to be expandable with add-on cards. Soon after, an informal collaborative effort emerged around a Google mail group. A website was set up to share the hardware and software produced.

Builders with a range of skills became involved, from well-known systems builders to beginners. They bought Lynch’s $20 circuit board and ordered the required electronic components and a soldering iron from an online electronics distributor. After two days of wielding the soldering iron, they could create a CP/M computer that uses ROM and RAM disks for storage and has plenty of built-in vintage software.

The design can be expanded into a “powerful” (we use the term lightly here) multiprocessor system with “blinkenlights,” hard disks, graphics subsystems, and various OSes. People also started to build miniaturized variants, PC/XT clones, and 32-bit machines.

However, N8VEM is not about soldering kits. It is about joining in, trying new things, and picking up skills along the way. These skills range from reading schematics to debugging a computer card that does not operate as intended. The learning curve may be steep at times, but, because the N8VEM mail group is very active, expert help is available if or when you get stuck.

There is nothing preventing you from plugging in your own CPU board design. But if you do, you’re not forced to develop all the other expansion boards on your own.

As the novelty of designing a simple single-board computer (SBC) wears off, you may prefer to focus your energy on exploring graphics systems or ways to hook up 8-bit machines on the Internet. Or, you may want to jump into systems software development and share your experiences with a few hundred others. Retrocomputing is not always backward-facing. Making “Frankenstein” systems by adding modern Parallax Propeller chips or FPGAs to old hardware is a nice way to gain experience in modern digital electronics, too.

Photo 2—This is the N8VEM in its $20 stand-alone incarnation. Even without any other boards, this SBC provides sufficient I/O and storage options to be a full-fledged CP/M computer.

Photo 2—This is the N8VEM in its $20 stand-alone incarnation. Even without any other boards, this SBC provides sufficient I/O and storage options to be a full-fledged CP/M computer.

THE N8VEM SBC
At 10-cm × 16-cm (roughly 4” × 6”), the N8VEM computer does not look particularly impressive (see Photo 2). However, it provides all the capabilities of an early 1980s commercial microcomputer. In fact, thanks to CP/M, it is software-compatible with those microcomputers, offering a range of good programming languages (e.g., BASIC, C, Pascal, and Assembler). Excellent editors (e.g., ZDE) and word processors (e.g., WordStar) are also available. You could also run simple spreadsheets, databases and interactive games (e.g., Zork).

The small-sized N8VEM makes one concession to modern-day electronics: It uses a single, high-capacity RAM chip. All the other electronics are components that would have been used “back in the day” (e.g., simple 74LS logic chips, a Z80 microprocessor, and classic interface chips). A battery backs up the N8VEM’s memory; therefore, the RAM disk is a practical storage mechanism, especially because a ROM disk comes with most essential software installed. Use the N8VEM with a serial terminal, or (more likely) with a PC terminal program. The XMODEM protocol enables files to be transferred to and from the N8VEM.

GETTING STARTED: BOOKS AND TOOLS
Homebrewing is straightforward once you figure out how to do things. That is why homebrewing as a group is so practical. Still, two pieces of background information will prove indispensable for any builder: an understanding of basic computer hardware and Assembly language. Reading up on these topics will not only make things easier, but will also help you understand what you are putting together. (See the Resources section at the end of this article for helpful information.)

Only a few tools are necessary. Although, for many, building an electronics lab is part of the fun. A good soldering iron, an inexpensive “solder sucker” to correct mistakes, and a multi-meter are absolute requirements. A secondhand oscilloscope is a useful additional tool. A logic analyzer can also be a big help by enabling you to simultaneously inspect multiple signals and determine what is wrong. Old logic probes are expensive and cumbersome. New designs (e.g., Saleae’s Logic 8-channel USB logic analyzer) are inexpensive and better.

At some point you will need an EPROM programmer, unless you want to depend on others to burn EPROMs for you. Ensure you have a programmer that can deal with a range of (E)EPROMs, as N8VEM boards use many types. Finally, a laboratory power supply is a wise investment, mostly because it has a current limiter that cuts power when a short circuit could otherwise blow up your board.

Editor’s Note: This is an excerpt from an article written by Oscar Vermeulen and Andrew Lynch, “DIY Single-Board Computers (Part 1): Design and Expansion Options,”
Circuit Cellar 276, 2013.

DIY Single-Board Computers

Countless technological innovations have certainly made the earliest personal  computers long obsolete. As Circuit Cellar contributors Oscar Vermeulen and Andrew Lynch note:  “Today there is no sensible use for an 8-bit, 64-KB computer with less processing power than a mobile phone. “

Nonetheless, there exists a “retrocomputing”  subculture that resurrects older computer hardware and software in DIY projects. It may be sentimental, but it can also be instructive.

In their two-part series beginning in July in Circuit Cellar, Vermeulen and Lynch focus on that strain of retrocomputing that involves designing and building your own computer system from a “bag of chips” and a circuit board.

Part 1 describes a simple single-board CP/M design that uses just one high-capacity RAM chip and is compatible with a serial or PC terminal.

Here is a homebrew N8VEM system with a single-board computer (SBC) and disk/IDE card plugged into the ECB backplane.

“It is easy to create a functional computer on a little circuit board—considering all the information now available on the Internet,” Vermeulen and Lynch say in Part 1.  “These retro machines may not have much practical use, but the learning experience can be tremendously valuable.”

Some “homebrewed” computer creations  can be “stunningly exotic,” according to Vermeulen and Lynch, but most people build simple machines.

“They use a CPU and add RAM, ROM, a serial port, and maybe an IDE interface for mass storage. And most hobbyists run either BASIC (e.g., the 1980s home computers) or use a “vintage” OS such as CP/M.

“Running CP/M, in fact, is a nice target to work toward. A lot of good software ensures your homebrew computer can do something interesting once it is built. As the predecessor of MS-DOS, CP/M also provides a familiar command-line interface. And it is simple. A few days of study are enough to port it to your circuit board.”

But some Circuit Cellar readers may want more from a retrocomputing experience than a one-off project.  In that case, there are online resources that can help, according to the authors.

“Working on your own, it can become progressively more difficult to take the next steps (i.e., building graphics subsystems or using exotic processors) or to add state-of-the-art microcontrollers to create ‘Frankenstein’ systems (i.e., blends of old and new technology that can do something useful, such as automate your home).”

Part 1 of their article introduces a solid online resource for taking retrocomputing to the next level–the N8VEM Google group, which provides a single-board CP/M design meant to engage others.

This is the N8VEM in its $20 stand-alone incarnation.

“N8VEM is not about soldering kits. It is about joining in, trying new things, and picking up skills along the way. These skills range from reading schematics to debugging a computer card that does not operate as intended. The learning curve may be steep at times, but, because the N8VEM mail group is very active, expert help is available if or when you get stuck….

“As the novelty of designing a simple single-board computer (SBC) wears off, you may prefer to focus your energy on exploring graphics systems or ways to hook up 8-bit machines on the Internet. Or, you may want to jump into systems software development and share your experiences with a few hundred others.

“Retrocomputing is not always backward-facing. Making  ‘Frankenstein’ systems by adding modern Parallax Propeller chips or FPGAs to old hardware is a nice way to gain experience in modern digital electronics, too.”

For more, check out the July issue of Circuit Cellar for Part 1 of their series. In Part 2, scheduled for publication in August,  the authors provide a technical look at the N8VEM’s logic design. It also provides a starting point for anyone interested in exploring the N8VEM’s system software and expansion hardware, according to Vermeulen and Lynch.

 

 

Retro Electronics (“Retronics”): Analog, Test, & Micrcontroller Tech

Pop quiz: What was the first microcontroller to leave the Earth? Find out the answer in Jan Buiting’s new “Retronics” webinar. Check out the video below.

The Tektronix 546B

If you read Circuit Cellar and Elektor magazines, you likely have as much passion for old-school electronics as you do for he new, cutting-edge technology you find at events such as the Embedded Systems Conference. Elektor editor Jan Buiting is well-known for his love of both new and old technology, and in his Retronics webinar series he presents some of his favorite old-school technologies.

In the video below, Jan explains how and where he found some of his retronics equipment. He also details how he fixed some of the systems and what he does with them. Examples include:

  • A Heathkit TC-2P Tube Checker that Jan found at lawn sale
  • Old audio equipment
  • A satellite TV receiver
  • An “Elektorscope” from 1977
  • 1980s-era test equipment
  • And more!

CircuitCellar.com is an Elektor International Media publication.

Simple Circuits: Turn a Tube Radio Into an MP3 Amp

Want to give your MP3 player vintage tube sound? You can with the proper circuits, an antique radio, and a little know-how. In addition to generating amazing sound, the design will be an eye catcher in your home or office.

Here I present excerpts from Bill Reeve’s article, “Repurposing Antique Radios as Tube Amplifiers,” in which he provides vintage radio resources, simple circuit diagrams, and essential part info. He also covers the topics of external audio mixing and audio switching. The article appeared in the May 2012 edition of audioXpress magazine.

Manufactured from the 1930s through the 1960s, vacuum tube radios often contain high-quality audio amplifiers at the end of their RF signal chain. You can repurpose these radios into vintage, low-power tube amplifiers—without marring them in any way or detracting from their original charm and functionality as working analog radios.

Wood-cased radios have especially good sound quality, and the battery compartments in antique “portable” radios (like the Philco 48-360 or the Zenith Transoceanics) provide perfect locations for additional circuitry. When restored properly, large furniture-style radios that were built for “high fidelity” (like the late 1930s and early 1940s Philco console radios) can fill a room with rich beautiful sound.

Simple Circuits

The simple circuits described in this article perform two functions. They mix an external line-level stereo signal (typically from an MP3 player or computer) and reference it to the radio’s circuit. They also use the radio’s on/off knob to switch this external signal to the radio’s audio amplifier.

There is not one circuit that will work for every antique radio. (Original schematics for antique tube radios are available on the web www.justradios.com). But the circuits described here can be adapted to any radio topology. All the parts can be ordered from an electronics supplier like Digi-Key, and the circuit can be soldered on a prototyping printed circuit board (such as RadioShack P/N 276-168B).

External audio mixing

Figure 1 and Figure 2 show some examples of circuit schematics that mix the line-level stereo audio signals together (almost all tube radios are monophonic), while providing galvanic isolation from high voltages within the radio. Figure 1 shows an inexpensive solution suitable for most table-top radios.

Figure 1: An inexpensive circuit for mixing an MP3 player’s stereo audio signals safely into an antique radio. None of the component values are critical. (Source: B. Reeve, AX 5/12)

These radios have relatively small speakers that are unable to reproduce deep bass, so an inexpensive audio transformer (available from on-line distributors) does the job. I picked up a bucket of Tamura TY-300PR transformers for $0.50 each at an electronics surplus store, and similar transformers are commercially available. Alternatively, the Hammond 560G shown in Figure 2 is an expensive, highquality audio transformer suitable to high-fidelity radios (like the furniture-sized Philco consoles). A less expensive (and fine-sounding) alternative is the Hammond 148A.

Figure 2: A high-fidelity circuit for mixing external stereo audio signals safely into an antique radio. (Source: B. Reeve, AX 5/12)

I use Belden 9154 twisted, shielded audio cable for wiring internal to the radio, but twisted, 24-gauge wire will work well. An 8′ long audio cable with a 3.5-mm stereo jack on each end can be cut in half to make input cables for two radios, or you can use the cord from trashed ear-buds. You can route the audio cable out the back of the chassis. Photo 1 is a photograph of a 1948 Philco portable tube radio restored and used as an MP3 player amplifier.

Photo 1: A 1948 Philco portable tube radio restored and repurposed as an MP3 amplifier. (Source: B. Reeve, AX 5/12)

Audio switching using the radio’s on/off knob

After creating the mixed, radio-referenced signal, the next step is to build a circuit that switches the voltage driving the radio’s audio amplifier between its own internal broadcast and the external audio signal.

Figure 3 illustrates this audio routing control using the radio’s existing front panel power knob. Turn the radio on, and it behaves like the old analog radio it was designed to be (after the tubes warm up). However, if you turn the radio off, then on again within a few of seconds, the external audio signal is routed to the radio’s tube amplifier and speaker.

The circuit shown in Figure 3 uses a transformer to create the low voltage used by the switching circuit. There are many alternative power transformers available, and many methods of creating a transformerless power supply. Use your favorite….

The next photos (see Photo 2a and Photo 2b) show our additional circuit mounted in the lower (battery) compartment of a Zenith Transoceanic AM/shortwave receiver. Note the new high-voltage (B+) capacitors (part of the radio’s restoration) attached to a transformer housing with blue tie wraps.

Photo 2a: The inside view of a Zenith Transoceanic AM/shortwave radio restored and augmented as an MP3 audio amplifier. b: This is an outside view of the repurposed Zenith Transoceanic AM/shortwave radio. (Source: B. Reeve, AX 5/12)

The added circuit board that performs the audio re-routing is mounting to a 0.125″ maple plywood base, using screws countersunk from underneath. The plywood is securely screwed to the inside base of the radio housing. Rubber grommets are added wherever cables pass through the radio’s steel frame.—Bill Reeve

Click here to view the entire article. The article is password protected. To access it, “ax” and the author’s last name (no spaces).

CircuitCellar.com and audioXpress are Elektor International Media publications.