Cold and miserable outside.
Had a good day in the electronic lab..
Finished the levelling control unit completely. Tested all features and it works perfectly .. now I only need to make the cables  to connect right into the existing harness and it should work with the trailer. Am quite optimistic. Tilt switch is very sensitive, so I should get good reactions wherever I mount it.

Had a little bit of trouble fitting all in 32k of memory, and removed the orientation calibration – used fixed orientation – but now everything works and I might just add it again.

I also tested the Can bus interface for the box and I can remote control it from my test program running on the PC, which means later on I will have control of the unit from the vehicle. So I can hitch the van right from the tow vehicle. Of course I still have to put the pin into the coupling after that.

display_volt

display_legsdisplay_angle

The auto level works, manual control works, level calibration and display functions.

I can display the battery voltage, actual angles continuously and the temperature inside the box, as will all my processor boxes. I always know in the central system if any of the boxes overheat. No fans, no ventilation and  plastic boxes, so one better knows what is going on, however the currents inside the boxes are so minimal there is not much chance of heating up.

I also plan to implement a CAN bus data transfer from this and other accelerometers into the central system to monitor and analyse the performance of the suspension. I will measure g forces in the vehicle and compare it with the van. But that is truly hobby and will do that as we travel. I mean I have to have something to do when we leave here :lol: :lol:

I will use the rest of the day solely for documentation of all the new stuff in my development wiki. I am lagging behind a bit with that, need to keep it up to date.

This control unit has a few more features than the original, which has quite a few shortcomings. I managed to deadlock the original unit a couple of times and when it levels it always levels upwards, meaning if there is a slope it always lifts the lower end and does not try to level on a lower height. My unit has a parameter for level high or level/high-low. The second mode takes a bit longer naturally but it makes sure that the wheels not always hang in the limiter straps and the steps are not too far away from the ground unless it is intentional.

I have a few other little details but it goes too far to describe this all in this diary. This is subject of my internal documentation. I am pretty happy how it turned out.

I have a total cost of $85 – the can bus being the most expensive at $20 – and around 30 hours of work. The original box with a key fob sells at US$500 something .. where the key fob can only be used to lift the front for unhitching. I still have a few hours to invest to write the phone app for the control unit, but that will be done when I address remote control for all the other function and I have a framework for that anyway. Then it is easy to do ..

I wanted to make a video from the auto level test but the display is too hard to read. I will make a video from the full action  on the trailer .. that’s more interesting anyway. Will make a comparison with the original too.