Skip to content
Biber-Mania Smart Camper

DIY Smart Camper Control

The MaxxFan Deluxe control in our Peugeot Boxer camper

=> Telegram support and info group for the project.

Video about the MaxxFan Deluxe control

Why a separate control for the MaxxFan?

As already mentioned in the article about our camper control mentioned, our MaxxFan Deluxe* fan is also integrated into the camper control concept via a specially developed control.
MaxxFan control with the additional module
Connection of the MaxxFan control
There is a wealth of additional control options, but none of them could meet our expectations, so we developed an additional control for our MaxxFan Deluxe* developed by ourselves.
Board of the MaxxFan control
With many commercial and also DIY solutions the essential problem is that it is always a control that only works in one direction. That means that neither is it detected whether the control command was carried out at all, nor can it be detected whether status changes have perhaps already occurred via another control option (e.g. via the IR remote control or manually via the buttons on the MaxxFan itself). This becomes particularly serious when buttons have double functions (e.g. on/off, open/close or in/out), i.e. the function of the button changes depending on the operating status. This one way show, as I call it, is simply unsuitable for real control tasks such as we want to implement in our camper van. Another problem with the solutions we found is that you have to find space for an additional box somewhere, and with IR transmission even within sight of the MaxxFan IR receiver. In a camper, storage space - especially for electrics, which only ever take up space in an annoying way - is always a problem. The whole thing often ends with dozens of additional little boxes that remind you of a Lego box (maybe only older people will know) and where the question quickly arises: why on earth so many cables and why is the control not where the device to be controlled is. Yes, there are also little boxes that communicate by radio, but honestly, who wants to travel in a self-built microwave where you are irradiated from all sides and might even catch a nasty tumour.
To cut a long story short, we have found a solution that:
  • Needs no additional space because it is installed inside the MaxxFan itself
  • Needs only 2 additional wires (RS232 or I2C) for communication instead of 2 * RJ12 cables.
  • Can act independently and accepts status and action requests bidirectionally at any time.
  • Can lock the hood in the open or closed state.
Wiring of the MaxxFan control

Step by Step

Build Instructions

For those who want to breathe a little more Deluxe into the MaxxFan* as well: here is now the chance to rebuild the control that we developed yourself. The cost of this DIY project, as you will see in a moment, is really low, but you should bring some experience with electronics and communication protocols.
But first the formalities without which, unfortunately, misunderstandings sometimes arise in our constitutional state:
The circuit diagrams, boards etc. published by me can be freely rebuilt by private users. Commercial marketing of devices that can be traced back to these circuit diagrams is only permitted with express written permission. Rebuilding and use at your own risk. I accept no responsibility at all for the function or for any damage resulting from rebuilds of the circuit diagrams, boards etc. published by me! That sounds bad, but it is half as wild (with me everything works perfectly). I just have no desire to be held responsible for damage simply because someone who has no idea about such things short-circuits a battery and sets fire to the camper or whatever.

The electronics

The MaxxFan Deluxe control consists of a small board with a microcontroller which, as already shown above, fits directly inside the MaxxFan. In addition a few small parts are needed, which I have summarised in a Reichelt shopping cart I have no affiliate agreement with Reichelt, so the shopping cart is only to be understood as a parts list and everyone can of course get the small parts elsewhere. Many things you may already have lying around at home. Besides the small parts you also need a 6-pin RJ12 cable* as well as an 8-pin LAN cable* (we bought them on Amazon) in order to connect the control to the MaxxFan electronics. The board also has space for a MAX232 level shifter or the P82B715 bus driver, but these are only needed for very long cable runs and we did not need them ourselves.
The assembly of the board is trivial, no SMD parts (apart from the optional driver ICs), so every tinkerer should be clear about how to assemble the board using the component placement diagram.
Component placement diagram of the MaxxFan control
Parts list 18
ComponentValue / Part
X1MEBP 8-8S
X2,X3,X4,X5,X6CTB0509-10 (1/5 each)
X7MEBP 6-6S
IC1MC 78L05 ACPG
C1,C2,C5,C6MKS-02 1,0µ
C3SM 0,1/63RAD
C4SM 0,33/63RAD
U1GS 20P + ATTiny 861A
OK1, OK2GS 16P + LTV 847
JP1BKL 10120919 (+JUMPER 2.54GL RT) or connect SJ1.
R1,R2,R12,R13,R18METALL 10,0K
R5,R6,R7,R8,R9,R10,R11METALL 680
R3,R4,R14,R15,R19METALL 2,20K
R16,R17Pull-up resistors depending on the situation
D11N 4148 DIO
C7,C8,C9,C10Tantalum 1.0µF/35V (optional RS232 level shifter)
IC2MAX232D (optional RS232 level shifter)
U2P82B715 (optional I2C bus driver)
If the MAX232 or the P82B715 bus driver is not used, which as a rule is not necessary, a jumper is still soldered on the underside as shown. With an RS232 or I2C driver the two other sides are connected.
Jumper auf der Platinenunterseite

The installation

The installation of the small additional control is quite simple. The board is designed so that it fits into the corner opposite the original board. A few dots of adhesive on the plastic pins are enough to fix the board in place. Besides the two connection cables (RJ12 and LAN), which are simply connected 1:1 to the original control, the motor cables also have to be tapped. If you do not want to cut the motor cables and connect them via a Y-piece, you can (as we did) simply use cable thieves. That way the control can also be removed again without a trace. The cables to the blower motor go to X2 (motor in (white), motor out (black)) and the cables to the hood motor go to X4 (M-Open (black), M-Close (white))
Leitungen im MaxxFan
Motorleitungen im MaxxFan
It is possible that the motor cables were connected the wrong way round, in which case the direction of rotation or the open/closed status in the status query will be wrong. In this case simply swap the 2 cables. The original power supply for the MaxxFan goes to connection X3 (this is connected 1:1 to X6) and the power supply coming from the battery is connected to X6. So no branching is needed and the small additional board is also supplied with power via the power supply for the MaxxFan. The communication cable is connected to X5 depending on the chosen interface (JP1 connected = RS232, JP1 open = I2C). Please make sure that the RS232 lines have TTL level and that the optional level shifter may be needed. With the I2C connection the optional pull-up resistors can be used, but you usually have more of those in an I2C bus system than you would like. When using the optional P82B715 bus driver, however, they are mandatory.

The communication protocol

As already described under installation, the small additional control can communicate via a serial RS232 or I2C bus connection. Which of the two systems is used depends on JP1 (do NOT change while in operation!). The protocol is very similar and internally everything is mapped via the same registers. Only the way in which these registers are set or queried changes depending on the communication interface used. In RS232 mode make sure that no multiple commands are sent, i.e. always send only one request and then wait for the answer. In I2C mode there is no other way anyway.

Communication via RS232 (9600 baud, 8 data bits, no parity, 1 stop bit)

As with the central main control unit, yes the commands are identical there but are converted internally to I2C, the serial requests always have the same structure. The start sequence (#:) is followed by a group (M = MaxxFan) and an action (e.g. D> = direction out). If a value is needed, e.g. MV>5 (set speed to 50%), it is transmitted in readable ASCII form. Every command is terminated with a hash (#). The supported commands are:
RS232-Befehle 19
CommandDescription
#:MP>#MaxxFan On
#:MP<#MaxxFan off
#:MS>#MaxxFan Speed up
#:MS<#MaxxFan Speed down
#:MV>x#MaxxFan Set Speed x (0-10)
x = 0 = #:MP<#, x = 1-10 = 10-100%
#:MV<#Read status register (1 byte, see I2C)
#:MD<#MaxxFan Dir In
#:MD>#MaxxFan Dir Out
#:MH<#MaxxFan hood closed
#:MH>#MaxxFan hood open
#:MA>#MaxxFan auto on
#:MA<#MaxxFan auto off
#:MA>-#MaxxFan auto reset
#:MT<x#Read MaxxFan threshold register (2 bytes, see I2C)
x = 0-13 (siehe I2C)
#:MT>x#Set MaxxFan threshold register
x = 32 bit value (see I2C)
#:MM<x#Read MaxxFan measurement register (2 bytes, see I2C)
x = 0-4 (siehe I2C)
#:ML>#Lock MaxxFan hood in its current state
#:ML>-#Release the MaxxFan hood lock
#:ML<#Query MaxxFan lock register. (1 byte, see I2C)
Commands that are not understood or whose parameters are outside the permitted range are answered with a question mark (?). On success the reply is the value or an acknowledgement ('\r', 0x0D).

Communication via I2C (address 0x51)

Now it gets a bit more technical, but anyone who knows I2C knows what this is about. The MaxxFan control has an internal communication register with a size of 6 bytes. This can be addressed at any position and the address pointer is automatically incremented when reading or writing. Just as you know it from I2C.
I2C communication register (6 bytes)
StatusAutoLockReservedParamCommand
8 Bit (R)8 Bit (R)N/A16 Bit (R/W)8 Bit (W)
The control also has 13 threshold registers with 16 bit and 5 measurement registers, also with 16 bit. These registers cannot be addressed directly and must be copied into or out of the parameter register by means of appropriate commands. There they can be read or written. The measurement registers are pure status registers, they are read-only, whereas the threshold registers are read/write registers that are also retained permanently via an internal EEPROM.
Reading and writing the registers works as usual with I2C. To read, write the command to copy the register content into the command register and then read the copied value from the param register. To write, first write the param register and then write the command to set the value into the command register.
The option of fine-tuning the ADC used via an additional threshold register is also available, but more about that when it comes to the optional tuning.

The registers

Status Register (8 Bit)
AutoIn/OutOpen/CloseOn/OffSpeed (0-10)
1 Bit1 Bit1 Bit1 Bit4 Bit
AutoLock Register (8 Bit)
Locked/UnlockedReservedOpen/CloseReserved
1 Bit1 Bit1 Bit5 Bit
Param Register (16 Bit)
Parameter Value
16 Bit
The command register is written with a command byte; once the command has been processed the register is automatically reset. By reading the command register you can check the release for a new command; if the command register is not cleared, a further command overwrites the previous one, so you should always check that the previous command has been processed. Since the MaxxFan does not involve time-critical actions you can also simply take a short pause; processing is usually very fast. The new status can then be queried via the status register.
Command Register (8 Bit) 14
CommandAction
0x10MaxxFan On
0x20MaxxFan Off
0x3xMaxxFan Set Speed x (0-A)
x = 0 = off, x = 1-A = 10-100%
0x40MaxxFan Speed up
0x50MaxxFan Speed down
0x60MaxxFan Dir In
0x70MaxxFan Dir Out
0x80MaxxFan hood open
0x90MaxxFan hood closed
0xAx0xA0 = MaxxFan auto on
0xA5 = MaxxFan auto off
0xAF = MaxxFan auto reset
0xBxRead MaxxFan threshold register (copy 16 bit value into param register)
x = 0 = Threshold Auto
x = 1-A = Threshold Speed 10%-100%
x = B = Threshold Open
x = C = Threshold Close
x = D = ADC average counter
0xCxSet MaxxFan threshold register (write 16 bit value to param register)
x = 0 = Threshold Auto
x = 1-A = Threshold Speed 10%-100%
x = B = Threshold Open
x = C = Threshold Close
x = D = ADC average counter
0xDxRead MaxxFan measurement register (copy 16 bit value into param register)
x = 0 = Measurement Auto
x = 1 = Measurement Motor In
x = 2 = Measurement Motor Out
x = 3 = Measurement Motor Open
x = 4 = Measurement Motor Close
0xExMaxxFan auto-lock hood
x = 0 = unlock hood
x = 1 = lock hood in its current state

Optimising and adjusting the threshold registers

The MaxxFan additional control can be fine-tuned via the threshold registers. As a rule this is not necessary, but it can be required, for example, if the MaxxFan is operated with an unregulated or higher voltage. To carry out a fine adjustment you should first take a current reading, i.e. read out the current values via the measurement registers.
The standard values are:
Default threshold register values
RegisterValue
Auto300
Speed 10%-100%720,660,580,490,400,350,310,250,180,90
Open, Close400
Via the I2C interface the values can simply be written into the param register and then saved via the corresponding command in the command register.
When communicating via RS232 the param and command register cannot be written directly; here we use a little trick. As already written above, the param register has 16 bit and the command register 8 bit. To write both registers we therefore need at least 24 bit. To achieve this we use a 32 bit number where 8 bit remain unused. To write the values to the right place we can work with a multiplication. So let us assume we want to store the value 400 in the open threshold register. The param register comes before the command register, so we have to shift the value 400 by 8 bits to the left. We achieve this by multiplying the value 400 by 256, i.e. 102400. The open threshold register has the address 0xB hex, i.e. 11 decimal. We can simply add this value to our determined param register value, i.e. 102411.
Once we have found the value we can write the register with the command #:MT>102411# . The same of course applies to all other registers. If you are unsure whether the correct value was saved - nothing can break - it makes sense to read the corresponding register again and check whether the desired value was stored. Completely wrong values are rejected anyway.
To familiarise yourself with the system, it makes sense to read out all registers and compare the values with the actually measured values from the measurement register. Once you have understood how these values relate to each other you can optimise as you like. Have fun.