Sunday, October 22, 2023

High Prices

When it comes to attention, most people like paying as little as possible.

That can be a very high price.

A partial counter to that is having a knack for occasionaly being able to see the obvious.



Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, October 18, 2023

The Switch Debounce Problem

Figuring out the switch debounce circuit was not the difficult part of the problem. That only took a few hours to solve.

The most difficult part of the problem was recognizing there was a problem. That took over 50 years.



Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Friday, October 6, 2023

Finding the Debounce Article

Today I did a Google search on - Eliminate SPST Debounce Delay with an SR Latch - and my blog post didn't show up even after looking four pages deep for it. It did show up, sort of, when the search term was "Eliminate SPST Debounce Delay with an SR Latch". Note the quote marks. The search results looked like this:


I expect it will be a LOT easier to find once it gets more attention from Engineers.


Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, October 3, 2023

Zero Debounce Delay Is Not Possible



The above image was obtained by doing a Google search on "zero delay debounce" a few days ago. The source page says delay is required. I have designed a circuit that says it isn't so.


Zero Debounce Delay


Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Monday, October 2, 2023

Simon's Law of Switch Debounce

If it is not a glitch, the switch

is changing position.



Corollary

Dont confuse glitches with switches.




Zero Debounce Delay - Debouncer.


Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Saturday, September 23, 2023

Eliminate SPST Debounce Delay with an SR Latch


I was looking into switch debounce problems for a project I was working on that required a foot switch. I solved that problem satisfactorily but that got me looking into articles on switch bounce. I came across an 8 part series by Max Maxfield that went into the problem in depth. What I came away with from that article series is that the only reliable way to detect a switch change quickly is with a SPDT switch and an S/R Flip-Flop. Which got me to thinking - why not do that for a SPST N.O. switch? After considerable (a few hours) of intense thinking and scribbling I came up with a workable circuit using an analog gate to route the switching signal. I later reduced that to a two output digital selector. You will note that as long as the changes take place after the debounce time, both the rising and falling edges will be indicated after a short "deglitch" delay.

The final circuit looks like this. If you need a name, call it "Simon De Bouncer" or if you need something a little more descriptive "Simon 'Zero Delay' De Bouncer"

Click on image to enlarge

There is a PDF of the schematic also.

Pretty fool proof eh? An SPST switch is made to act like a SPDT by selecting the SR Latch terminal that will drive it to the opposite state when the switch changes position. The XNOR insures the logic is correct in each state. The latch terminal selected doesn't change until after debounce time.

I'm multiplexing the switch between /PRESET and /CLR. So it acts like a SPDT. When the SR Q = 1 the switch is connected to /CLR and when the SR Q = 0 the switch is connected to /PRE. After a debounce delay.

The routing of the latch control signal doesn't change until after the bouncing stops. Simulating a SPDT switch. And the XNOR insures the logic is correct (ready for an input state change) after the bouncing stops. When I priced the logic out it was under $1.50 for all the chips at single piece prices. And if you put all the logic on a chip with a lot of other circuits? Almost free.

What does that give you? A switch logic indicator that responds in about 20 micro seconds to a change in switch position. The 20 micro second delay (glitch filter) eliminates noise pulses and ESD events from changing the indicated switch position. You may be able to shorten that time or may have to lengthen it as environmental requirements dictate.

So I was discussing all this with my esteemed first mate and I said it could also be done in software. (That's what they all say, isn't it?) That gave me the idea to write up some Forth code to show how it could be done. My buddy Clyde reviewed the code and made some suggestions. It looks like this: Switch Debounce Software.

Obviously there are some (not too difficult) details yet to be filled in.

I plan to run that code on my LPC1115 board with a Forth operating system also done by my buddy Clyde. The current version of that board uses a USB C connector. The compiled Forth code for the LPC1115 is available to anyone who wants to use it. You can find it here.

So that leaves us with VHDL for the deeply embedded. An exercise best left to the reader.

You can find me on LinkedIN at M. Simon.

You can see the beginnings of my thinking for the design at Sketch A and Sketch B.



Updated 28 Sept 2023 1945z - To give a better explanation of how the circuit works.


Updated 3 Oct 2023 1153z - Jack Ganssle's switch debounce experiments ==> A Guide to Debouncing

To clarify: Simon's Law of Switch Debounce.

Updated 16 Oct 2023 1759z A trackback from Jack Ganssle's Embedded Muse.



Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, November 9, 2022

Making Slots in FreePCB

I have been using FreePCB to layout the boards I design. It is getting a little old and no longer has all the capabilities I desire. But it has all the pads I have designed over the years for hand building of SMT boards. I needed a pad for a component ( USB C connector with through hole pins) that requires slots for correct assembly. I have figured out a relatively easy way to design and produce such pads.

Making A Simple Plated Through Linear Slotted Pad in FreePCB.

You will use 2 surface mount pads on the top and bottom layers. And two through hole drilled pads. Call them holes one and two. I will assume you know or can figure out how to place the pads in relation to each other. Either manually or by using the set function included on each pad.

To get a proper CAM file you will have to connect all the pads together. First do this on a schematic that has all the pins connected, surface mount and through hole. That gives you a good net list.

After you lay down the component with slots in FreePCB and complete the wiring, on the top layer connect the surface mount pad to hole one. And then connect it to hole two. Lay down the "wires (traces)" as you do each connection.

Do the same for the bottom surface mount pad. Finally connect the two drilled pads together. I do that on the top and bottom layers. It may only be necessary on one layer. I haven't checked.

When editing the CAM drill file, the file you start with will look something like this. This file has eight holes for four slots ==>

.....
T02
X015624Y007852
X016215Y007852
X015624Y004447
X016215Y004447
X017093Y007852
X017408Y007852
X017093Y004447
X017408Y004447
T03
.....


The file with working slots will look like this ==>

.....
T02
X015624Y007852G85X016215Y007852
X015624Y004447G85X016215Y004447
X017093Y007852G85X017408Y007852
X017093Y004447G85X017408Y004447
T03
.....

Connecting the pads together with traces as suggested above eliminates DRC errors. Do a ratline recalculation before doing a Design Rule Check. I have checked this on Gerbv and another rendering program. They both show correct slots. As does OSH Park in their rendering of the completed board.

There is an online discussion about this method of making slots in FreePCB. You can find it here.


Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees when you use this link Amazon.com and other Amazon links we provide.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, September 6, 2022

Surface Mount LED and Diode Tester

If you build a lot of prototype boards as I do, you know the problems of getting surface mount LEDs and diodes oriented properly for mounting. Even if you only build a few the frustrations are evident. The markings (if any) are nearly invisible. And the parts are smaller than pebbles. So I decided to solve the problem. Finally. I designed a battery operated (two AA cells) tester that puts out 4.5 volts maximum so LEDs are not ovrervoltaged in the reverse direction during testing. It also current limits so no more than 1 mA flows through the probes under any condition. That allows you to compare LED brightness. In the reverse direction no LEDs in the unit light up. If the probe tips are shorted a Red LED Lights. If the probe tips are aligned with the forward direction of the diode or LED a green LED lights up and a current of 1 mA through the probes will show the LED color if you are testing one.

A current mirror makes the current through the green LED the same as the current through the probes. So you get a crude visual ohm meter. All in all much handier than trying to make an ohm meter do the job. Or trying to use a power supply and a resistor. The minimum voltage across the diode at 1mA current that works with the tester is about 50mV. This voltage makes the tester functional with diodes that can handle higher currents. Higher current diodes also tend to be larger and better marked.

For the project I got the binding posts from Amazon. I also built a neat little Meter Probe Jack Adapter using these banana pins and these meter safety banana connector sockets. The banana jacks/sockets that accept meter safety banana plugs are currently out of stock. I have found no other source of supply I'd even consider dealing with. The reason for the adapter was to use this surface mount test probe without having to modify the connectors. The test probe tips need to be cleaned thouroughly to be conductive. It seems like plating would help here. I'm going to try this silver plating solution from Amazon.

You will notice I have included offset current balancing resistors to reduce the offset voltages if you use an op-amp different from the LMR342.The comparator input bias currents are so low they can be ignored in this application. The input resistor is just for protection.

The board pictured is an earlier version. I have designed a board ( 2 Sep 2022 ) that uses fewer parts. When that board arrives I will test it and announce the results. The Schematic for that board is included in the downloads. I replaced a voltage regulator and associated capacitors with a diode. A MOSFET was replaced with the output of a comparator. An output resistor was eliminated.

The schematic, parts list and parts layout are available for download here. Boards are available for $16.50 for two plus $5.50 shipping in the USA. Use the Paypal link and ask for "LED and Diode Tester 20Jan 2022 1207z". Delivery can take up to four weeks depending on availability and the USPS. You can also order the parts list directly from Mouser using this link. You can edit what you buy. I like extras because losing parts is not unusual.

The board looks like this:
Powered down.

Red LED.

Green LED.

The Adapter board and Surface Mount Test Probe. The red and black safety connecters are no longer available. The Gold Plated Banana plugs still are.

Update: 7 Sept 2022 0135z

It turns out the safety connectors are again available from Amazon. Which may mean you would like the "Dual Adapter 13Feb2022 0857z" board for $6.45 for two plus $5.50 shipping.

Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees by advertising and linking to Amazon.com.

Engineering is the art of making what you want from what you can get at a profit.

Monday, February 21, 2022

Nostalgia Strikes Deep

I was looking around the net for this January 1975 Popular Electronics Magazine cover. The start of the Computer Revolution. I knew it the minute I saw it and rushed to tell my girlfriend (in 1975).
You can read more about it at Vintage Computer.net.

I had a hand in all that. I designed the S-100 I/O board that went into the worldd's first BBS. A precursor of the internet. I was also writing Magazine articles. My first published article was in the March 1978 issue of Kilobaud. "Faster Erase Times" It was about building your own high intensity ultraviolet light to erase EPROMs. I sold kits of the hard to get parts. I sold 500. Back then you had to build your own. Buying was way too expensive.

I also wrote something for Dr. Dobb's "Building a Programable Frequency Synthisizer". It was about Phase Locked Loops. I still use the CD4046 and variants.

Which brings me to the present. I just bought a 3D printer (I'm in the process of assembly - I'm going slow and methodical) and thus have joined in with the next revolution. I plan to write articles.

My wife and I (the same girlfriend from January '75) made "Support the Revolution - Buy a Computer" t-shirts back in the day. And now ==> "Support the Revolution - Buy a 3D Printer".






==================

This is the printer I'd buy if I was starting out today. I got the previous model with a silent motherboard upgrade.

This is the best Ender 3 assembly video I have been able to find. It is actually a series of 5 videos. The link is to the first.

Space-Time Productions is a participant in the Amazon Services LLC Associates Program. We earn advertising fees by advertising and linking to Amazon.com.

Engineering is the art and science of making what you want from what you can get at a profit.

Sunday, October 3, 2021

RF On PCBs

For anyone doing RF work on Printed Circuit Boards, and with rise times on the order of 1 nS these days who isn't, the Saturn PCB Design Toolkit is very helpful. It will help you find the inductance of holes (vias) and many other useful things.

Engineering is the art of making what you want from what you can get at a profit.

Friday, June 28, 2019

The Latest Cuk Converter


You can read more about it at Step-Down dc-dc Converter Eliminates Ferrite Cores at 50kHz Enabling Power Supply on Chip with One-Cycle Transient Response.

It operates at 50KHz switching frequency, uses 10 nH inductors (PCB loops), and can have very low losses (less than 1%)

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, April 16, 2019

Loading Forth Into the LPC1115 Board


Since I last wrote about loading software into an LPC111x board I have changed the procedure some. I'm going to use our latest LPC1115 board as an example. It has a built in USB port.

Install Jumper JU1 and plug your board into a USB port. Your computer will then search the 'net for a driver and load it. This may take a few minutes. Wait until you get a "Device Ready To Use" message on your screen. Then open up the Tera Term terminal program. Click "Set Up" and then "Serial Port" It will tell you which COM Port (such as COM 9) to use to load the software. Close Tera Term and open Flash Magic. Select your Processor (LPC1115/303) your Com Port and baud rate (9600) Click the "Erase All Flash+Code Read Prot" box. Select a HEX File. I got my file from Clyde's LPC1115 Forth (V1.6). You can also find all of his previous LPC1114/LPC1115 Forths there.

The general link for all his publicly available files is Clyde's FISH Forth.

Select verify after programming. Then START. You will get a "can not verify" message when done. Ignore it. Close Flash Magic. Remove the JU1 jumper and open Tera Term and set it up for your COM Port. 9600 8n1. (9600 baud, 8 bits, no parity, 1 stop bit, Flow Control ==>Xon/Xoff Transmit delay ==> 0 ms/char 4 ms/ line ). You can save the setup into a file. Push the Reset Button on the LPC1115 board. You will see a sign on message indicating the location of free Flash Memory. And the Forth Version installed.

You are ready to go.

Engineering is the art of making what you want from what you can get at a profit.

Friday, April 12, 2019

Why Object Oriented Programming Is Bad

I believe "C" is more a progenitor of this mess than JAVA.


Engineering is the art of making what you want from what you can get at a profit.

Friday, January 12, 2018

The Soldering Project

Rockford Maker Space and I are getting together a class to teach soldering. Well, we needed something to solder. Some of the Makers suggested a 555 light blinker with through hole parts to start. That seemed like a very good idea. An even better one occurred to me after I had started work on the design. Why not also do a surface mount version too so people could compare the required building methods? So I did that. The schematics, parts layouts and parts list in pdf form can be found for download here.

You also might find Hand Soldering Surface Mount Parts from November of 2017 of interest. I go into the details of what you will need to set up a soldering station and there is also a how to do it video.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, December 31, 2017

Why Do I Use So many Bypass Capacitors?

When you look at the design requirements of most ICs they commonly require a .1uF bypass capacitor, with one larger bypass capacitor (on the order of a few uFs) for every 3 or 5 ICs. I use a .1uF and a 2.2uF capacitor for every IC. That seems a bit extravagant both in capacitor costs and board area. So why do I do it?

Let us think about it. An IC draws a pulse of current due to a change of state. This pulse causes a change in voltage on the .1uF bypass capacitor. By having a 20 times larger capacitor right next to the .1uF the change in voltage will be 20 times smaller (actually a bit less due to the frequency response of the larger capacitor). This effectively reduces power supply noise for the IC by a factor of 20. It also decreases the peak of the current pulse needed to recharge the capacitor (the recharge will also take longer). Lowering the peak current also reduces emitted EMI.

If I was going into volume production and had a good EMI lab I could reduce the number of 2.2uF capacitors until it started making a measurable difference. Since I don't have an EMI lab in my shop - I just keep those extra capacitors and come in with a lower noise design. This is especially necessary for high frequency noise since most chips are not very good at reducing that kind of noise.

So why not throw out the .1uF capacitors and just use the 2.2uF caps? Because capacitors are to some extent frequency sensitive. The .1uF caps will respond to fast transients that will not (immediately) affect the 2.2uF capacitors.

Engineering is the art of making what you want from what you can get at a profit.

Monday, December 25, 2017

Crystal Radios

Ben Tongue of Blonder-Tongue Laboratories has written extensively on crystal radios and crystal detectors. You can find the articles here. Ben is deceased. I have collected the articles and turned them into pdfs along with some other crystal radio stuff. As soon as I up load them I will post a link to the package.

The zipped package of Crystal Radio pdfs can be downloaded here.

What got me started on this was Diode Detectors for RF Measurement. And what got me into that was the design of an SWR Meter. I will publish that design when the board layout is complete.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, December 17, 2017

Radio Receiver Update

I have the very initial schematic of the radio receiver done. You can see the first page here.

Click on the image for a larger view)

And the rest of the schematic (in pdf) is here.

Comments and suggestions welcome. I will be doing a clean up (assigning part numbers and other stuff) over the next few days and will then begin layout.

Engineering is the art of making what you want from what you can get at a profit.

Friday, December 15, 2017

A Little Confection

While I'm working on a few projects, I thought it would be good to get something done. So I did. A little logic level tester. This one is a little different. It tests for voltages. Less than 0.5 volts. More than 2.0 volts. And more than 4.0 volts. And yes there is a light for each. Good for looking at mixed voltage logic. And there is also a light for greater than 0.5 volts but less than 2.0 volts. So you get a light for ambiguous (in some situations) voltages. The schematic looks like this:

Click on the image for a larger view.


The circuit will run on 3.0 volts (nominal) but the lights will be a little dim. The voltage response will be the same as it is on 5.0 volt power. The magic of voltage references and comparators.

The complete package including schematics, parts layout, and parts list (in pdf) can be found here.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, December 12, 2017

A Radio Receiver

I have a long time interest in amateur radio. This got me noodling around the 'net and I found the most interesting circuit. A SSB receiver. And the most interesting thing about the circuit is the frequency control device. The CS2000. It generates a frequency from 6 to 75MHz with just a frequency input and a digital word. Mouser has them in stock for $8.93 each in lots of one. Not a bad price for such a wide ranging frequency source.

There are of course other ways of doing things. this guy likes the AD9854. It looks good. And costs over $50 for one. A little out of my price range this week.

Naturally there were some circuit modifications to be made. Like directly driving 5 volt logic from a 3.3 volt logic source. It works - usually - but is not guaranteed. In those places (where necessary - some 5V logic is designed to respond to TTL levels. A relic from another era. But very useful in this one.) I added a TTL level compliant buffer. S0 .8V for a logic low and 2.4V for a logic high are guaranteed.

Also the detector circuit requires matched capacitors. Four for the detectors and eight for the phase shift (all pass) filters. So I have designed a capacitor matcher. With it you can read out a .1 uF capacitor to parts per ten million - or better. The accuracy is much less. But for matching lots of resolution is good. It also gives an interesting view of the world. The changes that can be detected when bodies move.

Design of the all pass filter was simple using the (free) design software found here. You need to install it on your computer. I have installed it on mine.

I'm working on schematics, parts lists, and board layouts for all of this. I will post them here. When they are done. About a week or two.

Engineering is the art of making what you want from what you can get at a profit.

Thursday, November 2, 2017

Hand Soldering Surface Mount Parts

The first and most important part of making soldering surface mount parts easy is to design the PCB for hand soldering. The trick is to double the LENGTH of the pads. This gives the tip of your iron room to maneuver around the other parts of the board. It also makes it easy to heat the pad which is important for good solder flow. The second trick is to use a eutectic tin-lead solder (63% tin - 37% lead - but 60-40 will do) so the soldering temperature is as low as possible. This gives you more margin when it comes to temperature rise. Too much temperature rise can damage parts. Lead free solders are not as forgiving.

My favorite iron is made up of a Weller 7400 handle with a 37UG heater and a PL-111 tip. I use a standard light dimmer mounted in a 2 outlet plus switch outlet box to control the temperature. I adjust the heat so it is just a little more than is needed to melt the solder. Surface mount parts don't need a lot of heat. So why do I have such a powerful heater? Because occasionally I want to solder wires to my boards and that can take a lot more heat. I use Weller 8001 anti-sieze to mount the tips to the heater. It makes changing tips easier.

And of course you will need solder. I like 63/37 (Sn/Pb) rosin core solder. You will need a flux with an applicator that will make temporary tacking surface mount parts easy. Chip Quik SMD291NL does the job. A rosin flux pen is also handy for coating pads on a board so they solder easier and do not become corroded. A Kester #186 pen does that job nicely.

You will also need help for times when you make mistakes. The Weller 7805 is a good solder sucker. Solder wick in several sizes (especially .025") is also very useful.

You may also need a magnifier. I use a magnifier head strap from Harbor Freight along with 3.5 diopter magnifying glasses you can pick up at any drugstore. For a bench light and general magnifier I use an E78751 magnifying light - which appears to be obsolete. This magnifying light from Harbor Freight may be a substitute. I haven't tried it.

Finally you will need a pair of tweezers for placing small parts. I have used all kinds including those for plucking eyebrows. I have been using these industrial tweezers for the last few years.

That gets you a bench set up. Not counting a conductive work space for static protection. I use black anti-static bags taped together and grounded. It is low cost and works well.

That covers your bench set up.

This video is pretty good. However I do things a little differently. I use the SMD291 flux under the chip to hold the chip in place. With this flux you can move the chip so that the pins line up with the pads. Once the pins and pads are lined up, tack the corners. And then all the rest of the pins. For added protection during soldering I like to mount the high value bypass capacitors first. This helps absorb any residual static charges while still allowing easy soldering.


Update: 24 November 2017 2156z

It occurred to me that starting novices with fine pitch surface mount parts might not be the best idea. So I designed a very simple board for testing the resistance ranges of digital meters. A board with seven precision resistors (0.1%). The first two resistors (12 ohms and 150 ohms) create a 11.11111111 ohm resistor (not counting resistor tolerances). The rest are normal decade values. which means you don't need to look for "9.000" values (which you can not get - usually) for decade dividers. The "wires" on the board add about .001 ohm to the 11.1111 ohm resistor. Which is not significant at the one part per thousand (3 1/2 digit meter) level. Especially as most of those meters can not zero out the resistance of the probe wires.

I use 805 size resistors so the board will be a little easier to solder than the 603s (inch) I normally use. Just the thing for a beginner. And you will have something you can uses when the project is done.

You can find the documentation for the project at Resistor Ladder. The cost for the 7 precision resistors is a little over a dollar total. About 15 cents each in single quantities. Quite a reduction from the days when such resistors cost around ten dollars a piece.

Update: 26 November 2017 0447z

A resistance reference is good. But for real meter testing you need voltage and current. So I designed a voltage and current source. To keep costs down there is just one voltage and one current. 1.200 volts (+/- 0.1%) and 1.200 mA (+/- 0.2%). The documentation can be found at Voltage and Current Reference 25Nov2017 - Doc.zip

Engineering is the art of making what you want from what you can get at a profit.

Monday, January 2, 2017

WWVB Simulator

I'm in the process of designing a WWVB Frequency Receiver and Clock that can receive either the amplitude modulated time signals or the phase modulated time signals. What I needed to go ahead with this project is a modulator that can make the phase and amplitude modulation. I racked my brain for days until I came up with a schematic of this simple concept. It is a combined phase and amplitude modulator that uses a quadrature signal generator. It sounds complicated. It is really quire simple. Have a look at the schematic. The schematic shows just the bare basics. There is no amplification or filtering or control processor. Those will be added later as I develop the design. But I just had to share my idea because it is so cute. Note that for phase reversal modulation both the I and Q channels must be switched simultaneously. If you only switch one you get a 90 degree shift. I may use that to see how the receiver behaves, but the receiver is not designed for quadrature phase modulation. Just Binary Phase Shift Keying (BPSK).

As I further develop the concept I will post more details here. Eventually I will be designing and building a board. The control microprocessor will be run off the master clock on the board so switching will be roughly coherent. With some tuned circuits to eliminate harmonics and such the exact phasing (such as WWVB does) is probably not strictly necessary. At least for testing purposes.

Friday, July 8, 2016

Emergency Flash-Light™

My latest project is an oldie but goodie. I'm reviving Bringing a Little Light To The World ™.

What is it? It is an emergency flashlight. It will run at least 100 hours on two fresh AA cells. My test on the last version ran eight days. In addition when the light is "off" it flashes about every three seconds so you can find it in the dark. It should flash continuously for about 5 years 10 years with a fresh set of batteries. So you trade run time for flashing time. I would suggest putting a new set of batteries in the flashlight every two years if you would like at least 60 hours of on time in case of an emergency.

The Flashlight was inspired by the Katrina hurricane when I read about people trapped in flooded basements whose flashlights went dark after a few hours while they were trapped in the basements. This light would keep flashing for comfort. And it would give tens of hours of on time when you needed to look for something. Or try to escape if that is possible.

So what is new with this version? Three things. I found a lower cost power converter chip which converts battery power to the voltage and current needed to run the LED. Once started it will continue running until the batteries are totally drained. In fact it will start up on practically dead batteries. The batteries only need to have .6 volts each to start the light working. A fresh alkaline battery has a voltage of about 1.6 volts.

What is better about the new chip set is that the flashlight blinks slower when the batteries start going dead. As the battery voltage goes below .5 volts each (1.0 volt total) the flashing starts to slow down. When the batteries have near zero life left the blinking slows to seven seconds per flash. The original version just went dead. And even better - if the light is still flashing it will turn on. So you have a definite low battery indicator. The old version just quit when the batteries got low enough.

The second thing that is new is a more efficient LED at lower cost. I decided not to extend the run time with the higher efficiency. Instead I made the light a little brighter.

The third thing that is new is 3D printing. I have gotten an estimate for custom prototypes and design work of $5,000. That would include custom versions of a purse size light at about $400 per printed version. The estimate included 4 or 5 versions to get the design right.

Once the design is done I would need about $15,000 to get 1,000 lights made. That would be a prototype production run. The cost per flashlight gets into the marketable range when the production runs are 100,000 pieces and up. I would sell the prototype run at cost to get customer feedback.

In order to raise the money for the project I'm accepting donations. I am also going to sell flashlights using available cases (Eveready lantern lights) at $50 each including shipping in the US. The trouble is that Eveready no longer makes the old light (it used an incandescent bulb). So I need cases. If you send me an old case I will make you a flashlight for $45. If you send me two cases I will make you one for $40. And for three cases The cost is $35 for a flashlight. I will take up to 6 cases per order and send you a flashlight for $20. I will use those cases to make lights for people who can't find an old case.

If you are interested you might like Eric's description of the Voodoo Flashlight. I should add that I have prototyped the new version of the electronics and have installed the new version in a couple of cases I had lying around from my last try.

Interested parties can leave a comment here or contact me by e-mail. My address is on the sidebar at Space-Time Productions. You can also donate to the project at this link. People who donate will be first in line for prototypes from the prototype production run.

And of course if you are an investor I'd be glad to discuss business.

Update: 14 July 2016 0220z

My wife asked me to give the light a name. So here goes (for now) - Emergency Flash-Light

Update: 15 July 2016 0527z

We also like just - Flash-Light

Update: 14 Sept. 2016 0839z

And something else I like: We sell light not batteries.

Update: 20 Sept. 2016 1517z

As bright as we need to be.

Update: 29 Sept. 2016 0616z

Changed "5 years" in the text to "10 years" to better reflect the current design. It is an estimate. I will have to take some very accurate measurements to get the actual number. I have designed a board that can take those measurements. It may be a while before I get that board produced, tested, and software written.

Also note. I entered the Flash-Light™ in a fast pitch competition. You can read about the results at I Entered.

Update: 4 October 2016 0857z

Here is the pitch I gave:


Hello. My name is Michael Simon. I'm a retired aerospace engineer, former Naval Nuke, and commercial technical writer.

I have designed the Flash-Light. It is an emergency flashlight. It is either on, giving continuous light or it is flashing so you can find it in the dark.

The Flash-Light was inspired by the Katrina hurricane when I read about people trapped in flooded basements whose flashlights went dark after a few hours of use. This light will keep flashing for comfort. And it will give tens of hours of on time when you need to look for something. Or try to escape.

This Flash-Light will be there when you need it. Two fresh AA batteries will give at least 100 hours of on time. Or ten years of flashing. Every year of flashing costs ten hours of on time. This light is just bright enough to do what you need to do. Change a tire. Follow a trail. You will not have to light up the whole valley just to follow a trail. We are not selling batteries. We are selling light. Which is why one of our marketing slogans is "Bringing a little light to the world."

Our potential market is in the billions. And it is not only for emergencies. Campers need a long lasting light weight flashlight for backpacking trips. Everyone needs an emergency Flash-Light for their home, car, office and pocket. We plan to sell it not only as a consumer item but also as a promotional product. It will have a nice flat area for printing your marketing message. And for those who want a premium promotional item we can use 3D printing to create prototypes and make molds for those who want their message to be part of the case.

We intend to start out with online sales and then go to general distribution once our volumes are high enough. Our target sales price is in the ten to fifteen dollar range. That is at the high end of the range for an ordinary flashlight. But his is no ordinary flashlight. Besides being water resistant, it will start up with two practically dead batteries.

The next step in our business plan is to 3D print prototypes to test out the small hand held cases we intend to sell. We will then do an injection molded run of one thousand Flash-Lights to get some in the hands of customers and prepare for the first production run of 100,000 Flash-Lights

Thank you for your time and considering our Flash-Light in the 2016 FastPitch Competition.

Engineering is the art of making what you want from what you can get at a profit.

Friday, December 5, 2014

FISH Forth V1.6 - LPC1115 - STM32F4xx

Clyde has added some more FISHes to the repertoire. One for the NXP LPC1115 which has 8K of RAM and 64K of Flash. Plus updated versions (V1.6) of his previous LPC1114 Forths. All at the link.

And a version for the STM32F4 Discovery Board.

The general link for all his publicly available files is Clyde's FISH Forth.

Update:

This is a note on loading the LPC1115 FISH into an LPC1115 with Flash Magic. When it tries to verify you get an error message. Ignore it. I have a help ticket in with NXP, but so far they have not responded. The original how to load documentation is found here.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, August 19, 2014

FISH Forth V1.5 - LPC1114 Updated Support - LPC812 Updated Support

Clyde has updated FISH Forth to Version 1.5. He has made some improvements. I'm just going to cover the major ones. There are now two versions of the FISH Forth for the LPC812. One is the full FISH suite and has 1K of Flash available for storing user programs. The other is a slightly reduced FISH (reductions noted in the documentation) that can hold 2K of user programs. The LPC812 has 4K of RAM space giving about 1 1/2K of user RAM space.

There is also a new FISH Forth for the LPC1114. It covers the versions of the LPC1114 (and likely the LPC1115 when we test it) that have 8K of RAM. The LPC1114 that we have tested has 32K of Flash (16K of program space) and 8K of RAM (giving about 5 1/2K of user RAM space). All the older versions of our software (that don't have known fatal bugs) are still available.

I will be providing links to all our hardware and software in another post which will be permanently on the sidebar.

Clyde has a link he will be using to post all new version of FISh and associated software and different processor versions. FISH File Folders.

Engineering is the art of making what you want from what you can get at a profit.

Saturday, August 16, 2014

TTL to USB 22April2014


The TTL to USB board is a board that can interface to a USB computer port and deliver UART serial communications to any device that can accept them. Interface voltages between 5.25V and 1.8V can be handled by feeding the appropriate voltage. to the VI designated pins on J1 or J2. J1 is an 8 pin header that delivers TxD and RxD only. J2 adds CTS and RTS for hardware flow control.

You can find complete documentation (schematic, parts list, PCB board layout) for the board at TTL to USB 22April2014 - Doc.

This board is available from OSH Park for $5.10 each.

We have some boards in development that use this board for interfacing to allow software development. You can also use this board with flying jumpers to connect any board (such as Code Red boards) to a USB port.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, August 13, 2014

LPC1114LQFP Devl 15Julyl2014


The LPC1114LQFP Devl is a USB powered board that has both a parallel port and an I2C port on board. This board is similar to our LPC812 Devl - 20 March 2014 except that it has more usable memory (16K of open Flash with our FISH Forth) and a larger RAM (8K vs 4K). The chip is a little harder to hand solder than the other chips we generally use (.5 mm lead spacing vs .65 mm) but I have developed a method that makes the soldering relatively easy.

First mount all the 4.7uF capacitors. They will provide a small measure of anti-static protection. You should do your work on an anti-static surface. Put a dab of Chip Quik in the center of the part outline (U1) away from the chip leads. Use enough to make sure it holds the chip in place. Once the chip is in place use a resistor lead from a through hole resistor) or similar to push the chip around until all the pads are aligned. Check all four sides of the chip to make sure you have gotten it right. Once the pads are aligned put a little Chip Quik near one of the corner pads. Solder the corner pad (do not touch it) with Chip Quik flux. Check alignment. Go to the opposite corner from the one you just soldered and put a little Chip Quik near the pad. Solder the corner. Check the alignment. Your chip is now firmly held in place and you can solder the two rows of pads that don't have any solder using a generous amount of chip quick. Now solder the other two rows that have the corners tacked using a generous amount of Chip Quik. You can use Chip Quik and a clean iron to clear any solder bridges that have formed. It is amazing stuff. And you are done with U1. Now mount the other chips, Rs, and Cs saving the components near the chips (mostly .1 uF capacitors) for last. Now install the switch SW1, and finally the connectors. Done.

Note that this board should work with the LPC1115 as well as the LPC1114. I haven't tried it yet so I can't verify that. As soon as I do I will update this paragraph.

You can find out how to load the LPC114 with the software of your choice here. You are not limited to using Forth although we highly recommend it for ease and speed of software development.


Here are the document files for the board including schematic, parts list, and PCB parts layout.

This board is available from OSH Park for $9.00 each.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, July 29, 2014

The Software Has To Get Better


So why are we "pushing" Forth on single chips? To get you prepared to do it on an array of 144 Forth Engines on a chip.

Engineering is the art of making what you want from what you can get at a profit.

Monday, July 21, 2014

I2C RH Sensor 21May2014



This is a Relative Humidity and Temperature Sensor that attaches to the I2C Bus. It has a relative humidity accuracy of 3% a precision of .2% and a resolution of .1%. You can buy a higher accuracy version (2%) if you need it. Be sure to get the 5V version. For temperature the accuracy is .3°C and the precision is .01°C. There are two versions of the sensor. One is powered up continuously and the other just powers up for each reading. You can learn more by having a look at the family data sheet. The part number I tested the board with was the CC2D35. Any of the 5V parts in the family should work.

Soldering is not difficult (for surface mount). I normally mount the 4.7uF capacitors first and then mount the ICs. Mounting the TVS diode package before the capacitors and sensor is probably a good idea. The connector should get mounted last. You can get the parts list, schematic, and parts layout at I2C RH Sensor 21May2014 - Documentation. I also have software that will read out the sensor to 4 digits at I2C RH Sensor 21May2014 - Software For The LPC812 FISH Forth.txt. As you can tell it is designed to be run with our LPC812 board. The software is mainly a how to do it minimal package. Also note that the readout for this software is 4 digits (at room temperature and less than 100% relative humidity) with no decimal point. You can use other Forth routines to add a decimal point and add one more decimal place of resolution but I wanted to keep the software simple so it is easy to understand. For systems use you will probably want to add time outs and other things so a defective or missing sensor does not hang up the system.

This board is available from OSH Park for $3.05.

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, June 25, 2014

I2C Parallel Port 8 Bit - LED 14April2014


This fun little board is mainly for those new to I2C. It gives you an easy way to write and test code that will control an I2C device and see the results visibly. I have written some code that includes initializations to help get you started. I2C Parallel Port 8 Bit - LED 14April2014 - Software for the LPC812 FISH Forth. The code runs on our LPC812 Devl board.

Code that runs on the LPC1114 chip: I2C-8LED-LPC1114.

This board is available from OSH Park for $4.08.

You can get the board documentation package here: I2C Parallel Port 8 Bit - LED 14April2014 - Documentation

Engineering is the art of making what you want from what you can get at a profit.

Wednesday, April 30, 2014

LPC812 Devl - 20 March 2014



The LPC812 MCU board in the picture plugs into, communicates with, and is powered by a USB port. It has 8 parallel port pins which can also be assigned to other functions. And opposite the USB port connector it has our standard RJ11 I2C bus connector.

You can find the document package for the board at: LPC812 Devl 20 March 2014 Documentation.zip. The board is available from OSH Park - LPC812 Devl - 20 March 2014 for $7.35.

Forth for the LPC812 is available at New FISH - LPC812 Support. There is a link to instructions on how to load the Forth into the chip at the link.

The NXP Users Manual can be found at LPC812 User's Manual.

Update: 25 June 2014 1419z

There is a problem with the 20 March 2014 version of this board. It was accepting spurious (real?) shutdown signals from the PC after about 10 days and would not power up. This happened on PCs with XP and Win 7 so it is not a specific OS problem. So it took about 30 days for me to be convinced it was a real problem. I had to see the problem twice and then investigate for about 10 days.

I designed a modified board that can be "wired" (resistor removed or added) to not respond to the shut down signal - the way everyone else does it. R17 and C22 have been added. R17 is normally NI (not installed). That disconnects the shutdown signal. As far as I can tell no one uses that signal to control power from the USB port.

You can find the documentation for this revision at LPC812 Devl 5 June 2014 - Doc. This board will be available from OSH Park for $7.33.

Further update: 24 July 2014

Upon further investigation it turns out that the difficulties I has were caused by an intermittent solder joint. And it was a very strange intermittent that worked for 10 days and then got flaky. And it did that twice. So you can use either board depending on what you like. Check the different schematics and make your choice.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, April 27, 2014

New FISH - LPC812 Support

There is a new release of FISH Forth software that now includes LPC812 support and LPC1114 support. FISH_NXP_M0_PubRel_v1.3.zip. I will be announcing some new hardware to go with this software over the next week. Update: The new hardware is here.

Directions for downloading the code into any NXP processor (only some of them will work) can be found at loading FISH and other LPC1114 information.

V1.4 can be found here.

Engineering is the art of making what you want from what you can get at a profit.

Saturday, April 12, 2014

Forth Update And Some Nice Doc

Our resident software genius (ably assisted by his long distance friend Vic) has updated the FISH Forth for the LPC1114. You can find it here: No longer avalable - FISH_NXP_M0_1114_PubRel_v1.1.zip. See bug fix version below.

No errors were fixed. We haven't found any yet. Some words to help with shifting bits were added. In addition a glossary with copious code examples has been added. And some other things. Have a look.

Update: 13 April 2014 1941z

Well we found an error with the Flashing of user code. It has been fixed. You can find the latest code at:

FISH_NXP_M0_1114_PubRel_v1.2.zip

The prior release with the bug - v1.1 - will no longer be available.

Update: 18 April 2014 0854z

FISH is now listed on the figForth compilers page. Way to go Clyde!

Update: 27 April 2014 0246

There is a new release of FISH Forth that now includes support for the LPC812. Link at New FISH

Engineering is the art of making what you want from what you can get at a profit.

Friday, March 28, 2014

LPC1114 Devl



All the boards we have recently released

TTL To RS-232 DB9 M&F

TTL to USB

TTL to I2C

I2C-4SW-4LED 9Sept2012

were aimed at the release of our LPC1114 Development board. Or as I like to put it the LPC1114 Devl. And what do I mean by "we" and "our" ? Well it was developed as part of a team effort. An effort our little group likes to call ATeam Forth. This board is the center of a project to reintroduce the ease of Forth programming for microcomputing. All development in Forth happens interactively. And once you have developed and tested each bit of code there is a compiler on the board that speeds up the execution of the compiled code and includes easy ways to turn it into an application.

To see what you can do with the LPC1114 have a look at:

LPC1114 Data Sheet

LPC1114 Users Manual

So what do you need to start? Well you will need a way to talk to the board. Probably over USB. That is explained at TTL to USB. That post includes links to suitable terminal programs for your PC (there are probably similar programs for Apple users - but I'm not familiar with them) and an explanation of how to get them running.

Besides the USB board/terminal program you will need the LPC1114 Devl board. You can find the documentation for that board st LPC1114 Documentation. It includes the schematic, parts layout, and parts list. OSH Park has the boards for sale for $11.55 each.

And finally you will need to put the Forth located at ATeam Forth for the LPC1114 on the board. It is easy to do using a free tool called Flash Magic. I might add that if you have an LPC Xpresso LPC1114 Board with a serial/USB interface attached to it (TX and RX pins)it will also run our Forth. It should also run on the LPC1115 Xpresso. But we haven't tested it.

But back to Flash Magic. Once you have it installed follow these steps to load your LPC1114 with ATeam Forth.
1. Communications - Select your processor "LPC1114/102". You have already found your COM port as outlined in TTL to USB. Enter that in the COM Port box. The baud rate should be 9600. Interface is "None (ISP)".
2. Erase - check the box that is labeled "Erase all Flash+Code Rd Prot" do not check any other boxes in this section.
3. Hex File - Enter the location of your Hex file in the box. There is the usual "Browse" tool to make that easy.
4. Options - only check the box "Verify after programming"

Before you start programming install jumpers JU1 and JU2 on the board. Hit the reset button. You are now ready to

5. Start

It takes about a minute to install and verify ATeam Forth. Remove JU2 - go to your terminal program (set up for your COM Port and 9600 baud, 8 bits , no parity , one stop bit) and then press reset. You will see the sign on message indicating the number of free flash blocks and the date your version of ATeam FISH Forth was created. Press the "Enter" key and you will see "ok, go fish in BASE 10". That tells you the number base you are operating in in decimal. So how did it get the name FISH? Well, it is sort of an updated figForth. So we called it FigISH. Or just plain FISH. Go FISH.

Soldering notes for the LPC1114 Devl.

There is only one difficult to solder component on the board. The oscillator. It is difficult because the pads are not exposed. To make it easy lay down a generous amount (which is not much) of Chip Quik on the pads before you attempt to solder to them. Put the Chip Quik on the board before you place the oscillator for soldering. The solder will flow under the pads because of Chip Quik's outstanding wetting/fluxing ability. And also note. ALL the pads for components have been specifically designed for hand soldering. So fire up your iron!

More about Forth

If you are not familiar with Forth, I have added Starting Forth - pdf and Thinking Forth - pdf to the sidebar. Or click the links here. Obviously if you are new to Forth, Starting Forth is where you want to start. FISH does not completely conform to the Forth in the book. But it is close enough - especially in the beginning chapters - that you can use our hardware to follow along.

Update: 12 April 2014 2320z

The latest version of FISH Forth has been released. It has some added words for doing bit shifting and a Glossary with numerous examples. You can find the download link at Forth Update and Some Nice Doc.

Engineering is the art of making what you want from what you can get at a profit.

Sunday, March 23, 2014

I2C-4SW-4LED 9Sept2012

Now that you have your I2C interface working you will need to test it out on something. I have a nice little board for that. The I2C-4SW-4LED board. You can find the documentation here. As the name implies it has 4 switches (actually 2 pin jumper headers to reduce costs) and 4 LEDs on the board, so you can talk to it with I2C and make lights blink. And/or read the switches. The board is made in such a way that you can wire to external switches and LEDs for use on a front panel of what ever device you are building. If you use external LEDs do not install LEDs on the board. Nothing bad will happen. But it may not work the way you want because of differing LED voltages.

With the three Jumpers on the board - JP1, JP2, and JP3, you can set the address of the board so that you could easily have 32 LEDs and 32 switches in a system. Or other parallel ports using the PCA8574 for other things.

Please note that the chip comes in two flavors. The PCA8574 and the PCA8574A. They differ only in their I2C base address. The PCA8574 has a base address of 40h and the PCA8574A has a base address of 70h. This fact tripped us up in initial testing. Don't let it trip you up. And note: either chip can be used on the board. So you could actually have 16 of these boards in a system. If your I2C driver could drive that many.

OSH Park has the boards for sale for $6.00 each.

Update: 28 April 2014 0907z

You can find some test code that exercises the I2C bus and blinks the 4 LEDs on the board at I2C-4SW-4LED LED-Test.txt. It is written in FISH Forth.

Engineering is the art of making what you want from what you can get at a profit.

Saturday, March 22, 2014

TTL to I2C

Since I'm using 5 volts as the standard I2C bus voltage, I need a way to translate from the 3.3 volts the MCU uses to the 5 volts the I2C bus uses. The interface needs to be bidirectional without having any switching since either the 5 volt side or the 3.3 volt side can pull the bus low. And there is no way to tell in advance which side might want to do that so a bus translator like the 74LVC2T45 will not work. I did try the the P82B96, but, despite being a very popular chip it latched up on me. Some manufacturers allude to this when they tout "no latch up" at the top of their data sheets for I2C bus voltage level translators. NXP describes how to do it with N channel MOSFET transistors in their application note AN10441. The circuit described there is what we would have called in the old days a grounded grid circuit. Today we call it grounded gate. The gate is grounded for AC despite the 3.3volt bias on it because the 3.3 volts comes from a power supply which is heavily filtered to eliminate any AC voltage on the supply. Despite being low cost I decided not to use this method because low cost transistors commonly come in an SOT23 package (which is big enough so that I can actually hand solder it). But the SOT23 package takes up a fair amount of board area by today's standards.

So I settled on the NVT2002 chip which looks like it has two transistors in the package along with disconnect circuitry which prevents translator operation if both sides of the bus aren't powered. Because the transistors are basically pass through devices they don't add much bus delay (on the order of nano seconds or less). And just to cap off the sweetness they cost a lot less than the P82B96.

To make life easier for I2C bus users I put 3 of our standard RJ11 I2C bus jacks on the board, so that if you are using 3 or fewer devices on the bus you don't need to buy doublers or triplers to daisy chain bus devices. Although you would have to use them if your bus is long in order to keep your bus capacitance below the specified maximum.

Bare boards for the I2C bus adapter are available from OSH Park for $5.15. You can find the documentation for the board (schematic, parts list, and parts layout) here.

You have a choice of powering the I2C bus with the power supply providing power to the MCU board or if your bus peripherals use a lot of 5V power you can give the TTL to I2C adapter its own power supply so as to avoid dragging down the 5 volts supplying the MCU board.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, March 18, 2014

TTL to USB

You will need an interface to your computer if you plan to use our LPC1114 board with Forth for fun and profit. I will be writing up the '1114 in the next few days. In the mean time you can start building an interface to your computer. You can use the RS232 board if you are trying to talk to and program it with an older computer.

Or you can build the TTL to USB board if you have a more modern computer which only has USB ports. The USB board uses the FT232RL chip. Soldering the board is straight forward. So I'm not going to go into that. I will just mention that FTDI does not recommend using the Blue and White LEDs you can mount on the board in the way I use them (connected to the 5 volt supply with a 3.3 volt interface voltage). So if you mount them it is at your own risk.

Of course you are going to need some documentation to put a board together. You can get the schematic, parts list, and parts layout here. You can buy the boards from OSH Park. The price is $7.10 per board.

To communicate through the USB board you will need a terminal program. There are a number of them out there. I'm going to describe some of them. The links provided go to review pages where you can find a download link. For beginners I like Tera Term. It is easy to use. On the con side it hides the screens that you might want to play with while setting up or just watching what is going on.

For the more advanced user I would suggest RealTerm. It has everything you need but the screens will be confusing to the novice. Its specialty is binary files and difficult data.

The guys at Green Arrays like putty which is open source.

To make these programs work you will need to find out the port number of the USB port you have plugged into. Please note that the board is as the FTDI people refer to it "self powered". You will need to provide it with a power supply of at least 100 ma. I have designed a number of these for use with our system. I describe one power supply at Power Supply Digital WW. There is also a link there to a heftier supply. Note that the "WW" refers to the power transformer, which is a wall wart.

So you have your board powered up and plugged in to a USB port. How do you locate the port number? Assuming you have a Windows 7 system (I'm sorry to say I'm ignorant of Macs) go to the main Control Panel page and click on "Hardware and Sound" then "Devices and Printers". Under "Unspecified" you will see "FT2232R USB UART". Right click on the icon and you will get another (small) page. Click on "Hardware" on that page. Under "Device Functions" you will see listed your USB port. Mine says "USB Serial Port (Com5)". So "Com 5" is my port number. Your board should work with any Com Port number, but I think I read somewhere that port numbers from 1 to 5 work better in some systems. Keep plugging in your USB board until you find a good number if you are having trouble. Once you know your port number you will be ready to set up your terminal according to the instructions provided by the terminal program.

Initially when you plug the USB board into your PC it will go looking for a device driver. This can take a while. Your USB board will not show up on the device driver page until your system has a driver for the FTDI Chip. The last time my computer went looking for a device driver for the FTDI232R it took something like ten minutes for the driver to be found and installed. Get a cup of coffee. Come back. And then assist (if needed) with completion of the process.

And there you have it. You are ready to go with what ever else you plan to get up to.

Engineering is the art of making what you want from what you can get at a profit.

Tuesday, July 30, 2013

TTL To RS-232 DB9 M&F


There is also a write up of this project at ECN Magazine.

The title is not quite correct. Actual supply levels using the TI SN74LVC2T45DCTR range from 1.65 volts to 5.5 volts. Nominal supply voltages are 1.8V to 5V. Signal input levels will vary with the supply voltages. If you use the NXP 74AVC2T45DP chip the inputs will operate from .8 volts to 3.6 volts. However due to differences in packages you cannot use the NXP 74AVC2T45DP on the board as designed. The pins on that chip are .5 mm spacing. The TI chip has .65 mm spacing. Baud rates to 230,400 are possible but I have only tested the board which uses the TI SN74LVC2T45DCTR at speeds up to 115,200.

You can buy the bare boards Male DB9 or Female DB9 for $8.60. The boards come from OSH Park whose motto is "We're fab." And they are. Gold plated.

You can get the full documentation (schematics, parts list, and chip placement) here.

The board outputs full RS-232 levels (+/- 10 volts nominal about +/- 8 volts actual) for TxD, RxD, DSR, DTR, CTS, and RTS. These signals are available in a jumper field allowing you to jumper the board (with jumper shorts) for DTE or DCE use. RI is also available, but you have to wire jumper it according to usage. Since RI is so seldom used these days that should not be a serious impediment.

One point about the documentation. The schematics for the DB-9 Male board and the DB-9 Female board are identical. So is the parts placement. The only difference is how the DB connectors are wired on the PCB.


Building the Board

Install the 22uF, 6.3V capacitors C1, C2, and C8. Install all the .1uF capacitors C7, C9, C10, C11, C12, C13, C15, C17, C19. Install the 4.7uF 16V capacitors C3 and C4. Install the 2.2uF 16V capacitors C5 and C6. Install ICs U1 thru U5. Install the rest of the surface mount parts. Install ground pin GND0. Install the .1" ctrs headers and jumper fields. Install the DB-9 connector.

Update: 18 March 2014

I have modified the boards so that they can be powered from the device they are plugged in to. For that you use JU2. JU1 has been removed. In addition capacitors C3, C4, C5, and C6 have been reduced in capacitance so that the board powers up faster. You can find the documentation for the board at TTL to RS232 DB9 M&F 25 Sept 2013 Documentation. OSH Park has the TTL to RS232 DB9F 25 Sept 2013 available for $8.60 ea. The TTL to RS232 DB9M 25 Sept 2013 is also available for $8.60 ea.


Engineering is the art of making what you want from what you can get at a profit.