The iMac G4 Screen Brightness Control is complete! Special thanks to MacTester for all his guidance with this, it would never have happened without his direction.
The goal was to implement a + and - touch sensor controlled screen brightness functionality by using two sensors, one placed internally at each end of the DVD door. This would provide a clear reference point and easy touch access on the front of the iMac. The locations of the hidden sensors are shown below. Post
108 of this thread shows the sensors mounted on the inner side of the DVD door.
The brightess is controlled from the sensors by the Picaxe 08M2 MicroController chip. I bought the complete starter kit and a couple of extra chips. The kit comes with a project board that allows USB to Serial programming of the microcontroller. Its a great product for this type of application, and the programming interface is well documented. Once programmed, I mounted my 08M2 chip into a small breadboard that sits above the NUC in the fan bay. The Picaxe 08M2 sits in the center of the breadboard. Seven wires are plugged into the board to control the reference voltage sent to the green inverter wire in the screen. It is shown wired up in the photo below.
The programming code that controls the iMac brightness automatically calibrates the touch sensor functionality at system startup, so no user intervention is required to fine-tune the touch sensors. Software handles it all. Also, the code allows the user to recalibrate the touch sensors on the fly if need be, by simply pressing both the - and + sensors simultaneously. The Picaxe Controller immediately dims the screen to alert the user that sensor calibration is taking place, then returns the screen to default 75% brightness when the process is complete. It takes about 10 seconds. The user has several seconds to get his fingers away from the sensors to allow accurate re-calibration.
I've made a video of the functionality. It shows clearly how the brightness works.
iMac G4 Touch Sensor Brightness Control Video
The code attached below can be opened with the free MacAXEPad software, the programming tool for the Picaxe controller.
Ersterhernd