• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Arduino In vehicle mood lighting

Joined
May 27, 2008
Messages
3,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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
9,762 (1.91/day)
Location
Jakarta, Indonesia
System Name micropage7
Processor Intel Xeon X3470
Motherboard Gigabyte Technology Co. Ltd. P55A-UD3R (Socket 1156)
Cooling Enermax ETS-T40F
Memory Samsung 8.00GB Dual-Channel DDR3
Video Card(s) NVIDIA Quadro FX 1800
Storage V-GEN03AS18EU120GB, Seagate 2 x 1TB and Seagate 4TB
Display(s) Samsung 21 inch LCD Wide Screen
Case Icute Super 18
Audio Device(s) Auzentech X-Fi Forte
Power Supply Silverstone 600 Watt
Mouse Logitech G502
Keyboard Sades Excalibur + Taihao keycaps
Software Win 7 64-bit
Benchmark Scores Classified
interesting project
waiting the update :toast:
 
Joined
Dec 6, 2005
Messages
10,881 (1.63/day)
Location
Manchester, NH
System Name Senile
Processor I7-4790K@4.8 GHz 24/7
Motherboard MSI Z97-G45 Gaming
Cooling Be Quiet Pure Rock Air
Memory 16GB 4x4 G.Skill CAS9 2133 Sniper
Video Card(s) GIGABYTE Vega 64
Storage Samsung EVO 500GB / 8 Different WDs / QNAP TS-253 8GB NAS with 2x10Tb WD Blue
Display(s) 34" LG 34CB88-P 21:9 Curved UltraWide QHD (3440*1440) *FREE_SYNC*
Case Rosewill
Audio Device(s) Onboard + HD HDMI
Power Supply Corsair HX750
Mouse Logitech G5
Keyboard Corsair Strafe RGB & G610 Orion Red
Software Win 10
Me too... subscribed
 
Joined
May 27, 2008
Messages
3,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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 (1.83/day)
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
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
10,881 (1.63/day)
Location
Manchester, NH
System Name Senile
Processor I7-4790K@4.8 GHz 24/7
Motherboard MSI Z97-G45 Gaming
Cooling Be Quiet Pure Rock Air
Memory 16GB 4x4 G.Skill CAS9 2133 Sniper
Video Card(s) GIGABYTE Vega 64
Storage Samsung EVO 500GB / 8 Different WDs / QNAP TS-253 8GB NAS with 2x10Tb WD Blue
Display(s) 34" LG 34CB88-P 21:9 Curved UltraWide QHD (3440*1440) *FREE_SYNC*
Case Rosewill
Audio Device(s) Onboard + HD HDMI
Power Supply Corsair HX750
Mouse Logitech G5
Keyboard Corsair Strafe RGB & G610 Orion Red
Software Win 10
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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
13,147 (2.97/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
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
18,843 (3.08/day)
Location
UK\USA
Processor AMD 3900X \ AMD 7700X
Motherboard ASRock AM4 X570 Pro 4 \ ASUS X670Xe TUF
Cooling D15
Memory Patriot 2x16GB PVS432G320C6K \ G.Skill Flare X5 F5-6000J3238F 2x16GB
Video Card(s) eVga GTX1060 SSC \ XFX RX 6950XT RX-695XATBD9
Storage Sammy 860, MX500, Sabrent Rocket 4 Sammy Evo 980 \ 1xSabrent Rocket 4+, Sammy 2x990 Pro
Display(s) Samsung 1080P \ LG 43UN700
Case Fractal Design Pop Air 2x140mm fans from Torrent \ Fractal Design Torrent 2 SilverStone FHP141x2
Audio Device(s) Yamaha RX-V677 \ Yamaha CX-830+Yamaha MX-630 Infinity RS4000\Paradigm P Studio 20, Blue Yeti
Power Supply Seasonic Prime TX-750 \ Corsair RM1000X Shift
Mouse Steelseries Sensei wireless \ Steelseries Sensei wireless
Keyboard Logitech K120 \ Wooting Two HE
Benchmark Scores Meh benchmarks.
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD


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,518 (1.44/day)
Location
Kansas City
System Name The Dove Box Rev 3.0
Processor i7 8700k @ 4.7GHz
Motherboard Asus Maximus X APEX
Cooling Custom water loop
Memory 16GB 3600 MHz DDR4
Video Card(s) 2x MSI 780 Ti's in SLI
Storage 500GB Samsung 850 PCIe SSD, 4TB
Display(s) 27" Asus 144Hz
Case Enermax Fulmo GT
Audio Device(s) ON BOARD FTW
Power Supply Corsair 1200W
Keyboard Logitech G510
Software Win 10 64x
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,628 (0.63/day)
System Name Ultra 64
Processor NEC VR4300 (MIPS R4300i)
Motherboard proprietary design
Cooling Fanless aircooled
Memory 4.5MB 250 MHz RDRAM
Video Card(s) 62.5 MHz Reality Coprocessor
Storage 32 - 512 Mbit ROM Cartridge
Display(s) 720x576
Case Clear Blue Funtastic
Audio Device(s) 16-bit CD quality
Power Supply proprietary design
Mouse N64 mouse for use with N64DD
Keyboard N64 keyboard for use with N64DD
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:
Top