5

My project is to control car windows using voice recognition. I have successfully controlled some LEDs using the EasyVR Arduino shield using and Arduino MEGA. Now I want to take control of the windows using the CAN-BUS arduino shield.

Because the car that I own doesn't have an OBD-II connector, I am using two Arduinos with two CAN-BUS Arduino shields making one a sender and the other a receiver. How can I program the CAN-BUS Arduino shield to make a simulation of the car's windows?

CAN-BUS shield that I am using: https://www.sparkfun.com/products/10039

Arduino Mega: https://www.sparkfun.com/products/11061

  • Are the Arduinos going to directly control the window motors or do you want to talk to the car's door module controller and command it (also, does your car have a CAN bus)? Do you just have 2 CAN shields so you can test talking to the door module...you need to clear that up. – Nick T Apr 9 '14 at 0:27
  • No my car doesn't have an OBD-ii module, and yes I have 2 CAN-BUS shields mounted on 2 ardnino boards (Arduino Mega). My problem now is how to programme the shields so that I can simulate the connection with the car's CAN-BUS. Thanks in advance – user3508331 Apr 9 '14 at 22:22
  • 1
    You would need to find the command specifications for a CAN-connected window controller, and implement something which matches. – Chris Stratton Apr 11 '14 at 17:48
  • Yes that is my problem, I can't find those commands for the CAN-BUS that will control the windows or the headlights. I am beginning to feel that there is nothing like that. – user3508331 Apr 11 '14 at 22:19
2

What model car do you have? Most cars do not have the ability to control power windows from the car computer. Late model cars will have the ability to control the window motors using bidirectional functions on a scan tool. On any car, the window motors have two wires, if one wire is given power and one ground it will spin if you switch the wire that gets power with the wire that gets ground it spin in the opposite direction. In my experience the way power windows work are both wires are ground while the switch is in the neutral position and by flipping the switch the switch will disconnect one of the grounds and replace it with a power. Find a wiring diagram for your car, and look at how the windows are controlled.

Get a 2 relay breakout board such as this one (make sure you check the current ratings): http://www.amazon.com/SainSmart-2-CH-2-Channel-Relay-Module/dp/B0057OC6D8/ref=sr_1_1?ie=UTF8&qid=1400730995&sr=8-1&keywords=arduino+relay+12v

Connect the ground wire to the normally closed (when no power is applied to the relay this is connected to the output wire) side of both relays and the 12v power to the normally open (when power is applied to the relay this is connected to the output wire)side of both relays.

In order to control the relay breakout board you choose one io pin per relay and set it as an output, then connect those pins to the corresponding pin on the breakout board. Set one of the pins to high (you apply power to one relay) the motor now has a power and a ground connection, set the opposite pin high to spin the other way.

I would place this in the driver side door underneath the window master switches because you can have access to every windows wires as they come out of the master switch.

Some late model cars will have a different set up than the one described, but the window motor will only have two wires (it is just a brushed DC motor) just find the window motor and hookup there.

I hope this helps.

  • So the motor is designed to be powered in blocked condition? (window fully opened/closed) I would expect there to be an over current protecting circuit to prevent overheating the coils. Could be built into the motor of course. – user2973 Oct 30 '14 at 6:44
  • Sorry my response took so long. Yes they have a circuit breaker. Here is a nice article detailing the various systems: auto.howstuffworks.com/power-window2.htm – Joel Nov 15 '14 at 0:14
-1

the central lock system will close the car doors and close the windows, i think you should build your system with the same idea, dealing with windows motors as normal motor without special commands for the window

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.