Post Reply 
Stupid HP-41CX tricks
03-10-2016, 05:28 AM (This post was last modified: 03-21-2016 03:29 PM by 4ster.)
Post: #1
Stupid HP-41CX tricks
I put together a little device that acts as a timed switch to control things like dumb chargers, lamps, small motors ....and Christmas lights ;-) using an HP-41CX and a CMT-200. I thought one or two of you might be interested.

For a long time I've had a copy of Gary Friedman's "Control the World With HP-IL". I'm not really an electronics guy so never got around to building anything in the book. But the "Basics" chapter has been stuck in my cobwebs for years. That chapter covers using opto isolators, triacs and relays to control different types of circuits using HP-IL.

Recently I received a sales email from a electronic supply house that featured a kit that I immediately recognized as related to the basic stuff in Friedman's book:
Triac Switch Card

So I ordered one with the intention of building a universal switch box to control AC circuits with the HP-41. …..An embarrassingly long construction time later, I have the box completed.


[Image: IMG_0380_r_zpsv6nzxesm.jpeg]
Using the 41 to charge itself using outlet two.

Two of the outlets on the box are unswitched. The other 4 receptacles are controlled by the switch cards's 4 circuits. Three are triac switched only and outlet 4 (painted black) has the triac driving a relay for larger loads. Due to poor planning I ran out of room in the box so one of the two required 9 volt power supplies is plugged into one of the unswitched receptacles. So far I am using the device to control charging times for my old HP devices, but it can control many different AC devices from toasters to turbo-fans.

The switch kit could use the HP82166A IL Converter or the HP82165A HP-IL/GPIO interface to control the board as described in Friedman's book. I recently acquired a Corvallis Micro Technology CMT-200 which is easier to use as a controller and plugs directly into a port on the 41.

To be conservative I think the three Triac switched outlets should be limited to about 2.5 amp resistive loads with this board (the manufacturer says 4 amps max with certain circuit board modifications). The fourth outlet is powered through a relay so can handle the relay's limit of up to 15 amps. There are a number of ways to program the control signal for each outlet but the easiest one is to use flags 01 through 04 and X< >F. (The CMT unit has a related, FLAG>X function that is my preferred method to set the control number in the X register for data out.)

Here are 2 little programs I use to run a countdown alarm to turn off the unit after a set time (most of which was robbed from ALMREL on Vol. 2, page 264 of the HP-41CX manual):

01 LBL "SWITCH"
02 SF 21
03 CF 22
04 "SF 1-4 ON" :Set circuits to turn on using flags 01 - 04
05 AVIEW
06 FLAG>X :Flags 0 - 7 to X - a CMT-200 function
07 ODX :Output Data in X - a CMT-200 function to turn on individual receptacles
08 "RUN: HH.MMSS?" :The rest sets up an alarm to run the "off" program below - "SWOFF"
09 PROMPT
10 FC?C 22
11 RTN
12 CLA
13 "^^SWOFF"
14 TIME
15 HMS+
16 ENTER^
17 ENTER^
18 24
19 /
20 INT
21 DATE
22 X< >Y
23 DATE+
24 LAST X
25 24
26 *
27 ST- Z
28 CLX
29 STO T
30 RDN
31 X< >Y
32 XYZALM
33 "RUN TIME SET"
34 AVIEW
35 END

01 SWOFF
02 0
03 ODX
04 END
Find all posts by this user
Quote this message in a reply
03-10-2016, 11:03 AM
Post: #2
RE: Stupid HP-41CX tricks
Nice project. Yes, the 41, especially the cx, is capable of a lot of data acquisition and control functions, which is why I got into it in 1986—to control repetitive processes on the work bench and take data. To my knowledge, there was no easier way to do this back then (or maybe even today!), and no quicker way to develop test programs. I never had the CMT-200, but I had the HP82169A HPIL-to-HPIB interface converter which opened up the possibility of interfacing to thousands of models of lab instrumentation from HP, Kiethley, Wavetek, Cytec, and other companies, and many instruments at the same time. This is something the newer calcs cannot do. They're just calculators, while the 41 is a very worthy (even if not very fast) controller.

Congratulations on your project.

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website Find all posts by this user
Quote this message in a reply
03-10-2016, 12:54 PM
Post: #3
RE: Stupid HP-41CX tricks
This just might be the nudge I need...
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)