slide out display motor and power controller.

my intention is to use my Volvo s60? display pod, that slides out of the dashboard. since I don´t have the OEM navigation control unit itself, only sliding out display ( it would?t work in my area anyways), I want to install some regular Garmin GPS navigation device inside that pod.

short (not really) description what my system has to do: 1. no power in system without ignition. 2.with ignition on, when pressing the button on the dash, arduino comes alive, RGB led should be red. As soon as possible, arduino has to switch on the navigation power supply and after a short interval, it should switch on the GPS device ( using optocoupler, providing the signal for required ammount of time) . now it takes about 30 seconds to boot the GPS device. there should be some time delay, before arduino starts the DC motor with correct polarity to slide out the display. after extracting fully, another optocoupler switches on the display optocoupler. (don´t know yet, if I use the end switches or arduino to control this feature) after screen extraction, the RGB LED should go green. 3. a 1 second press on the dashboard button should trigger hiding mode: monitor should switch off the backlight and display moves inside the dash. same applies, when turning off the ignition. RGB LED should be red when in hiding mode. ( at this point, also a timer should start, for let? say, after 15 minutes, arduino applies the signal to power optocoupler, commanding the GPS to shut down. after some time delay, whole system shuts down. 4. when in hiding mode, and button is pressed, display should come out again, and re-connect backlight. 5. in any time, when pressing the button longer than 3 seconds, the system shutdown sequence should start. 6. when in hiding mode, it also should "wake up" when I switch on a reverse gear. ( can´t use the same input, because if the gear is engaged for longer than 3 seconds, system would shut down).

well, I have done many simple electronic projects, and some more difficult, using schematics, but I have never had to program an arduino (or anything else) as for the code, I can sort of understand some of it ( a little more, when there are explanations included in the code) but to be honest, this project is too difficult for me. to put it in numbers, my competent level for this project is let? say: mechanical: 100% electronic: 75% software: 10%

so, guys, and why not girls, I need some assistance with it.

right now, the only existing component is Arduino UNO. at the end, I will most likely make a dedicated PCB for this entire system. most likely many components will be SMD. In the beginning of the next week, I should recieve the GPS unit and my car? OEM display pod. GPS will loose it? outer shell, and display pod? electronics will be ripped out. some time in the coming week, I should also get the dashboard button. it need? to be hacked, because really it is not only a button, but it has a whole chunk of electronics inside. ( normally, adding the button will reprogram the car? internal computer, and depending on the button, a specific extra feature will be activated. in this case, I don´t want that, so I need to remove the electronics, leaving just the 12 pin connector, because that is, what? holding the button in place.

all general suggestions and ideas are welcome. for the electronical part, I can give more information in a few days, when I get the hardware, in the software compartment, I don´t even know where to begin :astonished:

now sorry about my bad English and for that long text You had to read. I tried, but could?t make it shorter. :roll_eyes:

I don´t even know where to begin

You have already begun by documenting steps 1-6.

You need to convert those steps into a block diagram at a high level, showing the switch, the Arduino, the LED, the GPS, the tray, etc. Then, using the draft block diagram, draw a UML state diagram (it will be easy):

The kind of program you want to write is called "event programming" and you need to use the Arduino blink without delay example programs to blink a LED various rates without using the ugly delay() command! Then, when you understand this, edit the program to blink a tri-color LED such that Red, Blue, and Green are all indepently timed and that changing any color does NOT change the other two.

You're almost there. Read up on how to implement a motor controller with forward and reverse and with limit switches or travel limit optical sensors. Add in a relay driver or two or three! You should be in a position now to write the bulk of the software and integrate it together in that loop() of the program such that the state machine implements your system specifications.

If/when you come back for assistance, all of the materials will make answering specific concerns easier for the forum. Plan on giving yourself 3 or 4 weekends to play and research to become comfortable with the Arduino and the various peripheral sensors and controlled devices. Do not push yourself into frustration, but do work the tutorials and learn the concepts.


Thank? for the reply.

I´m Just in the middle of drawing the UML state diagram.

at one point I started to think about something I never thought before: do I have enough pins? Arduino Uno should have 14 Digital pins + 6 analog. it? going to be tight with only digital pins being used, specially, because I want to leave at least 2 pins free for future upgrades ( like taking a reading from the GPS backlight power supply, to determine, if the GPS is switched on, or not.) ( by simply putting an optoisolator? internal LED parallel to display? backlight power supply)

to reduce used digital pins, I have 2 ideas: motor limit switches could be connected as analog input. both switches should have diferent resistors. for example: lower limit switch will have 2k resistor and upper one, say, 5k resistor. it should be possible, but will it be more difficult to program? is there any down sides for this approach?

the other idea: most motor controllers use 3 pins for communication: "ENABLE" , "DIRECTION A" and "DIRECTION B" it should be possible to only use 2 pins: "ENABLE" and "DIRECTION" but I could?t find any schematics for this, exept someone did it with a relay and 2 transistors. ( since there are already enough relays in this project, I would like to avoid adding another )

tomorrow I should finally recieve some components, so I can measure the motor? current, for example. I believe it won´t go over 1A, but You never know before measuring.

Sounds like the paper exercise has awaken a few neurons. Fantastic. No one likes the paperwork, but it makes for less problems in the future.