SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
766 stars 96 forks source link

[Question] Relays controlled by Arduino #315

Closed baumwolle01 closed 5 years ago

baumwolle01 commented 5 years ago

I would like to config single LED´s with the Arduino... Will it be possible? Sorry for my Bad English.

SHWotever commented 5 years ago

Hi, Sadly single leds are not extensible enough, on a single arduino you would be able to run a maximum of 5 leds (by keeping a 50% power safety) which is clearly not scalable to something interresting. On the opposite way, ws2812b or PL9823 can be expanded to any number of leds wihout having any powering issues or risks.

You can read the excellent article about arduino power risks, the chapter number 10 covers this led risk : https://www.rugged-circuits.com/10-ways-to-destroy-an-arduino/

baumwolle01 commented 5 years ago

or is it Possible to run 5V Relays? For Example: When the Door in Omsi2 open, then the Door Switch Light should shine or something else

SHWotever commented 5 years ago

It is possible yes by using the custom protocol : https://github.com/zegreatclan/SimHub/wiki/Custom-Arduino-hardware-support

baumwolle01 commented 5 years ago

I can´t write the Code because i can´t Programming in the Arduino IDE

youssefaly97 commented 3 years ago

I think you should add single LEDs, they shouldn't be hard to add in software and the hardware you'd just need a proper voltage regulator with driver chips for the LEDs, just like you added a gear indicator with a 74HC595. It just doesn't make sense to add a 74HC595 that drives 7 LEDs in a 7-segment then say only 5 LEDs can be added for power safety that's ofcourse unless you mean the power limitation of the Atmega package itself. A 74HC595 is not meant to drive LEDs but it does cause 5mm LEDs just happen to draw current in the safe operating range of its output pins. A lot of people would like to use an instument cluster with its full potential including all the lights.

On another note: the speedo, tacho, fuel, temperature and mpg gauges have pullup resistors on the instrument cluster side, althought a weak pull up but it pulls up to about 7 - 12 volts, that is far from safe to connect directly to an Arduino pin. A ULN2003 or discrete transistors should be used in between.