Pages: [1]   Go Down
Author Topic: motrcycle turn signal  (Read 931 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

was hoping to get some suggestions or help with my project...

I have an UNO, and need to *detect when the turn signal (and/or brakes) is activated/on.

Can I just take the cable from the turn signal light and use it as and input?
Do I need to add some sort of resistors etc.?

any help would be greatly appreciated!
Logged

Windy City
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Generally you will need to provide some sort of voltage divider for each signal you want to bring to the Arduino.  To determine the values of the resistors you'd first need to know the maximum voltage your bike's electrical system will get up to (but just a 10K trimpot would do).  What are you wanting to do with the Arduino?
Logged

Dirt Biker

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@DirtBiker - thanks for the response. I'm basically wanting to drive some led strips off/on.

so I can connect: brake light -> trimpot -> arduino input pin?

Will give it a shot tonight.   smiley-eek
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so I can connect: brake light -> trimpot -> arduino input pin?
Do you have a multimeter?  I'd "feel better" if you can measure the output of the trimpot before connecting the Arduino.

And with a pot, you'll need to measure the voltage (or resistance) to adjust it properly anyway.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@DVDdoug - never really used the multimeter (yes, I'm a noob). but I can try and check the readings and post and update.

I'm just looking to get a high or low signal from the input pin.

Here is a little preview of my project:
- volume warning
- armature brother videographer
https://vimeo.com/64999220

can i use this trimpot @ 0:56 of the video?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Multi meter is easy :> See the big "V"

Turn it to the "20"

lol Okay a pro should chime in here that's all i know :>
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After some *research I guess I need to...
- connect the  turn signal power cable to the the Red wire of the multimeter.
- Then connect the black wire of the turn signal to the Black wire of the multimeter.
- then turn multimeter to "Vdc" 20
- then initiate turn signal
- this should give the reading I need to proceed?


the manual for the motorcycle (actually, its a scooter  smiley-mr-green) reads:
Turn Signal Bulb 12v/10w
Brake Light Bulb 12v 21w/5w
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so I can connect: brake light -> trimpot -> arduino input pin?

I suggest that it would be better to use plain old resistors rather than a trimpot. A trimpot has an infinite number of wrong settings, and could easily be set wrong or disturbed by accident, and they're mechanical devices which aren't particularly robust. All you need is a pair of resistors in series, and you can easily calculate the ratio of resistances you need to produce your required output voltage range. I suggest you design for an input voltage of around 15V (to allow for the full range of voltages typically seen in car electrical systems) which conveniently means you just need to reduce the voltage by a factor of three - any three identical resistors in series will do that for you.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@PeterH - thanks for the info! I will give that a go. I've created a rough schematic. Is this how it should go?

Possibly with code similar to this:
Code:
int ledPin = 13; // LED connected to digital pin 13
int inPin = 7;  //or A0?  // brake light connected to input pin (digital or analog??)
int val = 0;    // variable to store the read value

void setup()
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin 13 as output
  pinMode(inPin, INPUT);      // sets the digital pin 7 as input
}

void loop()
{
  val = digitalRead(inPin);   // read the input pin
  digitalWrite(ledPin, val);    // sets the LED to the inPin value
}


* brake_test.jpg (702.14 KB, 2136x1416 - viewed 47 times.)
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please don't connect an LED directly between an I/O pin and ground without a current-limiting resistor - you risk damaging the LED and/or the I/O pin. In any case there is already an on-board LED connected to pin 13.

The resistors shown are not connected correctly. You need to have the three resistors connected in series (you have that part right). One end of this chain need to be connected to ground. The opposite end needs to be connected to your 12V signal. (This means the signal is grounded through your three resistors.) The Arduino's ground needs to be connected to the 12V ground, too, to complete the circuit.

With the connections described above, you now have two intermediate junctions between the three resistors. The one closest to ground will see one third of the 12V signal. This is the one you want to connect to the Arduino's input pin. Check the actual voltage here before you plug it in to the input pin since a mistake in the circuit could cause this to be above 5V in which case it would damage the Arduino.

Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@peterH - Thanks for the feedback!!

Here is an updated schematic... is there looking more correct?

I still haven't quite figured out how to check the signal/voltage coming from the brake light.


* brake_test_v2.jpg (707.56 KB, 2136x1335 - viewed 49 times.)
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

is there looking more correct?

No.

Connect the three resistors in series. This gives you two end points and two intermediate junctions.

Connect one end to Arduino ground, which should also be connected to vehicle ground.

Connect the other end to the 12V signal provided by your switch.

Connect the Arduino input to the intermediate junction which is closed to the ground end. Before making the connection, measure the voltage at this junction and confirm that it is 5V or less.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: