Not joined yet? Register for free and enjoy features such as alerts, private messaging and viewing latest posts and topics.
Tablet install to replace sat nav (Build thread)
-
- Member
- Posts: 313
- Joined: Thu Mar 06, 2014 1:31 am
Re: Tablet install to replace sat nav (Build thread)
Mine is the OEM satnav so it doesn't have lcd screen on the HU. After the conversion I may switch to opt for a Business HU so that I can see what radio station I'm listening to
What kind of equipment other than the boards do I need? It is a simple USB--TTL cable for the programming? Edit: looks like it comes with everything needed. $25 for the board and $23 for motorshield.. sounds reasonable. Need to look more into it though, I don't want to take on a project I can't finish. So after programming the board, its a matter of wiring and soldering everything together? How difficult was the process?
Found some rather cheaper versions on ebay.. any caveat against them?
So far I would need to buy these two pieces correct?
http://www.ebay.com/itm/New-L298P-Shiel ... 3ce393b355
http://www.ebay.com/itm/New-UNO-R3-Rev3 ... 2a3f82f44d
Looks like they stack on one another. Would need a wiring diagram though.. I feel so lost
Final edit: Did more reading on your thread, danmiddle2, thanks for laying it out so clearly in your tutorial! I had always skimmed through that part thinking I wouldn't do it for my own build, so I never thoroughly read it. Looks doable at this point.. will definitely fit it now as long as I can figure it out completely.
sk93, you said you figured out a smooth step right? do you have the sketch for it?
What kind of equipment other than the boards do I need? It is a simple USB--TTL cable for the programming? Edit: looks like it comes with everything needed. $25 for the board and $23 for motorshield.. sounds reasonable. Need to look more into it though, I don't want to take on a project I can't finish. So after programming the board, its a matter of wiring and soldering everything together? How difficult was the process?
Found some rather cheaper versions on ebay.. any caveat against them?
So far I would need to buy these two pieces correct?
http://www.ebay.com/itm/New-L298P-Shiel ... 3ce393b355
http://www.ebay.com/itm/New-UNO-R3-Rev3 ... 2a3f82f44d
Looks like they stack on one another. Would need a wiring diagram though.. I feel so lost
Final edit: Did more reading on your thread, danmiddle2, thanks for laying it out so clearly in your tutorial! I had always skimmed through that part thinking I wouldn't do it for my own build, so I never thoroughly read it. Looks doable at this point.. will definitely fit it now as long as I can figure it out completely.
sk93, you said you figured out a smooth step right? do you have the sketch for it?
YouTube channel with car vlogs in my zed!
Please subscribe and share my videos with fellow enthusiasts!
Please subscribe and share my videos with fellow enthusiasts!
- danmiddle2
- Member
- Posts: 880
- Joined: Mon Apr 01, 2013 10:01 am
Re: Tablet install to replace sat nav (Build thread)
Just an A to B USB cable will do for programming the Arduino, and yes it is a very simple soldering job.igeak691 wrote:Mine is the OEM satnav so it doesn't have lcd screen on the HU. After the conversion I may switch to opt for a Business HU so that I can see what radio station I'm listening to
What kind of equipment other than the boards do I need? It is a simple USB--TTL cable for the programming? Edit: looks like it comes with everything needed. $25 for the board and $23 for motorshield.. sounds reasonable. Need to look more into it though, I don't want to take on a project I can't finish. So after programming the board, its a matter of wiring and soldering everything together? How difficult was the process?
Found some rather cheaper versions on ebay.. any caveat against them?
So far I would need to buy these two pieces correct?
http://www.ebay.com/itm/New-L298P-Shiel ... 3ce393b355
http://www.ebay.com/itm/New-UNO-R3-Rev3 ... 2a3f82f44d
Looks like they stack on one another. Would need a wiring diagram though.. I feel so lost
Final edit: Did more reading on your thread, danmiddle2, thanks for laying it out so clearly in your tutorial! I had always skimmed through that part thinking I wouldn't do it for my own build, so I never thoroughly read it. Looks doable at this point.. will definitely fit it now as long as I can figure it out completely.
sk93, you said you figured out a smooth step right? do you have the sketch for it?
Personally I would steer clear of the Arduino clone boards as I have read about people having varying degrees of success depending on origin.
The original board and motor shield that I went with simply stack together, so it's nice and simple - and it's not like they're expensive.
You're welcome for the thread - but just to re-assure you, it's really not all that complicated. The hard part was figuring everything out, like the pin-outs of the motor and getting some code to move it... everything else is just fine tuning It is definitely possible to get the motor movements to be as smooth as the original. Mine is already smoother than shown in the video - I just didn't realise what the OE one behaved like until recently. Sounds like SK93 has it covered though.
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
mines this smooth:
- danmiddle2
- Member
- Posts: 880
- Joined: Mon Apr 01, 2013 10:01 am
Re: Tablet install to replace sat nav (Build thread)
Perfect - now all we need is a copy of the sketchsk93 wrote:mines this smooth:
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
first thing I'll do when I get back home tonightdanmiddle2 wrote:Perfect - now all we need is a copy of the sketchsk93 wrote:mines this smooth:
- McKoval
- Member
- Posts: 479
- Joined: Thu Mar 31, 2011 10:58 am
- Location: Krakow
Re: Tablet install to replace sat nav (Build thread)
Ok, few more questions:
- are you able to mix HU sound with tablet sound on car speakers? Meaning, is it possible to listen to radio and have the gps volume over the car speakers?
- are you able to switch music tracks on the tbl using steering controls?
- is it possible to connect usb drive to the tablet and play mp3s from it? Of not, then how do you want to transfer music to the tablet?
-last, but not least.. as I am really a noob in electronics, provided that I would have a CID and a tablet, would someone be willing to do the conversion for me (not for free of course) or shall I just start to look for some crazy electronic expert here in Poland?
TapaTalking
- are you able to mix HU sound with tablet sound on car speakers? Meaning, is it possible to listen to radio and have the gps volume over the car speakers?
- are you able to switch music tracks on the tbl using steering controls?
- is it possible to connect usb drive to the tablet and play mp3s from it? Of not, then how do you want to transfer music to the tablet?
-last, but not least.. as I am really a noob in electronics, provided that I would have a CID and a tablet, would someone be willing to do the conversion for me (not for free of course) or shall I just start to look for some crazy electronic expert here in Poland?
TapaTalking
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
- no
- yes
- not sure.. I use the wifi to sync music to the sd card in the tablet when the car is at home (or on a wifi network elsewhere)
- yes.. I was actually considering offering this as a service during my lunch today
- yes
- not sure.. I use the wifi to sync music to the sd card in the tablet when the car is at home (or on a wifi network elsewhere)
- yes.. I was actually considering offering this as a service during my lunch today
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
working sketch:
I've a few bugs to fix on the auto open/close on power part.. so once i've nailed that (probably saturday), I'll share that here too
Code: Select all
#define OPEN_BUTTON 6
#define CLOSE_BUTTON 7
#define STEP_OPEN 2
#define STEP_CLOSE 4
void setup()
{
//establish switch pins
pinMode(OPEN_BUTTON, INPUT_PULLUP);
pinMode(CLOSE_BUTTON, INPUT_PULLUP);
pinMode(STEP_OPEN, INPUT_PULLUP);
pinMode(STEP_CLOSE, INPUT_PULLUP);
//establish motor direction toggle pins
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
//establish motor brake pins
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
}
void loop(void)
{
int switchValue;
switchValue = digitalRead(OPEN_BUTTON);
if (switchValue==LOW)
{
//screenUp();
sk93_screenUp();
}
switchValue = digitalRead(CLOSE_BUTTON);
if (switchValue==LOW)
{
sk93_screenDown();
}
switchValue = digitalRead(STEP_OPEN);
if (switchValue==LOW)
{
stepOpen();
}
switchValue = digitalRead(STEP_CLOSE);
if (switchValue==LOW)
{
stepClose();
}
}
void sk93_screenUp(void)
{
for (int i=0; i < 14; i++)
{
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, HIGH); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(25);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, LOW); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(25);
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, LOW); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(25);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, HIGH); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(25);
}
//set all pins off after operation
digitalWrite(8, LOW); //DISABLE CH B
digitalWrite(12, LOW); //DISABLE CH B
digitalWrite(9, LOW); //DISABLE CH B
digitalWrite(13, LOW); //DISABLE CH B
analogWrite(3,0);
analogWrite(11,0);
}
void sk93_screenDown(void)
{
for (int i=0; i < 14; i++)
{
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, HIGH); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(25);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, HIGH); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(25);
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, LOW); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(25);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, LOW); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(25);
}
//set all pins off after operation
digitalWrite(8, LOW); //DISABLE CH B
digitalWrite(12, LOW); //DISABLE CH B
digitalWrite(9, LOW); //DISABLE CH B
digitalWrite(13, LOW); //DISABLE CH B
analogWrite(3,0);
analogWrite(11,0);
}
void stepOpen(void)
{
if (digitalRead(STEP_OPEN)==LOW)
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, HIGH); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(1000);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, LOW); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(1000);
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, LOW); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(1000);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, HIGH); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(1000);
}
void stepClose(void)
{
if (digitalRead(STEP_CLOSE)==LOW)
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, HIGH); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(1000);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, HIGH); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(1000);
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, LOW); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(1000);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, LOW); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(1000);
}
I've a few bugs to fix on the auto open/close on power part.. so once i've nailed that (probably saturday), I'll share that here too
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
note: it's important to turn off the motor pins after use.. else you'll get a very, very warm motor (and possibly burn it out!)
-
- Member
- Posts: 313
- Joined: Thu Mar 06, 2014 1:31 am
Re: Tablet install to replace sat nav (Build thread)
Would it be possible to use one of the pinouts directly connected to antenna wire of radio, as to avoid needing a relay?
edit: at least for my purpose where I am giving the tablet power 24/7. i understand a relay would be needed if you only want to power the tablet when the radio is on.. for me, I'd want the radio turning on to flip up the screen and the radio turning off to flip down the screen.
I just thoroughly read through the sketch, and its not too hard to understand. did some elementary coding when I used to work with robotics.. for the step close and step open, do the motor brake pins also have to be turned off?
with your code, what happens if you hold the step open or close? does it continually move or does it have to be repressed each time you want it to step?
edit: at least for my purpose where I am giving the tablet power 24/7. i understand a relay would be needed if you only want to power the tablet when the radio is on.. for me, I'd want the radio turning on to flip up the screen and the radio turning off to flip down the screen.
I just thoroughly read through the sketch, and its not too hard to understand. did some elementary coding when I used to work with robotics.. for the step close and step open, do the motor brake pins also have to be turned off?
with your code, what happens if you hold the step open or close? does it continually move or does it have to be repressed each time you want it to step?
Last edited by igeak691 on Thu Jul 03, 2014 5:27 pm, edited 2 times in total.
YouTube channel with car vlogs in my zed!
Please subscribe and share my videos with fellow enthusiasts!
Please subscribe and share my videos with fellow enthusiasts!
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
nope.. the board pins only work at 5v.. hence the need for the relay.
- danmiddle2
- Member
- Posts: 880
- Joined: Mon Apr 01, 2013 10:01 am
Re: Tablet install to replace sat nav (Build thread)
Perfect, thank-you!sk93 wrote:working sketch:
Code: Select all
#define OPEN_BUTTON 6 #define CLOSE_BUTTON 7 #define STEP_OPEN 2 #define STEP_CLOSE 4 void setup() { //establish switch pins pinMode(OPEN_BUTTON, INPUT_PULLUP); pinMode(CLOSE_BUTTON, INPUT_PULLUP); pinMode(STEP_OPEN, INPUT_PULLUP); pinMode(STEP_CLOSE, INPUT_PULLUP); //establish motor direction toggle pins pinMode(12, OUTPUT); pinMode(13, OUTPUT); //establish motor brake pins pinMode(9, OUTPUT); pinMode(8, OUTPUT); } void loop(void) { int switchValue; switchValue = digitalRead(OPEN_BUTTON); if (switchValue==LOW) { //screenUp(); sk93_screenUp(); } switchValue = digitalRead(CLOSE_BUTTON); if (switchValue==LOW) { sk93_screenDown(); } switchValue = digitalRead(STEP_OPEN); if (switchValue==LOW) { stepOpen(); } switchValue = digitalRead(STEP_CLOSE); if (switchValue==LOW) { stepClose(); } } void sk93_screenUp(void) { for (int i=0; i < 14; i++) { digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, HIGH); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(25); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, LOW); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(25); digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, LOW); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(25); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, HIGH); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(25); } //set all pins off after operation digitalWrite(8, LOW); //DISABLE CH B digitalWrite(12, LOW); //DISABLE CH B digitalWrite(9, LOW); //DISABLE CH B digitalWrite(13, LOW); //DISABLE CH B analogWrite(3,0); analogWrite(11,0); } void sk93_screenDown(void) { for (int i=0; i < 14; i++) { digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, HIGH); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(25); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, HIGH); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(25); digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, LOW); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(25); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, LOW); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(25); } //set all pins off after operation digitalWrite(8, LOW); //DISABLE CH B digitalWrite(12, LOW); //DISABLE CH B digitalWrite(9, LOW); //DISABLE CH B digitalWrite(13, LOW); //DISABLE CH B analogWrite(3,0); analogWrite(11,0); } void stepOpen(void) { if (digitalRead(STEP_OPEN)==LOW) digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, HIGH); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(1000); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, LOW); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(1000); digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, LOW); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(1000); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, HIGH); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(1000); } void stepClose(void) { if (digitalRead(STEP_CLOSE)==LOW) digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, HIGH); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(1000); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, HIGH); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(1000); digitalWrite(9, LOW); //ENABLE CH A digitalWrite(8, HIGH); //DISABLE CH B digitalWrite(12, LOW); //Sets direction of CH A analogWrite(3, 255); //Moves CH A delay(1000); digitalWrite(9, HIGH); //DISABLE CH A digitalWrite(8, LOW); //ENABLE CH B digitalWrite(13, LOW); //Sets direction of CH B analogWrite(11, 255); //Moves CH B delay(1000); }
I've a few bugs to fix on the auto open/close on power part.. so once i've nailed that (probably saturday), I'll share that here too
-
- Member
- Posts: 313
- Joined: Thu Mar 06, 2014 1:31 am
Re: Tablet install to replace sat nav (Build thread)
So the relay would be triggered by 12v antenna signal but close a circuit that runs on 5v. Would it be easier to use a voltage step down module to achieve the same purpose? Either way, doesn't seem too complicated. Looking forward to the sketch that includes provisions for power.
Edit: the delay of 25ms seems to be the only difference between your two sketches.. are you guys going to try even lower for a smoother action?
Edit: the delay of 25ms seems to be the only difference between your two sketches.. are you guys going to try even lower for a smoother action?
YouTube channel with car vlogs in my zed!
Please subscribe and share my videos with fellow enthusiasts!
Please subscribe and share my videos with fellow enthusiasts!
- sk93
- Lifer
- Posts: 3970
- Joined: Mon Oct 19, 2009 9:20 pm
- Location: Nottingham
- Contact:
Re: Tablet install to replace sat nav (Build thread)
igeak691 wrote:So the relay would be triggered by 12v antenna signal but close a circuit that runs on 5v. Would it be easier to use a voltage step down module to achieve the same purpose? Either way, doesn't seem too complicated. Looking forward to the sketch that includes provisions for power.
Edit: the delay of 25ms seems to be the only difference between your two sketches.. are you guys going to try even lower for a smoother action?
you're correct about the 5v circuit, but you'd take the +5v from arduino, as it has a steady +5v pin specifically for that - no need for a stepdown.
you'd really need to be careful with any other external powersupply into the arduino, as they're only rated for a very minute amperage.
In regards to the differences - they look similar on the surface, but mine includes the required loop to get it to open and close fully (with the correct number of steps ), it also turns off the motor after the procedure has been run.
two small, but very important changes
I did try and lower it below 25ms, but I was getting issues with the motor keeping up - it would occasionally miss a step or seamingly go the wrong way.
25ms turned out to be the optimum for speed/smoothness vs reliability
-
- Member
- Posts: 313
- Joined: Thu Mar 06, 2014 1:31 am
Re: Tablet install to replace sat nav (Build thread)
As I look more into it the step down is a really bad idea especially for automotive use where the power fluctuates so much. Any normally open relay circuit triggered by 12v should work right? Seemed like it was more complicated while reading with zener diodes and octocouplers
Can I see what you've got going with the sketch and also what bugs you still have to work out for it? Want to see how code is different for something with constant power vs a button press.
Can I see what you've got going with the sketch and also what bugs you still have to work out for it? Want to see how code is different for something with constant power vs a button press.
YouTube channel with car vlogs in my zed!
Please subscribe and share my videos with fellow enthusiasts!
Please subscribe and share my videos with fellow enthusiasts!