Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 48
Like Tree1Likes

Thread: Arduino Mega As Body Controller(BCM)

  1. #11
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    335
    Very intersting work AutoWiz !! i am also, just now,completing , a Full AC + power windows control system, based on arduino. but i am not going to use LCDS. instead, since i arledy got a 15.6" lcd in my car pc, i am going to use a java application to control everything from the pc that way you can also control them via voice if you want i can share code!

    As for the power, i think arduino, and especially mega has moooore than enough power! i dont even use arduino UNO boards. . i use barebobone atmega chips. the only limitation is indeed the inputs outpouts...

    I am also planing to build an ECU based on arduino chips, but this is some time far from now.. (i already have build a diagnostics module, connected with a tablet, as "instrument cluster" )

    if you want we can exchange info, because i really dont think this kind of work, has been done many times in the past !

  2. #12
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,852
    In fact, If you see well , just specifics files type are acccepted !
    Zip your files !

  3. #13
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    168
    settra your offers are why i posted this thread in the first place. please share with me what you have. i was not aware pc could control arduino. only upload sketch and maybe serial monitor. as i said before i am not great with these boards, yet. and i have considered building my own engine controller with megasquirt, but ended up going with aem.

    my capacitive multi touch glass with usb interface finally showed up. so i am proceeding with moving my a/c control head and center a/c vents down to where the screen is now. i am also installing windows 8.1 pro. never liked windows 8 before, but never had it on a touchscreen. i want to integrate at least basic a/c controls into the arduino mega eventually for my goals of automotive ai. ultimately, i envision the arduino never shutting off. and when battery voltage hits 11v or 11.2v have arduino start my car and run it for a time. and between 4:50-5:30p have it start the vehicle to bring down and maintain interior temps so its comfortable to get in when i get out of work. never having to worry about a dead battery again is a goal i will achieve early on. it will pretty much only require software once the remote start is setup.

  4. #14
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    335
    this is a sweet idea . if you succed on remote start, please post detail info on how you did it, cause i also want to do it on the future (i am planing to use it with mic shield, so that i can start the car via my cellphone)
    i will post you detailed codes, when i return home, in 5-6 hours or something!
    in order to control the arduino from pc, you will need to write a program on java, or c++. i did not had previous programing experiance, but Java is easy as spit. it has almost anything ready..
    the idea is that yout program will constantly send a serial of numbers "9,2,23,4,5...."(which represent what you want the arduino to do) to the arduino. then , on the arduino side, you know exactly the number of bytes you w8 to receive, and decode them accordingly

    The board i am finishing now, is controlling the power windows + Heat/AC. i also wanted to control the rear fog, and defrost, but i literally did not had enough space for the relays inside the board... :P it all depends on what your car has pre-installed. if all the "buttons" on your dash, where controlling relays, then even small relays can do. but in my case, all the switches (including pwoer windows), where the power controllers, so i had to use buff relays wich take up space... i will be installing the board on my car in 1-2 days

    As for AC control, it really depends on what you car has.... my car did not had AC at all, so i was free to build the whole system from the start with hobyist servos....
    the main idea, is that 1) you control 4-5 servos, (airflow, air-recyrculation, temperature actuator..). 2) you control the AC relay. 3) you set a PWM for the Blower. 4) you have a thermometer in the ac evaporator, so that you turn of the AC when evaporator is at 0celcius. 5)ofc implement anything else that your car supports, like cabin temp or AC low pressure leaks...



    As for the ECU. i have argued milllions of hours with the noobs down at the arduino forum, but the bare truth is that the atmega has MORE proccecing power than the first MOTOROLA chip used in the megasquirt. appart from the bare hardware part, which isnt easy (but i think i can make it), the hard part is writting the software, and tunning the engine... For that reason i am doing it step by step. like : first build and "eCU" That reads all the sensors of the car. then maybe make an ECU that just controlls the ignition sparks, and finally change from carbiratur to injection and control that as well

  5. #15
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    335
    btw, if you want to have a function delayed you could use something like that :

    unsigned long paused_time;

    void setup {
    ...
    }

    void loop {
    //do the things you wanna do.
    //when it comes the time you want to delay the function use something like : paused_time = millis();
    if ( (millis() - paused_time)>=2000 ) { //2 secs delay
    do the function
    }

    }

  6. #16
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    168
    right, but then the whole loop stops for that delay. so while waiting that 2 sec, if your power windows wont work, or whatever else you have going in that sketch. using a value and adding to it with if then type statements lets the loop continue to cycle while the number builds, and I get my delay, and everything else works during the delay. this is the loop for my autolamps I made:

    lightValue = analogRead(lightPin); // autolamp start
    if (lightValue >= 300) {
    timerValue = timerValue + 5;
    }
    if (lightValue <= 150) {
    timerValue = timerValue - 5;
    }
    if (timerValue >= 60) {
    digitalWrite(parkPin, LOW);
    }
    if (timerValue >= 99) {
    digitalWrite(headPin, LOW);
    timerValue = 99;
    }
    if (timerValue <= 20) {
    digitalWrite(headPin, HIGH);
    }
    if (timerValue <= 1) {
    digitalWrite(parkPin, HIGH);
    timerValue = 1;
    } // autolamp end

  7. #17
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    335
    i am pretty sure that it dosent stop the whole loop i have used it millions of times!! it just "Delays" to do, whatever is inside the "if" statment, for the given time !! but if the IF statment is false, then it continius with the rest of the loop!

  8. #18
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    168
    yes it most certainly does stop the loop for the length of the delay. or rather it delays or pauses the loop. which means for that length of time the loop is not cycling through to read inputs or change outputs. all that will resume after the delay. try it. wire a button to the arduino board, write a sketch with debounce to have button work led on board and just throw your delay in there. make it a 5 sec delay. then run the loop and watch the button not work the led. when we are having multiple systems run by the same sketch, having the loop stop cycling even briefly can only create problems. maybe for a small delay its no big deal, or for just a/c power windows, but while remote start is working arduino is to turn on ignition for 2 sec. for fuel pump prime, then crank until aem ems says the engine is running. during this 2 sec. delay, it would be nice to have arduino be able to react to other inputs, like a change in ignition switch state, or me pressing the remote start button again to cancel the command.

  9. #19
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    168
    here is the progress I have made on my screen relocation. to reach the a/c controls I had to fully extend my arm or lean forward. so I am mounting the screen out a few inches from the dash to make reaching the touchscreen easier. I am also mounting the screen at an angle that will not reflect sunlight. and maybe even recess it an inch into that housing I am building. to make this happen, I am using scrap plastic pieces I find or cut of of something else I own, a tub of duraglass, or bondoglass as the case may be. and some fast setting epoxy and some tape. I trim the plastic I am using so it somewhat fits, mockit it all up in my car to be certain I am happy with placement and attach with tape. then glue the pieces together and let dry while tape sets up, then lay on duraglass. it is a simple process that can be very gratifying if you are patient. there are a bunch of pics I posted in my build thread of the first bezel I made.
    Attached Images Attached Images  

  10. #20
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    335
    i cant understand why its not working for you... the "2 secs delay" is a comment, not to be used with the code>_> i know how important it is to not pause the loop. especially when you have 1-1 serial communication, you cant even tolorate for the loop to take too much to complete!! take a look here : http://arduino.cc/en/Tutorial/BlinkWithoutDelay !!

Page 2 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Arduino as a touchscreen controller. Is it possible?
    By HiJackZX1 in forum General Hardware Discussion
    Replies: 2
    Last Post: 11-23-2012, 01:20 AM
  2. Arduino BT CarPC power controller
    By d_mc_a in forum Hardware Development
    Replies: 4
    Last Post: 03-18-2009, 09:20 PM
  3. Mega Squirt ECU monitoring
    By kraft in forum Linux
    Replies: 0
    Last Post: 07-28-2007, 07:29 AM
  4. MSI Mega 180
    By tczbu in forum Power Supplies
    Replies: 6
    Last Post: 09-25-2006, 11:46 PM
  5. MSI Mega anyone?
    By kd6icz in forum General Hardware Discussion
    Replies: 0
    Last Post: 06-16-2004, 12:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •