986 Forum - The Community for Porsche Boxster & Cayman Owners

986 Forum - The Community for Porsche Boxster & Cayman Owners (http://986forum.com/forums/)
-   DIY Project Guides (http://986forum.com/forums/diy-project-guides/)
-   -   AutoTop DIY (http://986forum.com/forums/diy-project-guides/51822-autotop-diy.html)

Polaris 04-23-2014 03:39 PM

AutoTop DIY
 
I've been using my home-brew Arduino based AutoTop for the last year without any problems or magic smoke, so I think it's time to post a DIY guide for everybody:

There are a few options for automatic top openers/closers, but they range from $100 to over $200. I like to tinker, so I had an extra Arduino knock-off and parts laying around, so I thought I'd give making my own a go. The parts total should come out to $15 or so if you purchase an Arduino Nano clone on eBay for around $5 (inc. shipping) and the rest of the parts from somewhere like Mouser.com. I used an extra standard sized Arduino Uno clone I had laying around.

The functionality of this matches the way the windows work: Quick press open to auto-open, quick press close to auto close, long press open to manually open for the length of the press (for engine access), and long press close to manually close for the length of the press. Also, for emergency purposes, a quick press of either open or close while the top is auto opening or closing will cancel the auto open or close process.

Parts List:
-Two BC547B Transistors click here
-One 78L05 Voltage Regulator click here
-Two 10K resistors (.5 watt should do)
-Two 1K resistors (.5 watt should do as well) (I think that was the value I used, I'll have to double check)
-5 male automotive crimp-on connectors
-5 female automotive crimp-on connectors
-1 splice connector

Schematic:
http://www.alexroy.net/boxster/AutoTop/Schematic.png

Arduino Code:
Click Here

Notes:
You'll need to wire up the Arduino as noted in the Schematic. Each connection to the harness and the switch terminate in male crimp-on connectors (for the harness side) and female crimp-on connectors (for the switch side). Three wires from the harness side and three wires from the switch side connect to the Arduino. The remaining two wires that go from the harness to the switch are just jumpers to allow the night time illumination to continue to work.

I labeled the "Open" and "Close" connectors on the harness and switch sides so they are easy to differentiate if I need to disconnect it at any time.

I ran the power lead to the switched power on the car stereo harness. I would suspect that it would probably be OK to have the Arduino powered all the time from the constant +12v on the harness, but I wanted to be sure I didn't drain the battery when the car was off, and I have an aftermarket stereo, so my power lead is actually soldered into my stereo's Porsche to Pioneer harness adapter.

I covered all exposed wires in shrink tubing, including the transistor leads. I also sheathed the entire Arduino in a thick plastic bag.

The code's open or close length is configurable by constant variables. You can edit the time used based on how long your top actually takes to open or close. I add a couple seconds to both open and close times so the top is sure to fully open or close.

I also did the "bend pin 18" trick on the top relay so I can activate the top while in motion with the parking brake on one click.

http://www.alexroy.net/boxster/AutoTop/AutoTop1.jpg

http://www.alexroy.net/boxster/AutoTop/AutoTop2.jpg

http://www.alexroy.net/boxster/AutoTop/AutoTop3.jpg

http://www.alexroy.net/boxster/AutoTop/AutoTop4.jpg

mikehkang 04-23-2014 07:30 PM

I just found my next project.

Thanks!

particlewave 04-23-2014 07:37 PM

Very nice work!

Nine8Six 04-23-2014 10:25 PM

Whoaa, dude, you even freely published the code for us to dwload. Top man

Just need to find a project box and voila. impressive

I'm a huge fan of Arduino. Been using some of it for the last 5 years to prototype a few things that eventually went to larger microchips. They are very handy and quick... so cheap as well!

Nicely done and thanks for sharing. Respect

Nine8Six 04-24-2014 09:01 AM

Bump.

nobody else?

BrokenLinkage 04-24-2014 09:50 AM

This is a pretty sweet write-up of a really useful mod. Appreciate your sharing it. Too bad I already went with one of the commercial units for this.:rolleyes:

What would be a real boon to those of us living in the Florida to Texas swath of the country, would be something to help us leave our windows cracked open during the hot-as-three-hells summer, but that would roll them up during the frequent surprise rain showers. It seems that an arduino based (or other) controller that could be linked to the auto rain sensor, with maybe a switch or automatic timer (to avoid inadvertantly depleting the battery) would work. I just don't have the electronic smarts to make this happen. It might need to interface with the alarm also, if there are voltage or current sensors. Anyone up for the challenge? I would pay for this solution, and feel others would also. For six months out of the year, it is a dilemma as to whether to risk rain on the leather seats, or to bake them at 180°F, or take the time to conspicuously put a goofy partial cover over the car.:confused:

Shehadehd 04-24-2014 10:03 AM

Quote:

Originally Posted by particlewave (Post 397301)
Very nice work!


+1!

Nice job!

jb92563 04-26-2014 09:40 PM

Nice work.

I wonder if I could impliment that on a TI EZ430-f2012, to be thumbnail size.

Pdwight 05-02-2014 07:11 PM

WHat is involved in programming the Arduino module ?

Thanks
Dwight

dghii 05-02-2014 07:31 PM

This is a great DYI! very cool idea.

Jinster 05-03-2014 05:38 PM

Very impressive, Polaris. And thank you for the write-up.

I have a question. If you long-press to open/close the top half way, what happens when you then do a short-press to auto open/close? Will it know when to stop?

Thanks.

jb92563 05-03-2014 08:09 PM

Quote:

Originally Posted by Pdwight (Post 398587)
WHat is involved in programming the Arduino module ?

Thanks
Dwight

Although I have not built Polaris's project I do program various arduino boards and can tell you what you need to do.

If the arduino board you decide to use does not have the USB adapter built in, then you need an FTDI card that connects between your computer and the arduino. ~$15.

1) download the arduino IDE softwars onto your computer. Free
2) create a new project and copy paste the supplied code into it
3) Select the arduino board type in the software and compile/load the software onto the arduino.

Thats it.....easy peasey!

Wire it up and test it. You can reload and modify to yours hearts content.

The arduino is probably $15 each from a US source plus I think you will need one ftdi board which will work on most arduinos with or without the onboard usb .

if anyone needs help I can assist. I think I'd like to make one as well.

Nine8Six 05-04-2014 02:06 AM

I think this project is cool

It just shows what can be done with a $15 Arduino applied to car.

One project I've seen; a Japanese car with fully prototyped coilovers & controlled by Arduino. Two independent stepper motors per coilover, a set of both bevel and worm gear box, cardan joints and shafts. Its working and incredible (and heavy lol). Dynamic tuning while driving/racing with pressure sensors, and he has the ability to select a static ride height and preload pre-set for any given road trip.

DIY active suspension powered by Arduino

Pdwight 05-06-2014 11:07 AM

Quote:

Originally Posted by jb92563 (Post 398728)
Although I have not built Polaris's project I do program various arduino boards and can tell you what you need to do.

If the arduino board you decide to use does not have the USB adapter built in, then you need an FTDI card that connects between your computer and the arduino. ~$15.

1) download the arduino IDE softwars onto your computer. Free
2) create a new project and copy paste the supplied code into it
3) Select the arduino board type in the software and compile/load the software onto the arduino.

Thats it.....easy peasey!

Wire it up and test it. You can reload and modify to yours hearts content.

The arduino is probably $15 each from a US source plus I think you will need one ftdi board which will work on most arduinos with or without the onboard usb .

if anyone needs help I can assist. I think I'd like to make one as well.

I ordered a couple of boards (in case I fry one), they have the USB connector on them. Now to get the other semiconductors...Im excited about this project

Polaris 05-06-2014 12:40 PM

I've had a couple PMs about built-up kits. I'd be willing to do $50 shipped in the US for built up Auto-Tops using the Arduino Nano (the tiny version of the Arduino).

Jinster, the pseudo button press is just extra long. The switches in the top mechanism automatically stop the process when they are at the close or open position. They correspond with the light being on or off on the dashboard. It's the same as if you kept holding onto the open/close button after the top was finished.

jb92563 05-06-2014 08:43 PM

Thats the beauty of your arduino solution, you are merely simulating someone holding their finger on the switch electronically and so all the regular built in functionality and safety is still in effect unaltered.

You will still need the parking brake engaged a click for the roof to open/close.

It would be nice to interface that brake switch as well with the arduino, so you dont have to have the parking brake on.

I guess the arduino would simulate an active parking break signal to the relay.

epapp 05-07-2014 09:14 AM

You would have to ground the pin inside the relay, but then you almost have what shehadehd has ;)

JayG 05-23-2014 08:42 PM

Just ordered all the parts today. Should have everything by the end of next week and I'll build/install over next weekend

Arduino Nano clone from ebay $9
Rest of parts from DigKey $13

This will be my first Adruino project of what I expect to be several more.
Thanks Polaris, you instructions are great and thanks for the code.

Ill post how it goes after the install

Pdwight 05-23-2014 11:37 PM

My parts came in....but
 
I cannot get the software to recognise the Arduino module ??? I actually ordered several and they all came with USB cables....but the program does not see the module ??

Anyone help here ??

THanks
Dwight

Nine8Six 05-24-2014 01:16 PM

Quote:

Originally Posted by Pdwight (Post 401873)
I cannot get the software to recognise the Arduino module ??? I actually ordered several and they all came with USB cables....but the program does not see the module ??

Anyone help here ??

THanks
Dwight

Dwight, few things you want to chk

1. make sure your usb cable is functioning correctly, test with another device

2. com ports in the app menu can be changed. try a few

3. If above didn't do it, some drivers may be required for your version of windows. Do a search on your windows ver + arduino board/model + drivers. Make sure they show up in your Windows Device manager and all that.

4. If none of the above works, try on another computer mate (before returning those arduinos to the original seller)

JayG 06-01-2014 05:40 PM

Quote:

Originally Posted by JayG (Post 401855)
Just ordered all the parts today. Should have everything by the end of next week and I'll build/install over next weekend

Arduino Nano clone from ebay $9
Rest of parts from DigKey $13

This will be my first Adruino project of what I expect to be several more.
Thanks Polaris, you instructions are great and thanks for the code.

Ill post how it goes after the install

Ok, I got it all wired and connected to the switch and harness
unfortunately it does not work. I get a clicking sound from both the relay and somewhere in the top. If I hold the switch, it clicks and the top moves in a very slow stepping manner

I did a minor change to the design, I used pins D7&8 instead of 8&9. I did change the definitions to reflect that.

I am not a programmer and this is the first time I have used an Arduino

any ideas?

Shehadehd 06-01-2014 05:49 PM

AutoTop DIY
 
Quote:

Originally Posted by JayG (Post 403370)
Ok, I got it all wired and connected to the switch and harness

unfortunately it does not work. I get a clicking sound from both the relay and somewhere in the top. If I hold the switch, it clicks and the top moves in a very slow stepping manner



I did a minor change to the design, I used pins D7&8 instead of 8&9. I did change the definitions to reflect that.



I am not a programmer and this is the first time I have used an Arduino



any ideas?


As a first attempt, check your wiring, specifically the 10k pulldown resistors on pin 7,8 be sure they're there and the connection is secure.

If you soldered the everything, sometimes a solder joint can look good but internally it's actually not making a good connection. By moving the wires during operation, you will see a change in operation if you have a bad connection.

JayG 06-01-2014 06:17 PM

Quote:

Originally Posted by Shehadehd (Post 403372)
As a first attempt, check your wiring, specifically the 10k pulldown resistors on pin 7,8 be sure they're there and the connection is secure.

If you soldered the everything, sometimes a solder joint can look good but internally it's actually not making a good connection. By moving the wires during operation, you will see a change in operation if you have a bad connection.

thanks for the fast reply

I should preface that that I have done a lot of soldering, I used to build and repair pro audio gear and soldered about a million XLR and multipin connectors.
In any case, I checked the pull down resistors, good connections
I tried the wiggle on all connections with no luck

In order to get any movement, I have to hold the button and instead of smooth operation, it is clicks and steps as it moves

Could it be a bad board?

Shehadehd 06-01-2014 06:26 PM

Quote:

Originally Posted by JayG (Post 403378)
thanks for the fast reply

I should preface that that I have done a lot of soldering, I used to build and repair pro audio gear and soldered about a million XLR and multipin connectors.
In any case, I checked the pull down resistors, good connections
I tried the wiggle on all connections with no luck

In order to get any movement, I have to hold the button and instead of smooth operation, it is clicks and steps as it moves

Could it be a bad board?

More likely bad pins than a bad board. You can always try four different pins and see what happens. If both opening and closing the top acts the same, then maybe the transistors aren't working properly. Make sure you didn't wire them backwards... you might also want to check to see if the 1k resistor to the transistor is an acceptable value for the transistors you're using.

JayG 06-01-2014 06:31 PM

Quote:

Originally Posted by Shehadehd (Post 403380)
More likely bad pins than a bad board. You can always try four different pins and see what happens. If both opening and closing the top acts the same, then maybe the transistors aren't working properly. Make sure you didn't wire them backwards... you might also want to check to see if the 1k resistor to the transistor is an acceptable value for the transistors you're using.

I used the exact transistor you spec'd and 1k resistor as you listed. In reviewing your parts list,you did mention that you thought it was a 1 k resistor. I have no idea how to check what value the transistor needs
I double checked the transistor wiring and it is correct

The clicking is both on open and close

Shehadehd 06-01-2014 06:38 PM

Quote:

Originally Posted by JayG (Post 403382)
I used the exact transistor you spec'd and 1k resistor as you listed. In reviewing your parts list,you did mention that you thought it was a 1 k resistor. I have no idea how to check what value the transistor needs
I double checked the transistor wiring and it is correct

The clicking is both on open and close


Haha, I didn't write the thread. I can look through the transistor to see if it'll theoretically work but the OP got it working in his so it's probably fine. It looks like he gave a top down view of the transistor in the wiring diagram so be sure that you have the left most pin ( if you're holding the transistor with the curved side towards you) wired to the switch harness.

JayG 06-01-2014 06:43 PM

Quote:

Originally Posted by Shehadehd (Post 403383)
Haha, I didn't write the thread. I can look through the transistor to see if it'll theoretically work but the OP got it working in his so it's probably fine. It looks like he gave a top down view of the transistor in the wiring diagram so be sure that you have the left most pin ( if you're holding the transistor with the curved side towards you) wired to the switch harness.

From what I can tell, it is wired correctly

Shehadehd 06-01-2014 06:49 PM

Quote:

Originally Posted by JayG (Post 403384)
From what I can tell, it is wired correctly

hmm... give me a minute to take a look at the transistor. Is it possible to take a picture of your set-up? Also, is the relay that's clicking the one that's by the foot pedals?

Pdwight 06-01-2014 06:52 PM

Transistor
 
It is simply a electronic switch, the 1K resistor is a current limiting device to protect the transistors from drawing too much current. It would help if the writer listed the EBC codes on the drawing. I will try to open this up a bit. The 1K resistors go to the Base of the transistor, it looks like the Emitter is grounded and the Collector supplies switched power to the harness. The Arduino can only handle a few milliamps of current so the transistors are used like electronic relays to trip the regular relay in the car.

JayG 06-01-2014 06:54 PM

Quote:

Originally Posted by Shehadehd (Post 403385)
hmm... give me a minute to take a look at the transistor. Is it possible to take a picture of your set-up? Also, is the relay that's clicking the one that's by the foot pedals?

the relay clicking is the C top relay
I think it is the motors in the actual top I hear clicking

I can take a pic, but I don't know how much use it would be. I used a header connector with attached wires and soldered and heat shrunk all the connections

Pdwight 06-01-2014 06:59 PM

E and C reversed
 
I bet you have the Emitter and the Collector reversed on the transistors, the Base is almost always in the middle

JayG 06-01-2014 07:10 PM

Quote:

Originally Posted by Pdwight (Post 403388)
I bet you have the Emitter and the Collector reversed on the transistors, the Base is almost always in the middle

I have already tried reversing the transistors.

Quote:

Originally Posted by Pdwight (Post 403386)
It is simply a electronic switch, the 1K resistor is a current limiting device to protect the transistors from drawing too much current. It would help if the writer listed the EBC codes on the drawing. I will try to open this up a bit. The 1K resistors go to the Base of the transistor, it looks like the Emitter is grounded and the Collector supplies switched power to the harness. The Arduino can only handle a few milliamps of current so the transistors are used like electronic relays to trip the regular relay in the car.


I did verify the pin out with the data sheet of the part
With the part I have the collector is grounded and emitter goes to harness
Is that wrong?

Shehadehd 06-01-2014 07:24 PM

Quote:

Originally Posted by Pdwight (Post 403386)
It is simply a electronic switch, the 1K resistor is a current limiting device to protect the transistors from drawing too much current. It would help if the writer listed the EBC codes on the drawing. I will try to open this up a bit. The 1K resistors go to the Base of the transistor, it looks like the Emitter is grounded and the Collector supplies switched power to the harness. The Arduino can only handle a few milliamps of current so the transistors are used like electronic relays to trip the regular relay in the car.

I just wanted to make sure that the Base voltage was okay to put the transistor into a saturated state and that the resistor wasn't too small and causing the output pins on the board to overdrive or not providing enough base current for the collector current needed.

Pdwight 06-01-2014 07:26 PM

Vom
 
Take a meter and see if the transistors switch ....

Pdwight 06-01-2014 07:31 PM

good thread
 
I was going to build one of these, have a box of parts right here but cannot get the code to load in my module...any of them ?? Im using Nano modules BTW

JayG 06-01-2014 07:39 PM

Quote:

Originally Posted by Pdwight (Post 403394)
Take a meter and see if the transistors switch ....

Quote:

Originally Posted by Shehadehd (Post 403393)
I just wanted to make sure that the Base voltage was okay to put the transistor into a saturated state and that the resistor wasn't too small and causing the output pins on the board to overdrive or not providing enough base current for the collector current needed.

you guys are great and thanks for your help

I'm gonna breadboard it this week and see if it is switching correctly

I'll post an update once I have a chance to test it

I put everything back to stock for now and at least the top still works correctly :D

At least I now have a switched 12v line in the upper console. I connected it from the unused phone connector in the bottom of the console

thanks again

JayG 06-01-2014 07:42 PM

Quote:

Originally Posted by Pdwight (Post 403397)
I was going to build one of these, have a box of parts right here but cannot get the code to load in my module...any of them ?? Im using Nano modules BTW

I am using a NANO as well. I can load the code , no problem (at least I think it is being loaded. The app says the upload was sucessfull.

I have an Idea..... maybe I can load the code and you build them ???
:matchup:

Pdwight 06-01-2014 08:10 PM

I get this error
 
Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Nano, ATmega328"

sketch_jun01a.ino: In function 'void loop()':
sketch_jun01a:37: error: a function-definition is not allowed here before '{' token
sketch_jun01a:47: error: a function-definition is not allowed here before '{' token
sketch_jun01a:143: error: expected `}' at end of input

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

JayG 06-02-2014 10:28 AM

Did some more testing this morning

When I meter the output pins (D2 & D3) I do get ~2.5v when I close the switch. The problem is it does not stay latched, in other words it is high only while I close the switch. It doesnort matter how long I keep teh switch closed, as short as momentary or longer. the same result.

Now that is on a meter and one of the problem was that the top relay chattered and the top "stepped" as it was moving.

I am wondering if my board is bad, or the other case is an error in the code

Polaris 06-05-2014 07:23 AM

JayG,

I have a couple nanos on the way. I should hopefully have them by tomorrow (crossing my fingers for today). I'll build one up over the weekend and see how it goes and if I run into anything similar to you.


All times are GMT -8. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website