• We've upgraded our forums. Please post any issues/requests in this thread.

Arduino In vehicle mood lighting

Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#1
Since my University course has ended ive found my self with spare time :)

So i decided to stay on the programming bandwagon and start an Arduino based project. Love these little boards the things you can do with them are fantastic and for the price you can pick them up for everyone should have one.

Anyhoo the grand plan:

To create a system that performs ambiance lighting within a vehicle that reacts to the way said vehicle is driven. Current plans are for it to fade from what ever colour is selected to red depending on how hard the driver accelerates and when the vehicle is about to red line it will flash red at you reminding you it doesn't like it. Then with the use of an accelerometer hard cornering will cause the outside side of the car to fade to red. The sharper the corner the more red. I believe it will have to take into consideration the vehicles speed as well as the reading from the accelerometer so that it doesn't give false readings. Then there will be the joy of pots holes, speed bumps that could cause the results to be unexpected but ill worry about that when the accelerometer arrives. :)

Current progress so far is just bread boarded up. Because of the limited number of digital input and output pins ive employed the use of shift registers. As all im doing is basically routing a high or low signal to LED's there's no form of serial communication it'l be a good exercise to learn how to use shift registers. I could then expand that to hopefully run other devices such as TFT displays through a shift register as ive seen it done. Currently ive got one register in use and can control the PWM of each of the eight LED's connected to it individually.

I have an array of predefined RGB values for various colours which the user can select between and the Arduino will fade each LED colour up or down to the new colour creating a nice transition between the two. The colour selected is then stored in the Arduino's EEProm so that colour is automatically selected when it next powers up.

There's also a few functions which create some nice colour fades effects which the user can control the speed of the fades. Im thinking of implementing this to automatically be used when driving on motorways.

Currently the LED's draw power directly from the shift register so they are quite dim. Im awaiting some more registers to control more LED's and also some transistors. The plan it the sift register will control the transistor which will act like a switch between the LED's and the Arduino's power source giving me the LED's at full power.

Im really excited about this and even thought of what i could do next, creating a dock for my iPhone to interface with the stereo and give me steering wheel controls for it. Even better if i do get a TFT display working with shift registers to create a keypad entry entry system where the user has to enter a code before the vehicles ignition system is given power :) That could then be expanded even further with the use of a OBD-II shield to give each driver of the vehicle their own code. You could then log how well each driver is driving it, how sharp they corner, hard they accelerate and their MPG per trip. Great fun :)



I know how much you all like photo's with your logs but sadly thats it for now. When my new toys arrive ill get more and post a video of its functionality at the moment :)
 
Joined
Mar 26, 2010
Messages
7,642 (2.71/day)
Likes
1,984
Location
Jakarta, Indonesia
System Name micropage7
Processor Intel G4400
Motherboard MSI B150M Bazooka D3
Cooling Stock ( Lapped )
Memory 16 Gb Team Xtreem DDR3
Video Card(s) Nvidia GTX460
Storage Seagate 1 TB, 5oo Gb and SSD A-Data 128 Gb
Display(s) LG 19 inch LCD Wide Screen
Case HP dx6120 MT
Audio Device(s) Stock
Power Supply Be Quiet 600 Watt
Software Windows 7 64-bit
Benchmark Scores Classified
#2
interesting project
waiting the update :toast:
 
Joined
Dec 6, 2005
Messages
9,786 (2.23/day)
Likes
3,777
Location
Manchester, NH
System Name Working on it ;)
Processor I7-4790K
Motherboard MSI Z97
Cooling Be Quiet Pure Rock Air
Memory 16GB 4x4 G.Skill CAS9 2133 Sniper
Video Card(s) Intel IGP (Dedicated GPU TBD)
Storage WD 320 / 500KS / 500KS / 640KS / 640LS / 640LS / 640LS / 1TBFAEX and a NAS with 2x2Tb WD Black
Display(s) 24" DELL 2405FPW
Case Rosewill Challenger
Audio Device(s) Onboard + HD HDMI
Power Supply Corsair HX750 (love it)
Mouse Logitech G5
Software Win 7 Pro
#3
Me too... subscribed
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#4
Thank you very much :)



Not much of an update but new toy's arrived whilst i was at a job interview. Just waiting on the transistors and pcb boards before i can move onto the next step :)
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#5
Sadly no more updates just yet but how many cores does an Ethernet cable have and running 5v down them won't be an issue right?
 

t_ski

Former Staff
Joined
Apr 11, 2006
Messages
11,960 (2.81/day)
Likes
6,443
System Name My i7 Beast
Processor Intel Core i7 6800K
Motherboard Asus X99-A II
Cooling Nickel-plated EK Supremacy EVO, D5 with XSPC Bayres & BIX Quad Radiator
Memory 4 x 8GB EVGA SuperSC DDR4-3200
Video Card(s) EVGA 1080 SuperClocked
Storage Samsung 950 Pro 256GB m.2 SSD + 480GB Sandisk storage SSD
Display(s) Three Asus 24" VW246H LCD's
Case Silverstone TJ07
Audio Device(s) Onboard
Power Supply Corsair AX1200
Keyboard Corsair K95
Software Windows 10 x64 Pro
#6
Cores? You mean wires? There are four pairs of twisted cable, and depending on what kind of CAT you're using, there may be a shield in it as well. 5V probably won't be too bad on it, depending on what amps you're trying to draw through it.
 
Joined
Dec 6, 2005
Messages
9,786 (2.23/day)
Likes
3,777
Location
Manchester, NH
System Name Working on it ;)
Processor I7-4790K
Motherboard MSI Z97
Cooling Be Quiet Pure Rock Air
Memory 16GB 4x4 G.Skill CAS9 2133 Sniper
Video Card(s) Intel IGP (Dedicated GPU TBD)
Storage WD 320 / 500KS / 500KS / 640KS / 640LS / 640LS / 640LS / 1TBFAEX and a NAS with 2x2Tb WD Black
Display(s) 24" DELL 2405FPW
Case Rosewill Challenger
Audio Device(s) Onboard + HD HDMI
Power Supply Corsair HX750 (love it)
Mouse Logitech G5
Software Win 7 Pro
#7
depending on what amps you're trying to draw through it.
Exactly...

Look here: http://www.powerstream.com/Wire_Size.htm

3.5 A for "Chassis wiring"
0.577 A for "power transmision"

Load Carrying Capacities (see table below)
The following chart is a guideline of ampacity or copper wire current carrying capacity following the Handbook of Electronic Tables and Formulas for American Wire Gauge. As you might guess, the rated ampacities are just a rule of thumb. In careful engineering the voltage drop, insulation temperature limit, thickness, thermal conductivity, and air convection and temperature should all be taken into account. The Maximum Amps for Power Transmission uses the 700 circular mils per amp rule, which is very very conservative. The Maximum Amps for Chassis Wiring is also a conservative rating, but is meant for wiring in air, and not in a bundle. For short lengths of wire, such as is used in battery packs you should trade off the resistance and load with size, weight, and flexibility. NOTE: For installations that need to conform to the National Electrical Code, you must use their guidelines. Contact your local electrician to find out what is legal!
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#8
Well finished moving house, job interviews are over, i got the job by the way :) working for a company called Cascade creating payroll and HR software :) so i can continue with this little project :)

Well so far im about halfway through soldering various things onto PCB so i can make more room on my breadboard and work on other things.



Not much interesting really just using transistors to act as a switch so the LED's are not drawing power directly from the shift registers. Plus soldering them onto boards this size means bits can be upgraded and expanded easily rather then having to take apart one large PCB
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#9
Right so I spent all yesterday messing around soldering my shift registers onto the PCB's and these transistor boards so my LED's arn't drawing power straight from the registers only to realise ive made a very stupid mistake.

First ill show pictures.


Here's my shift register board, ignore the sellotape im waiting for my shrink wrap to arrive. Three registers with eight outputs each controllable independently.
The board to the left is the transistor board, where ive made a big mistake :(


My soldering. Not the best in the world ill admit but ive never soldered onto a PCB before and the tip on my soldering iron is the size of a small moon. There's no shorts however and everything is secure so it does the job.


And a quick test and it all work fantastic :)

Now the problem.

When i decided to use the transistors to seperate the power draw from the shift registers i didn't have my RGB led's so i set it up on the breadboard and tested on my single LED's at it all worked. I took photo's for reference and moved on to the next task. I since bought my RGB LED's then decided to solder up three of the above transistor boards, one for each colour. When to set them up and realised my mistake. The transistors work by switching the ground. My RGB LED's have a shared ground. :banghead:

As i don't know much about how the transistors work i liked them to a relay you get in cars and thought well if it passes the ground why can't they pass the live. So wired it and as you can guess it didn't work and made my shift register very toasty. So now i either have to by separate red, green and blue LED's which will make installing them in the car harder or sack off the money and time spent on the transistor boards and try to find a new approach. Not happy
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,398 (4.85/day)
Likes
5,477
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#10
You shouldn't solder imho until you have the circuit completely figured out. You should get an extra large breadboard for prototyping. Just my 2¢.
 

AsRock

TPU addict
Joined
Jun 23, 2007
Messages
15,309 (4.00/day)
Likes
4,717
Location
US
Processor 2500k \ 3770k
Motherboard ASRock Z68 \ Z77
Memory Samsung low profile 1600
Video Card(s) XFX 6770 \ XFX R9 290X
Storage Intel 80Gb (SATA2) WD 250Gb \ Team SSD+Samsung Evo 250Gb+500Gb+ 2xCorsair Force+WD250GbHDD
Display(s) Samsung 1080P \ Toshiba HDTV 1080P
Case HTPC400 \ Thermaltake Armor case ( original ), With Zalman fan controller ( wattage usage ).
Audio Device(s) Yamaha RX-V475 \ Marantz SR5008 Tannoy Mercury MKII Paradigm 5SE + Tannoy Mercury F4
Power Supply PC&Power 750w \ Seasonic 750w MKII
Mouse MS intelimouse \ Logitech G700s + Steelseries Sensei wireless
Keyboard Logitech K120 \ ROCCAT MK Pro ( modded amber leds )
Benchmark Scores Meh benchmarks.
#11
Not seen one of those boards since my training many many years ago. They look like they are made of plastic now ?.

You can get a wider beam of leds if you flatten the head of them too so if it's close to some thing the the light is more wide spread.
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#12
Not seen one of those boards since my training many many years ago. They look like they are made of plastic now ?.

You can get a wider beam of leds if you flatten the head of them too so if it's close to some thing the the light is more wide spread.
Do you mean the breadboard? Yes its plastic what were they made of?

And i know i probably should have developed everything before soldering but that's why its being developed modular.

I think ive found a solution. My led's are common cathode if i get a set of common anode ill be able to feed them a single separate live then switch each ground with the transistors right?

Everything else is working as it should, the board with the shift registers on works great with every pin being addressable and not interfering with each other. The transistor boards work great as well as long as their switching the ground. If the common anode LED's will work then that side of things is done. All the boards are soldered up. Now i can work on the input side of things with getting a reading on the cars rev's and look into using an accelerometer.
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#13


Well its all soldered up now, tested and working brilliantly when switching the ground. Need to wait on new RGB led's to get the actual effect.

Ill hook it all back up and post some pics/vids of it all working as i took it all apart to stick to the cardboard.

Soon ill have to think about some form of case :/
 
Joined
Dec 27, 2007
Messages
8,506 (2.34/day)
Likes
2,072
Location
Kansas City
System Name The Dove Box Rev 2.0
Processor I7 5930k
Motherboard Asus X99
Cooling Custom water loop
Memory 4 x 4GB 3000 MHz DDR4
Video Card(s) 2x MSI 780 Ti's in SLI
Storage 500GB Samsung 850 PCIe SSD, 2x1TB WD Blacks, 1.2TB NAS
Display(s) 27" Asus 144Hz
Case Enermax Fulmo GT
Audio Device(s) ON BOARD FTW
Power Supply Thermaltake Toughpower 850W
Keyboard Logitech G510
Software Win 10 64x
#14
Hi! Nice project :D

Just curious though why you're using shift registers to power your LED's. I would suggest a very simple LED driver, heres a good start:

http://people.eecs.ku.edu/~callen/501/Driving_your_LED.pdf

I made the LED driver circuit my Senior Year:



Note the LED is on the left, with the transistor(metal tin can looking thing) next to it.

We used a Bias voltage of 10 volts though from a source, your Arduino only has a 5V supply at 1A(I think) so you're LED driving resistors will change significantly.

Also, why are you using the Digital IO for the LEDs? I would think for the mood lighting effect you could use the Analog and just script some output voltage to drive your LED driver into different ranges(aka vary the brightness).
 
Joined
May 27, 2008
Messages
3,577 (1.03/day)
Likes
533
Location
Huddersfield, uk
Processor E8200
Motherboard Asus P5KC
Cooling cooler master hyper tx3, 2x 120mm, 1x 80mm
Memory 4 GB DDR3 OCZ Black Edition
Video Card(s) Gigabyte HD 2600xt silent pipe II
Storage 500GB WD Sata / 60 GB Samsung IDE
Display(s) 20" samusng LCD, gaming at 1680 x 1050
Case some old amd thing
Audio Device(s) onboard
Power Supply 650W
Software Windows 8.1, with 'start is back' obviously
Benchmark Scores It boots whilst im still young so im pleased with that.
#15
Hi! Nice project :D

Just curious though why you're using shift registers to power your LED's. I would suggest a very simple LED driver, heres a good start:

http://people.eecs.ku.edu/~callen/501/Driving_your_LED.pdf

I made the LED driver circuit my Senior Year:

https://lh6.googleusercontent.com/-...I/AAAAAAAAAVc/ahDPlo52gDs/w816-h488-no/11+-+1

Note the LED is on the left, with the transistor(metal tin can looking thing) next to it.

We used a Bias voltage of 10 volts though from a source, your Arduino only has a 5V supply at 1A(I think) so you're LED driving resistors will change significantly.

Also, why are you using the Digital IO for the LEDs? I would think for the mood lighting effect you could use the Analog and just script some output voltage to drive your LED driver into different ranges(aka vary the brightness).
Ha thanks :) Your boards look much neater than mine.

Im using shift registers because i needed more outputs than the arduino has. From three digital outputs on the arduino i think i can link around 70 registers with eight outputs each (i intend to do more then the mood lighting).

Also this is the first thing ive done with the arduino, besides knight rider lights. When i Googled how to get more outputs this was the first thing that looked like it would do the job, haven't seen anything about LED drivers until you mentioned it now actually :p

Also im using a library called Shift PWM its quite compact and allows me to simulate using the PWM outputs on any output of the shift registers. Each output of each register can be addressed independently so i can do colour fades with my RGB LED's. Also i can make one LED dimer or brighter then the other, so they can be adjusted in-car in case one is more dazzling then the others.

EDIT:

Just had a look through that link and OHHHH MYYYY GOD my brain seriously hurts.

Whilst browsing google to find a funny picture to try and show maths killing my brain i stumbled across this and it made me laugh.

 
Last edited: