Apple IIe Implemented Battery Charge Controller

Here are some pics of the charge controller. . .

In the left with the green lights is the charger, which is hooked up to the control relay on top of the apple inside the plastic box in front of the speaker, that plugs into a 110V power outlet and the apple, so the apple can controll if the charger gets turned on.


A closer look of the power supply, you can just use a regular charger.


Here is the triac relay (not an actual relay) the charger plugs into this.


The black film can is the coupler that connects to the battery, which in this case was replaced with a large capacitor to simulate a battery at accelerated draining rate. The coupler works very simply, the battery is connected to some LEDs, and the other end is a photoresistor, which is pluged into the apple that reads its resistance. So if the battery is good, the LEDs are bright, and the apple reads a small resistance; if the battery is dead, the LEDs are dark, and the apples knows.


A screenshot of the charger in action. You can see when the voltage gets too low (I think the bottom line was set at 10V, see how it never hits the line once the thing was turned on) When the battery is charged, the charger shuts off again, waiting for it to drain to a low nuff level. . .


The charge curve looks like this for a real battery, it takes hours for my little charger to charge up a lead acid. So it ain't that interesting to look at the screen.


Blueprint. A bit different from the implementation.



Circuit diagram and what the thing does (program flowchart).



Vertical: resistance reported by Apple IIe PDL(0) port (0-255)
Horziontal: Actual battery voltage as measured by multimeter during calibration.
(1348 = 13.48 Volt; 1067 = 10.67 Volt, etc)

A concern was the way voltages were taken by the computer, I didn't use a multimeter or anything, just LEDs, but the way the apple reads the resistance and the actual voltage was pretty linear in th range we are interested, so it's okay.


10 HOME
20 HGR
30 IF PDL(0) < 250 THEN GOTO 100
40 GOTO 30

100 HGR
110 HCOLOR = 2
120 HPLOT 0, 128 TO 279, 128
130 HCOLOR = 3
140 X = 0

150 Y = PDL(0) /2
160 HPLOT X, Y
170 X = X + 0.5
180 VTAB 23: HTAB 5
190 PRINT (255 - PDL(0)) * 0.05757; " VOLTS",
200 PRINT PDL(0)
210 IF PDL(0) > 220 THEN GOTO 500
220 IF PFL(0) < 30 THEN POKE 49240,0
230 IF X > 279 THEN GOTO 10
240 GOTO 150

500 POKE 49241, 1
510 VTAB 23: HTAB 5
520 PRINT "---------CHARGER ON---------"
530 GOTO 150
 

The program code the apple was running.

Content last updated:
July 15, 2015 23:56


Unless noted otherwise, graphics and text and designs are all Copyright (c) P A N G Industries.
Trademarks are the properties of their respective owners.
Please Contact us if you claim ownership of content and wish to have them removed.


Post your comments here.
071515 21:44:52
011216 10:03:27
011216 10:09:34
011516 13:34:51 Testing
011516 13:42:20
011516 13:42:28 Testing
021816 23:46:59
021816 23:54:20
030716 20:43:47
030716 20:43:48
032116 13:53:05
032116 14:00:51
041916 18:35:38
041916 18:38:39
051016 23:17:41
051016 23:24:44
061116 13:02:03
061116 13:07:45
061416 19:00:34
061416 19:07:43
070816 17:58:13
070816 18:04:06
091316 17:05:33
091416 18:32:36
091416 18:39:13
101316 1:53:47
101316 2:00:26
110916 23:14:00
110916 23:20:18
121916 23:57:38
122016 0:02:52
010517 3:10:09
010517 3:17:39
031517 17:19:44
040817 1:34:05
051617 2:37:28
051617 2:44:40
062617 15:33:04
071117 16:59:17
071117 18:53:46
071117 19:00:48
071117 20:39:09
071117 20:46:16
071317 23:01:00
071317 23:01:04
072817 14:47:42
081217 3:12:34
082617 15:30:05
091017 3:07:31
091217 20:23:29
091217 20:29:10
092417 20:30:14
092417 20:31:11
092417 20:34:17
092917 17:38:16
100617 21:13:21
100617 21:17:58
100917 18:33:07
100917 18:34:12
100917 18:35:56
101617 11:20:00
102617 13:22:59
102617 13:24:59
102617 13:29:23
103117 12:51:40
110317 21:49:30
111017 17:11:05
111017 17:21:25
111017 17:21:29
111617 14:50:53
112617 13:26:10
112617 13:30:09
112617 13:30:17
112617 13:32:18
120117 17:08:03
120617 21:37:11
120617 21:43:07
121217 4:01:54
121217 4:04:12
121217 4:09:50
121717 1:56:05
122617 23:52:25
122617 23:53:37
122617 23:55:30
010118 1:35:08
010918 23:58:05
011018 0:08:49
011018 23:09:30
011018 23:10:14
011018 23:18:42
011518 23:50:02
012618 4:33:04
012618 4:39:25
012618 4:40:25
013118 2:15:43
021018 4:12:18
021018 4:18:14
021118 1:08:34
021118 1:13:59
021118 1:26:55
021118 7:17:15
021118 7:18:47
021118 7:22:47
021618 12:16:59
030218 17:21:41
030218 17:24:53
030218 17:25:26
030818 4:53:33
031318 9:41:11
031318 9:46:43
050418 21:25:54
050418 21:35:22
050718 13:25:05
050718 13:36:53
050718 13:59:59
050718 14:05:54
050718 14:19:47
050718 14:20:02
050718 14:22:24
051618 9:10:28
051618 9:22:23
051618 9:49:54
051618 10:02:39
051618 10:07:59
051618 10:13:10
051618 10:16:26
061318 0:40:38
061318 0:53:42
061318 1:05:37
061318 10:32:50
061318 10:46:29
061318 10:57:27
061318 11:09:38
061318 11:21:02
061318 11:32:43
061318 13:25:48
061318 13:37:25
061318 13:59:28
061318 14:09:17
061318 14:17:13
061318 14:19:59
061318 14:20:08
061318 16:10:43
061318 16:24:17
061318 16:49:13
061318 16:56:06
061318 17:08:49
061318 17:21:49
061318 17:30:02
061318 17:45:19
061318 18:02:37
061318 18:05:12
070718 13:01:03
070718 13:14:02
070718 13:35:40
070718 13:47:31
070718 13:51:45
070718 13:56:39
070718 14:00:12
080318 1:02:50
080318 1:14:21
080318 2:43:39
080318 3:25:29
080318 3:48:04
080318 3:59:53
080318 4:22:45
080318 4:39:40
080318 4:42:11
080618 10:38:15
080618 10:52:32
080618 11:06:08
080618 11:19:00
080618 12:01:35
080618 12:01:44
080618 12:21:14
080618 12:26:14
080618 12:39:22
080618 13:01:07
080618 13:20:02
080618 13:22:32