FROM Ford EATC TO my MATC (Vehicle project)

Before I present my project. I want to ask that no one diss/hate/flame on my project or me, I've had plenty of that already.

The HVAC controls in my 2000 Ford Taurus, Electronic Automatic Thermal Controls, were KIA, and have now Been replaced by Manual Arduino Thermal Controls.

Code: http://hevymetal87.pastebin.com/dKs8vKhp

Pics: http://picasaweb.google.com/114351322941159318025/CID#

Video during Installation: SANY0292.AVI - YouTube

Video after Installation: SANY0300.AVI - YouTube

Hack-a-day: Arduino Based EATC Replacement | Hackaday

Ford Taurus Forum: Taurus Car Club of America : Ford Taurus Forum

Happy to answer any questions, and I have one of my own, Could I do all of this with a duemillanove?

Thanks to this forum, the adafruit forum, the sparkfun and arduino IRC channels and the taurus forum for all of the help with R&D and being patient with me for the most part... Dan

You might be able to do this with a Duemilanove as long as you don't need more pins than are available on it. Your pics are pretty blurry, so I could not make out exactly who much IO you were using.

Pretty cool you were able to bring your climate control back to life! I did notice you mentioned it was automatic before and manual now. What's up with that? You have the power of Arduino in your favor. Make the new system automatic too! :slight_smile:

It wouldn't be very difficult, really. All you need are some temperature sensors and some more code to manipulate fan speed, blend door, etc , maybe an LCD screen to show you what's going on.

Nice work!

I have wanted to make them automatic, LCD & joystick, but where I am stuck is the menu on the LCD. I have a serial VFD, I know how to interface it, I have a ps2 joystick with some custom code I wrote so that it functions only as a D-Pad, so, I'll rebuild this sucker on a custom PCB, but I need someone to help me code the menu.

UP & DOWN select categories:
Temperature (button enters submenu ())
Vents (
)
RECIRC / OUTSIDE ()
Blower (
)
Windows(**)
Status (Temp, Vents, Blower speed, Time)
LEFT & RIGHT change the item, button commits and returns to main menu
Temperature 60-90
Vents PANEL, FLOOR, FLOOR & DEFROST, DEFROST
RECIRC/OUTSIDE
Blower 0-100
Windows
Front
Left
Right
Up
Down
Rear
Left
Right
Up
Down

If someone could code the menu, and just put (do stuff here) under each heading as a comment, I can do the rest.

The joystick maps analog read
x 1,2,3 (left, center, right)
y 20,21,22 (down, center, up)
and multiplies the values for D-Pad positions
Left 21
Center 42
Right 63
Up 44
Down 40

All of the rest of the control statements in the code would just be moved, save the addition of code for an RTC, and relays for the windows and the thermistor. So, anyone wanna help with the menu? Thanks, Dan

Well, I can help you learn to fish... :wink:

It looks like you have some things to separate out:
Temperature control
Windows
Vent preferences (foot, face, glass and fresh/recirc)

I'd suggest putting together separate menus (or sections of one menu) for each of those. For the most part, menus are just a lot of copy, paste and modify once you wrap your head around the structure. Think of it as a tree or hierarchy and it should come together for you.

First, make a diagram of how you want the menu to work. Lets say there are categories, options and values. Categories are your top level. Within each category there are options, and each option has changeable values. I would use nested switch/case control structures http://arduino.cc/en/Reference/SwitchCase. Use one switch/case statement to handle your categories. Within each category, use another switch/case to handle the options. Values will be set in whatever way makes sense for that option.

The switch/case statements need variables to handle the user's place in the menu.

For example: The default is category=0 (window controls) when the user moves the joystick to the right, category=1 (vent prefs), over to the right again, category=2 (temp adjust) and once more brings it back to category=0. Press a button to select the displayed category. This will be the main switch/case structure.

When category=0, the default window=1 (left) move the joy to the right and windows=2 press the button to select the right window, then U/D to roll the window up or down (I probably wouldn't put the windows in the menu. It could make for a dangerous situation while driving. But it's good practice for making menus.) This would be one nested switch/case structure.

When category=2, the default vent=0 (face), move the joy to the right and vent=1 (foot), and so on. Again, push a button to select it and use the joy to adjust its value. This will be another nested switch/case structure.

After you get one chunk of the menu structure built, you can most likely copy and paste it for the next category and then modify it a little for that category.

Each time an input is detected, update the LCD with the new value. So as you are scrolling through the categories, the LCD will show "Windows", then "Vents", then "Adj Temp" and so on. If you have two lines, you can show the category and the current option in that category. When you select a category, the LCD can be updated to show the option and the value of that option.

But before you start any coding, you need to draw up your menu on paper so you have an idea of how you want it to work.

Also, don't forget details like a timeout on the input - the menu reverts to its home/default state if you don't do anything for 10 seconds or so.

And one last point, you may find a flow chart to be a great help (see: http://www.chesterfamily.org/pictures?g2_itemId=10096 and http://www.chesterfamily.org/pictures?g2_itemId=10100) It doesn't have to be anything fancy, just a diagram of how you want things to move around in the code.

Good luck, and have fun!

Ok, the post above is the menu structure, switch case is what I was thinking... So, I'll get to work on it. The LCD is actually a VFD, 2X20.