Electrical Caravan wifi spirit level - Pimping my ride

SkinnyBuddah

Active Member
Jul 12, 2015
129
197
43
44
Ballarat
Hey all,

I've been doing alot of MQTT home automation stuff lately... So after taking the family out for a weekend and arriving in the pitch black (Free camping). Levelling the van in the dark and almost going home a single bloke I decided there has to be a better way to level up the van, especially in the dark.

With that in mind i've got a new project with the following requirements
  1. Be able to be switch on and off from the phone
  2. Be usable at night (Which is the major reason for this one)
  3. Report "level" data back to my phone in real time allowing me to drive along and find level if i don't intend to unhook for the night
  4. Double as a small night light (Not required but a nice to have)
Essentially im creating a van sized digital spirit level. Pointless perhaps, but for under $20 in parts why the heck not have a go an learn at the same time.

So for the project I installed some 12v LED's on each side of the van under the wheel arches. I also purchased a ko-jack level. Fed up with ramps and again requiring swmbo to help out.

The plan is simple:
  1. Put van exactly where swmbo wants it.
  2. Enable levelling system from phone or a button
  3. Have low side of the van light up the wheel arch
  4. Use Ko-Jack level to lift the van until the light goes out
  5. Unhook and use a similer system for front to back (IE: 2x Led's near the Jockey wheel)

Materials needed for the job
  • ESP8266-12E (The brains of the operation)
  • Wii Nunchuck (I'll use the accelerometer in it as the spirit level and the kids have killed a few)
  • 4 channel relay board
  • 12v --> 3.3v power regulator
  • Some 12V LEDs

I've managed just this evening to get the programming done. Next is to mount the nunchuck, power supply and 8266 in a little box.

So with all that out of the way and no pictures to upload yet (On todo list for tomorrow as well as upload the code and schematics)

I'm wondering if anyone has any other ideas or indeed interest in seeing how the project goes. I'll obviously need to do a full write up of everything, although if there's no interest there's no point.. lol

-----
UPDATE: Have completed the code - completed the wiring of a test rig - Just need to install in a little box and put in the van.

I've uploaded the code used for this project. Be gentle as I'm far from a programmer.
The only downside with the current iteration is it utilises an MQTT broker to send data to a mobile - Without a connection to this broker the code wont allow the device to boot completely hence making the code unusable for those without the same setup as I have (Looking at you @Crusty181 with the same router.. lol). With that limitation in mind, wondering if I should have it simply attempt to connect - This fails and it reverts to not using wifi OR do I have the device then configure itself as an Access Point and host some sort of simple web page etc. I'm thinking of just disable wifi - Seems a heck of alot easier.

Update: I've redone the code so when wifi fails the level SHOULD still work, although it still needs testing tbh.
Also fixed the calibration code as it was recording the angle backwards (Being a - value rather than a +).

Update: Have added a schematic for utilising a nodemcu board. This would mean no longer needing the power supply board as you can use any USB cable with a 5V power adapter much like you use to charge your mobile phone. Also means no need to pre-wire the ESP8266 for its first firmware flash via serial.

Code will also need to be changed for those using a nodemcu board as the pin numbers become D0 for relayleft and D5 for Relayright.

Cheers
Jim
 

Attachments

  • PandaLevel.zip
    3.5 KB · Views: 250
  • PandaLevel.png
    PandaLevel.png
    286 KB · Views: 355
Last edited:

bigcol

Well-Known Member
Nov 22, 2012
6,814
10,164
113
Swan Valley Perth
curiouser and curiouser

had never thought about the leveling in the dark - we have been very lucky at always getting to where we want to go with a few hours of day light left, but a great idea none the less

I have one of those Go-Jacks
ummmmmmmm

yeah, nuff said
they are just like the old scissor jacks - a heck of a lot of winding to get very little distance

I found it quicker and easier to just dig the dirt out from under which ever wheel needed it - always carry an entrenching tool
folds up nice and small

entrenching tool.jpg
 

Drover

Well-Known Member
Nov 7, 2013
13,018
19,778
113
QLD
Having turned an old Sat dish into a mobile Broadband aerial and built a yagi for the same this is most interesting.............
 
  • Like
Reactions: bigcol

SkinnyBuddah

Active Member
Jul 12, 2015
129
197
43
44
Ballarat
My sisters van has a built in remote controlled hydraulic levelling system for her Van.
Push a button and the van levels itself, flash as
Have been trying to work this one out diy as well but I can't think of anything more elegant than screw jacks with a geared motor on them. Mechanical ability lets me down. Lol
 
  • Like
Reactions: bigcol

Drover

Well-Known Member
Nov 7, 2013
13,018
19,778
113
QLD
From when I had the off road camper I always envisioned making 4 air rams to do the job, lighter than hydraulic just need a good 12v compressor, but the damn thing would probably fire up at 0200 to keep pressure and upset people, especially the one beside me, or blow a line and throw us out of bed.......................... Thought of hydraulic but pump, oil tank and plumbing would be a bit heavy while lecky servo's work great till the second water crossing.....................in the long run though I haven't had any great dramas getting level, usually only takes 5 min for a difficult one, now thats is, practice helps.
When I would head off in the semi back in the Mil days I had an air jack, workshop unit with the handle pulled off, it plugged into my air tank and was the best jack around for changing a tyre, would like the same thing for ute and van.
 

achjimmy

Well-Known Member
Jan 24, 2011
3,031
3,401
113
I have an ezi level as sold by coast to coast. Think @relgate bought one too? They work okay but you have to be wise to it as when you first move the accelerometer must skip with inertia and false green for a sec. overall happy but they are a bit exy. I like the idea of just jacking the van up but didn't think the Jayco lifting points were strong enough?
 
  • Like
Reactions: relgate and bigcol

SkinnyBuddah

Active Member
Jul 12, 2015
129
197
43
44
Ballarat
I have an ezi level as sold by coast to coast. Think @relgate bought one too? They work okay but you have to be wise to it as when you first move the accelerometer must skip with inertia and false green for a sec. overall happy but they are a bit exy. I like the idea of just jacking the van up but didn't think the Jayco lifting points were strong enough?
This is the one I have...
And since I have a dual axle van without independent suspension, pushing up on one wheel makes the other one push down too seems to work really well for me.

Okay out to the mancave to get things finished and photos done...
 

SkinnyBuddah

Active Member
Jul 12, 2015
129
197
43
44
Ballarat
Started getting all the soldering work done and got side tracked with other stuff. So far have the before pic or parts needed if you will. ..

Sorry it's dragging on... I'll do a diagram soon too then edit the first post and put it all together

So from left to right

Resisors
Power 3.3v/5v power regulator
Wii nunchuck
Esp8266-12e (you could use a nodemcu board to make life easier connection wise)
Small project box
4 channel relay board.
 

Attachments

  • 20161010_201256.jpg
    20161010_201256.jpg
    1.4 MB · Views: 369
  • Like
Reactions: Drover and achjimmy

SkinnyBuddah

Active Member
Jul 12, 2015
129
197
43
44
Ballarat
I'm interested in your wifi battery monitoring project. Can you elaborate more on that?
The battery monitor uses an arduino uno for the brains. And esp8266 to provide wifi connectivity. A resistive voltage divider measures the voltage on one of the analogue pins and an acs712 module provides the amperage in/out to another analogue pin.

All the data is sent via mqtt to the caravan router which runs openwrt and mosquito mqtt broker.

Finally I run an android app that subscribes to the required topics and shows me pretty values.
 

Attachments

  • Screenshot_2016-10-11-07-42-04.png
    Screenshot_2016-10-11-07-42-04.png
    126.6 KB · Views: 224
  • Like
Reactions: achjimmy

bigcol

Well-Known Member
Nov 22, 2012
6,814
10,164
113
Swan Valley Perth
The battery monitor uses an arduino uno for the brains. And esp8266 to provide wifi connectivity. A resistive voltage divider measures the voltage on one of the analogue pins and an acs712 module provides the amperage in/out to another analogue pin.

All the data is sent via mqtt to the caravan router which runs openwrt and mosquito mqtt broker.

Finally I run an android app that subscribes to the required topics and shows me pretty values.

if I knew what you were saying, I would probably like it.........................
:biggrin: