05/04/2023 - UPDATE
-------------------------------So.......electrical ehhhh?!..... well, found a few challenges here !
Firstly, to give you context - there are 5 independently controlled
WS2812 LED "strips". These are each connected to a specific GPIO pin on an ESP32 with
WLED software controlling the LEDs.
- Race Leader
- Left Side (under side panel)
- Right Side (under side panel)
- Pedals (footwell)
- Base
- (soon to add circle WS2812s around speakers also)
My "idea" was to use
MAMEHOOKER and
PACDRIVE and a
RELAY BOARD to:
- Switch
ON/OFF the lights from game outputs
- Send
JSON API POST commands to
WLED to change colour / change effect / make sound reactive
So as an example, when
Daytona USA boots up,
MAMEHOOKER will set up all LED strips as following:
- Race Leader = White + max brightness
- Left Side, Right side, Pedals, Base = PLAYER Colour + max brightness - i.e Player 3 would be YELLOW
THE CHALLENGES......The above seemed like a pretty good idea at the time - it would mean I could freely change all aspects of each strip independently as well as using
OUTPUTS from games to control features.
First issue was the
RELAY BOARD - not sure how I forgot about the "clicking" a relay makes when switching ON/OFF
so you could imagine how loud that was when the RACE LEADER strip was flashing. So I had to scrap the relay board.
I'm not sure I can connect the WS2812 negative to the PACDRIVE (to get the same outcome as the RELAY BOARD) as I'm not sure if the current would be too high - the LED strips are independently powered by a 5v power supply and I think I would need to ground that 5v power supply to the ground on the PACDRIVE also.....?
So until I'm sure I can safely ground the 5v power supply to the PACDRIVE my alternate solution is to connect power for the LED strips directly to the 5V power supply and use JSON API POST commands to WLED to control the strips ON/OFF / Colours / etc.
^this seems to have worked, however, I feel there is a bit of a delay between
MAMEHOOKER detecting an output from the game, sending the command to
WLED and then the LED strip updating. I need to do more testing here.
Ideally, I'd like to hook the negative wire of each LED strip directly to the
PACDRIVE (as long as it is safe to connect the ground of the 5V power supply to the ground on the
PACDRIVE) - that way the
PACDRIVE can do the ON/OFF switching instantly.
I also had significant grounding issues with the LED strips. I purchased extra 3 pin male and female connectors and soldered them to the LED strips for easy connect/disconnect but they were useless. Some LED strips were acting like they did not ground correctly or signals were being interrupted as some of the LED strips didnt seem to be able to hold the selected colour. Took a lot of head scratching to figure this out. So I changed them all out and soldered stronger more insulated connectors. I seem to still get some of the LED's dropping in and out though which is puzzling. I feel it is a grounding issue. More testing required here.
I've wired up all the buttons and button lights.
I mounted the 4 speed HAPP Shifter (took a few goes to be happy with the positioning of it) and wired it up to the
Zero Delay USB encoderWorks like a charm!
On another note, I received the checker plate aluminum sheet and cut it to size - really makes for a nice finish.
I'll post some photos later today