|
The wake-up circuit is a simple (and most definately not the nicest) way of allowing your Multitainer to go to sleep and wake up at a specific time. The reason why we need this circuit is based on the fact that either the MT BIOS or Win98 (not sure which) doesn't allow you to shutdown or hibernate your machine and wake it up on a schedule. How it worksIf you are just interested in using the circuit without knowing how it works, you can jump directly to the building section.The circuit has connections to the serial port and the power switch jumper on the motherboard. The circuit is controlled by commands sent down the serial port. The protocol and baud rate etc are discussed in detail in the Protocol section below. Generally, the circuit is used as follows: The counter in the circuit is not very clever or accurate, and so you need to calibrate the circuit when its first used. This allows the PC side code to take into account the inaccuracy in the counting. ComponentsCircuit Diagram
ProtocolBelow are the settings for the serial port connection to the circuit.
Below is a list of the commands and expected responses. The values in quotes eg 'T' mean the byte value is the ASCII value of the char T. x and y are the delay values. These are discussed more in the Calibration section.
PIC ProgramThe PIC chip is controlled using a very basic JAL program. The source and hex files can be downloaded below. The source is available under the GPL and some code to help talking to the device under Windows is also included.Telling MTV How to Use the CircuitMTV can be told to use the circuit by setting attributes to the MTV node in config.xml:<?xml version="1.0" encoding="UTF-8"?> <MTV useWakeupCircuit="yes" wakeupCalibration="1022"> . . . </MTV>You need to provide a calibration value because the PIC chip isn't very accurate. MTV will aim to wake up 10 minutes before the start of a programme. I am considering the best method of adding auto calibration, so that the circuit gets more accurate, the main problem with this is that MTV currently does not know if it has been woken up by you or the circuit and so using it would contaminate the calibration. DownloadThe source and hex files along with the circuit diagram can be downloaded here: mtv_wakeup_1.zip
|