Pages: [1]   Go Down
Author Topic: Arduino project for motorhome  (Read 816 times)
0 Members and 1 Guest are viewing this topic.
italy
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello  smiley-grin

from the natio of the Arduino a request for help for a project.

On my motorhome I would like to make a touch screen control panel for controlling the heating (on - off, 3-level fan, gas valve control, outside temperature and internal, thermostat) and for the control of external openings, and the values ​​of battery .

A project that could have further developments.

Which Arduino is best suited for my project and what touch screen (7 "?)

If I want to make a good looking menu, with other sub-menu, which Arduino can give me this chance?

thanks
 smiley-wink
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12524
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The moment you say 'touch screen' it makes me think this is not going to be an Arduino problem. Particularly if you want it to look attractive, I think your best bet would be to use a touch screen tablet as your main controller, just using an Arduino if necessary to interface to external hardware.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Full Member
***
Karma: 5
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could possibly look into using this
http://playground.arduino.cc/SmartGPU/SmartGPU
It looks really cool but also really difficult to program a nice looking UI
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ PeterH then a program Android and bluetooth transmission to a receiver module with Arduino?

@ laadams I saw this screen, but it costs a lot, compared to a tablet

thanks
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

avenue33 (one of our members) has a library for 4D Systems LCD but they only go to 4.3"

I'm in the process of doing the same for my motorhome using an RS-485 network of custom-designed Arduinos. At this point I haven't thought too much about the UI but my gut feeling is that these days a WiFi/BT link to a tablet is the best way to go.

_____
Rob

Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

I'm a Italian motorhome owner who made a device to remotely control the Truma combi.

I used BASCOM AVR with ATM32 But I planing to port all the project to Arduino Leonardo.

You can find information on my personal Blog

http://e-domotics.blogspot.it/2013/07/dispositivo-mrc.html

in simple terms the device can be used for control completely the Truma combi by a IR remote control, By SMS and Bluetooth.

I also made ​​a Android application which allows better control of the boiler.

Let me know what you think about the project.

It took me 4-5 years to develop and I would like to receive some comments (both positive or negative)

Sincerely

Mirko Ugolini
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I give up, what's a "Truma combi"?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 48
Arduino is awesome
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Truma Combi is a liquid gas heater/boiler system.

Some resources and ideas:
  • Here is a thermostat project that had a link on the Arduino Playground: http://arduinothermostat.blogspot.co.uk/
  • Here is a page on the Arduino Playground that shows different libraries and resources for interfacing with Environmental Hardware (Temperature, Humidity, etc.): http://playground.arduino.cc//Main/InterfacingWithHardware#envtop
  • Controlling a Gas Valve with unprofessional hardware, products, and precautions or not having it inspected by a professional can be very dangerous.
  • If the external opening are controlled by regular light switches, it would be possible to use relays and switches to open/close and detect the current state of the openings.
  • If you have the Ethernet Shield, you could have a web server running (http://arduino.cc/en/Tutorial/WebServer) and then control it easily from a computer, tablet, or phone on the same network. Wifi routers (and non-wireless network switches) don't need an internet connection to work (if your motor-home doesn't have one like 3G or 4G) . If you do want an internet connection, just search for a 4G modem or router.
Logged

An Arduino is not a toy; it's a professional utilitarian tool.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi just saw this and am working on a similar project

my jeep has a lot of extra features plus some things that i had to cheaply replace (like the windshield wipers broke and it would be expensive to replace the switch system)

anyway my project just uses a small lcd screen and two buttons to navigate through a menu. not as cool as a touch screen but you might be able to barrow some of my code or use my idea. cost is pretty low. just lcd, relay, arduino mega and two buttons.

its is not complete yet because while i was doing the final touches on the project i think i fried my arduino and am waiting for a new one. hahaha. im a newbie i know.

anyways here is my code seems to work although maybe overly complicated, i dont know im not that good.

Code:
const int pushButtonPin = 50;  //button that will swithch between modes, like windsheld wippers, and rearlight
const int selector = 51;   // button that will change the settings of each modewindshieldpower
int pressCount = 0;
int selectCount = 0;
int windshieldpower = 38;  // i want this to be able have to ability to be on / off / and intermittently on so that
int frontlightspower = 50;
int rearlightpower = 36;
int radiopower = 40;
int flashlightpower = 42;
int hampower = 44;
int antennauppower = 46; //antenna up and down is seperate because the factory motor has a seperate wire for moving up and moving down
int antennadownpower = 48;
int acc = 30;



int prevState = LOW; //part of debounce/counter for the mode button
int currState;

int prevState2 = LOW; //part of dedbounce/ coutner for the selector button
int currState2;

#include <Wire.h>
#include <LiquidCrystal.h>   // include LCD library


#define LCD_BACKLIGHT_OFF()     digitalWrite( LCD_BACKLIGHT_PIN, LOW )
#define LCD_BACKLIGHT_ON()      digitalWrite( LCD_BACKLIGHT_PIN, HIGH )
#define LCD_BACKLIGHT(state)    { if( state ){digitalWrite( LCD_BACKLIGHT_PIN, HIGH );}else{digitalWrite( LCD_BACKLIGHT_PIN, LOW );} }

byte buttonJustPressed  = false;         //this will be true after a ReadButtons() call if triggered
byte buttonJustReleased = false;         //this will be true after a ReadButtons() call if triggered


LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );

int lastpresscount = 0;
int lastselectcount =0;

int windshieldmode = 0;
int frontlightsmode = 0;
int rearlightmode = 0;
int radiomode = 0;
int flashlightmode = 0;
int hammode = 0;
int antennamode = 0;

int windshieldonoff1 = LOW;
int windshieldonoff2 = LOW;
int windshieldstatus=LOW ;
int rearlighton = LOW;
long int delaytimer = 0;
long int rearlightwait = 0;
int rearlightoff = LOW;
int rearlighttemp = LOW;

int radiooff = LOW;
int radioon = LOW;
int radioacc = LOW;
int antennaup = LOW;
int antennadown = LOW;
long int antennadelay = 0;
long int delaytimer2 = 0;
long int delaytimer3 = 0;


int accmode = LOW;

long int timer = 0;
long previousMillis = 0;


void setup()
{
  pinMode(22,OUTPUT);
  digitalWrite(22,HIGH);

  lcd.begin( 16, 2 );

  lcd.setCursor( 1, 0 );  

  lcd.print( "SCOUT CONTROL" );
  //
  lcd.setCursor( 5, 1 );

  lcd.print( "Ready" );

  pinMode(pushButtonPin, INPUT);
  digitalRead(pushButtonPin);
  // digitalWrite(pushButtonPin, OUTPUT);

  pinMode(selector, INPUT);
  digitalRead(selector);
  //digitalWrite(selector, OUTPUT);

  pinMode(acc,INPUT);
  digitalRead(acc);


  pinMode(windshieldpower, OUTPUT);
  pinMode(frontlightspower, OUTPUT);
  pinMode(rearlightpower, OUTPUT);
  pinMode(radiopower , OUTPUT);
  pinMode(flashlightpower , OUTPUT);
  pinMode(hampower , OUTPUT);
  pinMode(antennauppower, OUTPUT);
  pinMode(antennadownpower, OUTPUT);


  Serial.begin(9600);

}

void loop()
{
  unsigned long currentMillis = millis();
  timer = currentMillis - previousMillis;
  if(currentMillis - previousMillis > 10000) {

    previousMillis = currentMillis;


  }

  currState = digitalRead(pushButtonPin);
  if (currState != prevState)
  {
    if (currState == HIGH)
    {
      pressCount++;

    }
    delay(1);
  }
  prevState = currState;

  currState2 = digitalRead(selector);
  if (currState2 != prevState2)
  {
    if (currState2 == HIGH)
    {
      selectCount++;
    }
    delay(1);
  }
  prevState2 = currState2;


  if(pressCount > 9)
  {
    pressCount = 0;
  }

  if(pressCount != lastpresscount)
  {

    if(pressCount == 1)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("windsheild");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = windshieldmode;

    }
    if(pressCount == 2)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("frontlights");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = frontlightsmode;  
    }
    if(pressCount == 3)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("rearlight");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = rearlightmode;  
    }
    if(pressCount == 4)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("radio");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = radiomode;  
    }
    if(pressCount == 5)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("flashlight");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = flashlightmode;  
    }
    if(pressCount == 6)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("HAM");
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = hammode;  
    }
    if(pressCount == 7){              
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("Antenna");  
      lcd.setCursor(0,1);
      lcd.print("Mode:");
      selectCount = antennamode;
    }
    if(pressCount == 0)
    {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("Scout Control");

    }
  }

  Serial.println();


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry my code was so long the website wouldnt allow it so here is the second half

Code:
  if(pressCount != lastpresscount || selectCount != lastselectcount )
  {

    if(pressCount == 1)
    {
      if(selectCount == 1)
      {
        lcd.setCursor(7,1);
        lcd.print("OFF");
        windshieldstatus=LOW;
        windshieldonoff1 = LOW;
        windshieldonoff2 = LOW;
      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print("IN1");
        windshieldonoff1 = HIGH;
        windshieldonoff2 = LOW;
      }
      if(selectCount == 3)
      {
        lcd.setCursor(7,1);
        lcd.print("IN2");
        windshieldonoff2 = HIGH;
        windshieldonoff1 = LOW;
      }
      if(selectCount == 4)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        windshieldstatus = HIGH;
        windshieldonoff1 = LOW;
        windshieldonoff2 = LOW;
      }

      if(selectCount > 4)
      {
        selectCount = 0;
      }

      windshieldmode = selectCount;
    }
    if(pressCount == 2)
    {
      if(selectCount == 1){
        lcd.setCursor(7,1);
        lcd.print("OFF");
        digitalWrite(frontlightspower ,LOW); 
      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        digitalWrite(frontlightspower ,HIGH);
      }
      if(selectCount > 2)
      {
        selectCount = 0;
      }

      frontlightsmode = selectCount;
    }

    if(pressCount == 3)
    {
      if(selectCount == 1)
      {
        lcd.setCursor(7,1);
        lcd.print("OFF");
        rearlightoff=HIGH;
        rearlighton=LOW;
        rearlighttemp=LOW; 
      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print("TMP");
        rearlighttemp = HIGH;
        rearlighton=LOW;
        rearlightoff=LOW;
      }
      if(selectCount == 3)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        rearlighton = HIGH ;
        rearlightoff=LOW;
        rearlighttemp=LOW;
      }
      if(selectCount > 3)
      {
        selectCount = 0;
      }

      rearlightmode = selectCount;
    }

    if(pressCount == 4)
    {
      if(selectCount == 1)
      {
        lcd.setCursor(7,1);
        lcd.print("OFF");
        radiooff = HIGH ;
        radioon = LOW;
        radioacc = LOW;
      }

      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print("ACC");
        radioacc = HIGH;
        radioon= LOW;
        radiooff= LOW;

      }
      if(selectCount == 3)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        radioon = HIGH;
        radiooff= LOW;
        radioacc = LOW;
      }
      else
      {
        radioon = LOW;
      }
      if(selectCount > 3)
      {
        selectCount = 0;
      }

      radiomode = selectCount;
    }

    if(pressCount == 5)
    {
      if(selectCount == 1)
      {
        lcd.setCursor(7,1);
        lcd.print("OFF");
        digitalWrite(flashlightpower ,LOW); 
      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        digitalWrite(flashlightpower ,HIGH);
      }
      if(selectCount > 2)
      {
        selectCount = 0;
      }

      flashlightmode = selectCount;
    }

    if(pressCount == 6)
    {
      if(selectCount == 1){
        lcd.setCursor(7,1);
        lcd.print("OFF");
        digitalWrite(hampower ,LOW); 
      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print(" ON");
        digitalWrite(hampower ,HIGH);
      }
      if(selectCount > 2)
      {
        selectCount = 0;
      }

      hammode = selectCount;
    }

    if(pressCount == 7)
    {
      if(selectCount == 1)
      {
        lcd.setCursor(7,1);
        lcd.print("DWN");
        antennadown = HIGH;
        antennaup= LOW;

      }
      if(selectCount == 2)
      {
        lcd.setCursor(7,1);
        lcd.print(" UP");
        antennaup= HIGH;
        antennadown= LOW;
      }
      if(selectCount > 2)
      {
        selectCount = 0;
      }

      antennamode = selectCount;
    }
  }
  //windsheildfuntion...............................................
  if(windshieldonoff1 == HIGH)
  {
    if(timer < 7000)
    { 
      windshieldstatus=LOW ;
    }
    if(timer > 7000)
    {
      windshieldstatus = HIGH;
    }
  }


  if(windshieldonoff2 == HIGH)
  {
    if(timer < 4000)
    { 
      windshieldstatus=LOW ;
    }
    if(timer > 4000)
    {
      windshieldstatus = HIGH;
    }
  }
  digitalWrite(windshieldpower,windshieldstatus);
  // Rear light function.......................................
  if(rearlighton==HIGH)
  {
    digitalWrite(rearlightpower,HIGH);
  }

  if(rearlighttemp == HIGH)
  {
    digitalWrite(rearlightpower,HIGH);
    delaytimer = currentMillis;
    delay(1000);
    rearlighttemp = LOW;
  }
  if(rearlightwait > 180000 && rearlighton== LOW)
  {
    digitalWrite(rearlightpower, LOW);
  }
  if (rearlightoff==HIGH)
  {
    digitalWrite(rearlightpower,LOW);
  }
  rearlightwait= currentMillis - delaytimer;
  //radio funtion.................................
  if (radioacc == HIGH && accmode == HIGH)
  {
    digitalWrite(radiopower, HIGH);
  }
  if (radioacc == HIGH && accmode == LOW)
  {
    digitalWrite(radiopower, LOW);
  }
  if (radioon == HIGH)
  {
    digitalWrite(radiopower, HIGH);
  }
  if (radiooff == HIGH)
  {
    digitalWrite(radiopower, LOW);
  }

  //antenna function...............................

  if(antennaup == HIGH)
  {
    digitalWrite(antennauppower,HIGH);
    digitalWrite(antennadownpower, LOW);
    delaytimer2 = millis();
    antennaup = LOW;

  }
  if(antennadown == HIGH)
  {
    digitalWrite(antennadownpower, HIGH);
    digitalWrite(antennauppower,LOW);
    delaytimer2 = millis();
    antennadown = LOW;
  }
  if(antennadelay > 10800000 && antennadelay < 10805000)
  {
    digitalWrite(antennadownpower, HIGH);
    delay(9000);
    digitalWrite(antennadownpower, LOW);
  }


  if(antennadelay > 9000)
  {
    digitalWrite(antennadownpower, LOW);
    digitalWrite(antennauppower,LOW);
  }
  antennadelay=currentMillis-delaytimer2;

  accmode=digitalRead(acc);

  lastselectcount = selectCount;
  lastpresscount = pressCount;
 


}


Logged

Pages: [1]   Go Up
Jump to: