Acura World banner

Sunroof AUTO switch

5K views 33 replies 14 participants last post by  daverman 
Hey this is an interesting mod. This should be a very simple and affordable mod... I'm thinking under $40 for all the parts.

The design I saw at a-tl has one serious problem: once the sunroof is in motion, there's no way to stop it! Woe betide the guy who gets his finger in the way. He'll get his little pinkie crushed for sure. Also, there's no way to open the sunroof halfway. It's either fully closed or fully open.

The correct way to do this mod is to somewhat emulate the driver's side window behavior but with a modification: pushing any button during motion will stop the motion.

Do I hear "PIC microcontroller and cheap parts"? :D (BIG GRIN).

I really need to go out and get the Helms manual for the TL. The wiring diagrams are a must.

Hmm. Let's see, per-piece cost:
  • PIC microcontroller with 6 I/O pins ($5)
  • 3 High-current FETs to sink motor current ($6)
  • Voltage regulator ($5)
  • Handful of resistors ($2)
  • Printed circuit board and casing ($5)
  • Fuse, wires and miscellany ($5)
Total: $28

Development cost:
  • Serial port programming station ($250)
  • Pizza, beer and community recognition for developer (priceless)
 
How many people want this mod? If there's enough demand for me to recoup my investment in the programming station and Helms manuals (and some money for my labor) I'll gladly do it for you guys.
 
I'm thinking that this mod can easily be extended to control other relay switches, such as full auto on all windows, and automatic opening of all windows and sunroof from the remote key fob, without having to invest in a whole new alarm system.

I'm thinking...
  • Tap on a window/sunroof switch = auto open/close.
  • Hold the button down = manual open/close. (Just like a CD player's FF and REW buttons -- tap = next track, hold = FF)
  • Push the Door Open button on key fob four times in five seconds = open all windows and sunroof.

The remote windows-down function depends (of course) on whether or not I can rig the windows to be on all the time, and not just when car is on.

The software can be quite complicated, with lots of conditions that must be handled, and safeties that must be taken care of. We also need to use Industrial grade parts for temperature tolerance. No problem! :D
 
OK, let me do a little research on the PIC chips. And I wouldn't mind taking a Helms manual off of someone's hands either :D
 
Re: Re: wow

Throtex said:
If he goes the embedded systems route, he's going to need to produce enough of them to recup the costs I'd imagine.
Yup.

Fortunately PIC chips aren't that expensive, and neither are the rest of the components. I just have to do research and put in labor.
 
Yeh, I guess Bebber's design would do fine for most folks... I still think that a microcontroller can do a whole lot more for not much.

Oh well, whatever. Maybe one of these days I'll feel an itch to do a microcontroller mod to my own car. :D
 
Hey Austin :D Hee beat ya to it... I can't afford an RGB switch and an extra puter in the car so I'll have to go the cheap route.

I'm thinking of forgoing the relays altogether in favor of using a microcontroller. PIC microcontrollers are so cheap (<$10 in general) that they'll easily cost less than a bank of relays and timers.

What I need to do (if I do want to do this any time soon) is to buy a Helms manual for its wiring diagrams. I suspect I can find a PIC chip with sufficient lamp driver pins to sink the current needed to activate the built-in relays. This will further cut down on the cost of the circuit.

Anyway, my wheels have been whirring about this project for the past few days. Here are the software items that need to be written for this project:

  • Switch debouncing
  • Timer tick generator (prob. using the microcontroller's internal timer interrupt)
  • A state machine for each motor/motor pair
  • Very importantly--safety features, including a watchdog to catch errant state machines, built-in assertions, and a guard to limit the number of seconds that a motor can be continuously active.

The fun thing is, once the framework is written, it can be reused to create any event-driven control circuit. Autolocking doors (VSS input, door lock output), all windows open via key fob (door unlock input, windows output), etc.
 
Throtex said:
Are you saying you'll need this to detect the start/stop tap, so that the initial tap doesn't trigger both the start and stop conditions? If so, your debouncing routine is just going to be a simple delay.
Umm, not exactly. The problem is that there isn't a switch in the world that doesn't bounce when you activate them, i.e. the switch toggles quickly and repeatedly between its on and off state for a few milliseconds before it settles. A debounce algorithm will read the switch multiple times and will only report activity if the switch has remained in the same state for some length of time (typically 50ms).
 
Throtex said:
Whenever I debounce I only read once, pause (50 ms sounds good) then read again... not a bunch of times, but ok :D
That's what I do too... :D
 
OK, I'm going to take this project to the Audio/Video forum.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top