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 06-08-2014 12:49 PM

Got the Arduino Nanos on Friday. I ordered the nanos that don't have the on-board USB to serial to save space and complexity. The only problem is I can't for the life of me find my "ftdi friend" usb to TTL converter to program them. I just ordered a replacement, I'll update when it gets here and I can program the nano. It'll undoubtedly be at least a week for it to get here.

Pdwight 06-08-2014 12:56 PM

Could you give us a pinout (EBC) on the transistors...the voltage regulator is pretty self explanatory.

JayG 06-08-2014 02:47 PM

the transistor is acting like a switch and switching ground. It doesn't matter which way they are connected as long as the base is connected via the resistor to pin 2 or 3 as applicable. The middle pin is the base.

Polaris,

Can you email the actual Arduino sketch file? I would like to try what you got working before.

jb92563 06-11-2014 12:10 PM

JayG I took a look at the code and it seems fine and compiles, however I am using the Arduino v1.1 software on a Win7 PC.

With this and other projects I have worked on it seems that the newer versions of the Arduino software has more bugs.

Try Arduino version 1.1.x

Also, the transistor orientation is important since a transistor can act as a diode and only allow current to flow in 1 direction.
If the transistors are backwards you may only be able to raise , lower or do neither.

Does anyone see any benefit to making the Arduino boards any smaller?
If so I may try to implement this on a TI EZ430-F2012 which is smaller literally than your thumbnail.

JayG 06-11-2014 01:17 PM

Quote:

Originally Posted by jb92563 (Post 405222)
JayG I took a look at the code and it seems fine and compiles, however I am using the Arduino v1.1 software on a Win7 PC.

With this and other projects I have worked on it seems that the newer versions of the Arduino software has more bugs.

Try Arduino version 1.1.x

Also, the transistor orientation is important since a transistor can act as a diode and only allow current to flow in 1 direction.
If the transistors are backwards you may only be able to raise , lower or do neither.

Does anyone see any benefit to making the Arduino boards any smaller?
If so I may try to implement this on a TI EZ430-F2012 which is smaller literally than your thumbnail.

I can compile and load perfectly, its just it does not seem to work properly
Good catch on the transistor. Like I said, it been a very long time since I played around with electronic components

I don't see where I can download 1.1, but I have tried 1.5.6 and 1.0.5

Hopefully Polaris will be able to shed some light on this when he is able to try a NANO

jb92563 06-11-2014 07:56 PM

Give the Arduino 1.05 a try.http:// http://arduino.googlecode.com/files/arduino-1.0.5-r2-windows.exe

JayG 06-11-2014 08:22 PM

Quote:

Originally Posted by jb92563 (Post 405288)

That's what I have been using. I tried 1.5.6 today as well

The problem I have is not compiling or loading the code, its that it doesn't work properly

The top motor only runs as long as I have the switch pushed, just like stock. A momentary push does not keep the top moving

Polaris 06-12-2014 10:48 AM

Can you post a nice high res, close up picture of your arduino?

The code works, I've been using my setup for over a year and 2-8 times a day (when the weather is good) without a single issue.

Polaris 06-20-2014 09:18 AM

JayG, any update on getting a picture of your setup?

I'm still waiting on the usb to serial programmer to get here.

JayG 06-20-2014 09:34 PM

Quote:

Originally Posted by Polaris (Post 406575)
JayG, any update on getting a picture of your setup?

I'm still waiting on the usb to serial programmer to get here.

I'm traveling currently and will be back on Monday. I'll take some pics then

Leebherron 06-21-2014 07:32 PM

Polaris please send me a note if you can make me an auto-top . I would like to buy one from you. Thanks, Lee NY

JayG 06-26-2014 09:11 AM

OK, finally got a chance to take a few pics

Polaris,

A few questions

Have you been able to get a NANO to work ?
Do you have any special libraries loaded?
the reason I ask, is that you define some variables and I dont see them referenced anywhere in your posted code
#define openTime 15600;
#define closeTime 16400;

I have double and triple checked my wiring. I did make 1 modification, the pins used for the outputs so I could use the header cable I had. I changed the pins in the code as well

The header cables also make a great transistor socket

http://986forum.com/forums/uploads01...1403802505.jpg


http://986forum.com/forums/uploads01/top1403802542.jpg


http://986forum.com/forums/uploads01...1403802563.jpg

http://986forum.com/forums/uploads01...1403802590.jpg

Polaris 06-26-2014 03:52 PM

The MovementCount veritable should definitely be getting set to either openTime or closeTime depending on the button pressing. Maybe I posted the wrong version of the code....like a bone head. I'll have a look through my files when I get home from work.

JayG 06-26-2014 06:45 PM

Quote:

Originally Posted by Polaris (Post 407480)
The MovementCount veritable should definitely be getting set to either openTime or closeTime depending on the button pressing. Maybe I posted the wrong version of the code....like a bone head. I'll have a look through my files when I get home from work.

Thanks

I have brain farts all the time :confused:

Polaris 06-27-2014 07:26 AM

well craptastic. Looks like the final version got overwritten with the second to last version. I'll go over the code and figure it out and let you know.

On a side note, they are sending me "another" ftdi friend as it's now been 20 days since I ordered the previous one. Looks like USPS ate it.

JayG 06-27-2014 07:28 AM

Thanks, I appreciate it

Polaris 06-27-2014 07:47 AM

I'm pretty sure the last switch statement should just look like:

default: //no movement currently
if(openBtnCount > 0) {
openMode = 1;
movementCount = openTime;
digitalWrite(closeBtnOut, LOW);
digitalWrite(openBtnOut, HIGH);
} else if(closeBtnCount > 0) {
openMode = 2;
movementCount = closeTime;
digitalWrite(closeBtnOut, HIGH);
digitalWrite(openBtnOut, LOW);
} else {
allStop();
}

I'm also pretty sure the "movementCount -= loopInterval;" lines shouldn't be in the case 3 and case 4 and default switches. They are unnecessary in case 3 and 4, and constantly decremented when there is no motion in the default case.

JayG 06-27-2014 08:12 AM

Quote:

Originally Posted by Polaris (Post 407564)
I'm pretty sure the last switch statement should just look like:

default: //no movement currently
if(openBtnCount > 0) {
openMode = 1;
movementCount = openTime;
digitalWrite(closeBtnOut, LOW);
digitalWrite(openBtnOut, HIGH);
} else if(closeBtnCount > 0) {
openMode = 2;
movementCount = closeTime;
digitalWrite(closeBtnOut, HIGH);
digitalWrite(openBtnOut, LOW);
} else {
allStop();
}

I'm also pretty sure the "movementCount -= loopInterval;" lines shouldn't be in the case 3 and case 4 and default switches. They are unnecessary in case 3 and 4, and constantly decremented when there is no motion in the default case.

just tried those changes and the output still does not stay high except for the time when the switch is closed, in other words no auto operation.

I am using the onboard LED (pin 13) as the output for testing as it is easier than uploading the code and installing in the car to test

Polaris 06-27-2014 09:08 AM

do you still have your delay(50) removed?

Polaris 06-27-2014 09:09 AM

...and delay(50) should be delay(loopInterval)

JayG 06-27-2014 09:55 AM

Quote:

Originally Posted by Polaris (Post 407579)
...and delay(50) should be delay(loopInterval)

The delay is active

I did add the highlighted lines and it appears to now work.
I do have to install it and see for sure

switch(openMode) { ////0=no auto movement, 1=auto open, 2 = auto close, 3 = manual open, 4 = manual close
case 1: //currently auto-opening
digitalWrite(openBtnOut, HIGH);
movementCount -= loopInterval;

and

case 2: //currently auto-closing
digitalWrite(closeBtnOut, HIGH);
movementCount -= loopInterval;

with those 2 extra lines of code, it does auto open/close and a press of the opposite direction button will immediate stop and a press longer than shortPressInterval of the same direction button will stop it

Polaris 06-27-2014 10:43 AM

If you are going to write high there, you need to also write low to the other pin so you don't accidentally have both open and close high at the same time...that would be dangerous.

Polaris 06-27-2014 12:11 PM

Ooh! I just found my old Nano with onboard USB. I'll set it up and test the code and add support for the parking break pin, too.

I'm not seeing why you needed to add the lines to case 1 and case 2. The pins get written high in the default case before switching to case 1 or 2. Without the default case writing the pin high, the case 1 or case 2 won't be run until the second time around the loop, 50ms later since the default case is what sets the openMode to 1 or 2.

JayG 06-27-2014 12:32 PM

Quote:

Originally Posted by Polaris (Post 407597)
Ooh! I just found my old Nano with onboard USB. I'll set it up and test the code and add support for the parking break pin, too.

I'm not seeing why you needed to add the lines to case 1 and case 2. The pins get written high in the default case before switching to case 1 or 2. Without the default case writing the pin high, the case 1 or case 2 won't be run until the second time around the loop, 50ms later since the default case is what sets the openMode to 1 or 2.

I was just trying a few things. I am very new to programming these things, so it is highly likely unneeded code. Without the added lines it did not run in auto mode at all. The output was high only as long as the switch was closed. A short push did not enable auto mode.

In any case, I'll wait for you to test, especially with the e brake support

Thanks

Polaris 06-27-2014 03:18 PM

Success!!!

I found the correct final sketch, and I updated it to include a parking brake pin on pin 4.

I'm a little weary about the parking break pin simply because it doesn't require an extra lock-out on the parking brake so it'll operate when somebody presses the button at any speed...in other words, use it at your own risk.

I updated the link to the code in the original post. Also, a side note, the link goes directly to the .ino sketch, but since there is no defined MIME for that extension, it just shows it as text. You should be able to right click on the link to download the actual .ino file directly.

There's supposedly a speed control wire that goes to the stereo, so I may investigate using that to set up a high speed lockout.

Polaris 06-27-2014 04:21 PM

Of course, like clockwork, the FTDI Friend just showed up in the mail.

JayG 06-27-2014 04:34 PM

Quote:

Originally Posted by Polaris (Post 407627)
Success!!!

I found the correct final sketch, and I updated it to include a parking brake pin on pin 4.

I'm a little weary about the parking break pin simply because it doesn't require an extra lock-out on the parking brake so it'll operate when somebody presses the button at any speed...in other words, use it at your own risk.

I updated the link to the code in the original post. Also, a side note, the link goes directly to the .ino sketch, but since there is no defined MIME for that extension, it just shows it as text. You should be able to right click on the link to download the actual .ino file directly.

There's supposedly a speed control wire that goes to the stereo, so I may investigate using that to set up a high speed lockout.

You are a Gentleman and a Scholar
the new code works great! :dance:

THANK YOU!!

do you have instructions for connecting for the pbrake interlock?

speed control would be very cool

Polaris 06-27-2014 04:43 PM

pBreak should be the same circuit as the other output pins and should wire to the non-grounded side of the parking break switch....which will probably be a pain in the butt to get to.

I had a thought about the safety of the parking brake interlock, only make it activate when putting the top down, since you have the extra step of the top latch, but leave the close interlock as is so you have to click the parking brake handle one click manually. That way you don't accidentally close the top while driving down the highway.

JayG 06-27-2014 07:27 PM

just installed it in my car and it works perfectly

The new code Polaris posted is spot on!

I will look into connecting the p brake later, for now, 1 click is fine

Thanks again Polaris! :cheers:

BTW, it does not matter which way the transistors are wired as long as you get base correct as they are switching ground

jb92563 06-30-2014 11:59 AM

I just did a "Tortoise Diff" on the Old vs New code and there are lots of differences so don't even try to cut and paste the fixed sections in place in the old one base on the comments here as you WILL miss something.

Better you just redownload the code from the same Link and save the .ino file with date appended so you can get rid of the old incomplete one.

Just saying to help ensure everyones success.

Kudo's to Polaris for developing this and sharing freely with his fellow enthusiasts.

I'm waiting on the speed line upgrade and then I'll jump in as well.

That would be about number 4 on my list of todo's for the 986 :D

JayG 06-30-2014 02:29 PM

Quote:

Originally Posted by jb92563 (Post 408030)
I just did a "Tortoise Diff" on the Old vs New code and there are lots of differences so don't even try to cut and paste the fixed sections in place in the old one base on the comments here as you WILL miss something.

Better you just redownload the code from the same Link and save the .ino file with date appended so you can get rid of the old incomplete one.

Just saying to help ensure everyones success.

Kudo's to Polaris for developing this and sharing freely with his fellow enthusiasts.

I'm waiting on the speed line upgrade and then I'll jump in as well.

That would be about number 4 on my list of todo's for the 986 :D

Yes, I saw a bunch of differences as well. Polaris mentioned he muust have origionally uploaded one of the earlier code versions from development

As a FYI, if you are looking at the code and have opened teh link before, you should refresh the cache (scrfeen) as you may be looking at the old code\

in the beginning of the code:

#define openBtnOut 2
#define closeBtnOut 3
#define pBrakeOut 4
#define openBtnIn 8
#define closeBtnIn 9

IF pBrakeOut is not defined, it is the old code

JB, I am in N San Diego, so if you need some help, let me know

mavis.d 07-19-2014 02:20 AM

Having decided to have a go at this I have now got all the bits and down loaded the code to the board and about to start the wiring. I laid all components and wire out and planned when they would go, this is where the problems start. It could be me as never done this type of stuff before, but my board seems to be missing a GND and the + - below is a pic of the board. Any help really appreciated
Cheers
Davidhttp://986forum.com/forums/uploads01...1405764206.jpg

Smallblock454 07-19-2014 05:14 AM

Hi David,

take a closer look at the pin description. ;)

Arduino - ArduinoBoardNano

Maybe this will also help:
http://arduino.cc/de/uploads/Main/NanoFront.jpg

PIN 30 = + 6-20 volts
PIN 27 = + 5 volts
PIN GND = ground (2)

Regards
Markus

JayG 07-19-2014 05:50 AM

There is only one ground connection. You use it for all the grounds in the wiring

Mine works great and was really easy to install

mavis.d 07-22-2014 02:29 AM

Thanks for your help guys, all tested and working.

Special thanks to Polaris for sharing

[IMG]http://i898.photobucket.com/albums/a...fbb17ba8e1.jpg[/IMG]

mavis.d 07-22-2014 04:00 AM

Fitted and working, thanks JayG and Smallblock

Special thanks to Polaris for sharing in the 1st place

Jinster 10-05-2014 04:17 AM

I have just bought all the components needed for this project and I am about to dig out my trusty old soldering iron to get things started.

I was just wondering if anyone has thought of any other Boxster related projects that the Arduino could handle - seems a bit of a waste to let such a powerful computer to just do the top switch.

What about things like curtesy headlights (headlights stay on for say 20sec at night after switching off) or auto-closing windows on arming (I already have a module to handle that, but conceivably the Arduino could handle it instead). Can anyone think of other "comfort" features that we can put the Arduino to work for?

MitchSF 10-05-2014 04:19 AM

Yes! Three blink turn signals. Hardware and software should be very similar.

lbretth 04-13-2015 04:13 AM

Kudos Polaris. I just built this with an Arduino Nano and it works perfectly. I added some code into the sketch so the roof can be triggered via serial connection on the USB to my in-dash Nexus 7. Now I've just gotta get that working on the tablet. Unfortunately Lollipop has made this more difficult as SL4A doesn't work with it.

jb92563 04-14-2015 12:02 PM

Quote:

Originally Posted by Jinster (Post 420590)
I have just bought all the components needed for this project and I am about to dig out my trusty old soldering iron to get things started.

I was just wondering if anyone has thought of any other Boxster related projects that the Arduino could handle - seems a bit of a waste to let such a powerful computer to just do the top switch.

What about things like curtesy headlights (headlights stay on for say 20sec at night after switching off) or auto-closing windows on arming (I already have a module to handle that, but conceivably the Arduino could handle it instead). Can anyone think of other "comfort" features that we can put the Arduino to work for?

I actually used an EZ430 (thumbnail sized microprocessor) to illuminate the projectors "Dragon Eyes" breathing pattern red glow that I want activated when the security system is armed.

https://youtu.be/y07LMs5-zFA


We could add that to the Arduinos task list.


All times are GMT -8. The time now is 11:15 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