📄 readme
字号:
Webasto=======The purpose of this project is to make it possible to remotely switchon a Webasto Thermo Top C water heater that is used to pre-heat theheating system of a car without starting the motor. Instead of addingan additional wireless transmitter and receiver, I've used theexisting remote control of the central door locking system.The system was built for a Volkswagen Transporter T5 with a waterheater that has a programmable timer, but no remote control. When youpress the "door close" knob on the remote control of the central doorlocking system when the doors are already closed, the car respondswith a short flash (+/- 200 msec) of the turn signal lights. I'vebuilt a circuit with an ATtiny12 that monitors one of the turn signallights, and turns the heater on when a specific pattern of pulses isdetected. The heater is switched on by simulating two button presseson the control unit.Usage=====The switch-on pattern is 3 "door close" signals with a pause of 1 to 3seconds between consecutive pulses. Normal use of the turn signal oremergency flasher results in pulses that are too long and intervalsthat are shorter than 1 second, so there is no risk of accidentallytriggering a heater start. To confirm the reception of the switch-oncommand, the right turn signal light is slowly flashed two times. Theheater is started after an additional delay of 10 seconds, duringwhich the start may be aborted by sending an additional signal. Anaborted command is confirmed by 3 short flashes of the right turnsignal light. The heater may also be switched off remotely, by sending2 instead of 3 "door close" signals, which is confirmed by a singleslow flash.Hardware========The hardware is pretty straightforward: an ATtiny12 with one input andtwo outputs. The input is connected to the right turn signal light,clipped to 5V. One output switches a relay that turns on the rightturn signal light, and the other output drives an optocoupler thatcloses one of the buttons on the heater control unit. The tworemaining pins drive diagnostic LEDs. The brown-out detection of theATtiny12 is enabled at 2.7V.I've built the circuit inside a strip of U-shaped aluminum, which isstashed behind the heater control unit in the roof. The optocouplerthat shorts the lower-left button is built into the heater controlunit. I made the button connections inside the unit by insertingwirewrap wires into two tiny holes in the PCB, so that I could avoidsoldering the PCB with SMD components.Since this circuit is always switched on, the power consumption shouldbe as low as possible. For that reason, I used an LP2950CZ low-powerregulator, which results in a total power consumption of only 0.18mA.I found out the hard way that it is always a good idea to read thedatasheet. When I connected the circuit to the battery, the ATtiny12would sometimes not start up, and the voltage regulator would getpretty hot. This problem did not occur during tests with a 12V powersupply. It turned out that the regulator was oscillating because theoutput capacitor was not large enough, something the datasheet warnsabout. After replacing the capacitor, the regulator worked OK.Software========The software uses a timer that generates an interrupt every 4 msec.The interrupt handler increments a saturating 8-bit counter that isused for delays and timeouts. It also shifts the state of the rightturn signal light into a register. When this register contains 0x00,the light is considered off, and when it contains 0xff it isconsidered on. All other values are ignored to avoid problems withbouncing contacts or spikes.Normally, the ATtiny12 is sleeping in powerdown mode. It only wakes upon timer or pin-change interrupts. The pattern detection cycles startsby waiting for a low signal for more than 1 second. After that, thenumber of high pulses is counted, but when a high pulse is longer than250 msec, or the interval is shorter than 1 second, the detectioncycle is restarted. The counting stops when no new pulse is seen for 3seconds. When the final count is not 2 or 3, the cycle is alsorestarted.After a successful detection, the command is confirmed by flashing theturn signal light. During the next 10 seconds, the state of the lightis monitored, to check for an abort command. Finally, either 2 or 1button presses are simulated, depending on the number of pulses: 2 toswitch the heater on, and 1 to switch it off.The diagnostic LEDs show the current state of the software in thefollowing way:- The red LED blinks shortly when the detection cycle is restarted.- The green LED signals the detection of the right turn signal.- The green LED lights when the feedback signal relay is activated.- The red LED lights when the control unit button is activated.License=======This software is licensed under the terms of the GNU General PublicLicense as published by the Free Software Foundation, either version2 of the license, or (at your option) any later version. A copy ofthe GPL version 2 license can be found in the file COPYING.Author & website================Dick Streefland <dick@streefland.net>http://www.google.com/search?btnI&q=webtag_net_streefland_avr_webasto
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -