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
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:
Materials needed for the job
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
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
- Be able to be switch on and off from the phone
- Be usable at night (Which is the major reason for this one)
- 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
- Double as a small night light (Not required but a nice to have)
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:
- Put van exactly where swmbo wants it.
- Enable levelling system from phone or a button
- Have low side of the van light up the wheel arch
- Use Ko-Jack level to lift the van until the light goes out
- 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
Last edited: