-
Investigating the Pixels
01/23/2023 at 08:12 • 0 commentsOption 2 of this project is that I create my own hardware controller and throw away the Tuya hardware. This would be the move if reverse-engineering the MCU on the board to accept my firmware would exceed my skill level or time allowance for this project.
Instead, I could diagnose what type of pixels the curtain uses! This could still lead to a good, money-saving result for me, because it would be incredibly useful to have a waterproof matrix of this size, already created and ready to go for projects. Super low-res screens have a time and place, and with the right diffusers I could really save time and money if I wanted to build large-scale low-res walls.
Diagnostic questions for figuring out what the chipset is of the pixels:
- What is the voltage of the pixels?
- Look at the signal being sent by the controller under a scope. What does it look like?
- What do the most common chipset signals look like? Can I use an ESP32 to send out pixel data in different formats until I find the one that works?Types of pixels commonly available in the market:
ws2811
ws2812b
ws2813 - adds a backup data line in case the primary data line of the ws28xx series fails. 4pin.
makes ws2813 best choice if they cannot be accessed for repair (ie put into epoxy)
ws2815
all that plus no significant color change with voltage drop. 4pin signal, 1 being a backup data channel.
SK6812
SK9822 - needs clock signal, 4pin input
high voltage drop in strip
APA102 - needs clock signal, 4pin input
The main difference between pixel types is chip timing. That is the rate at which the LEDs expect new data.
-
Investigating the MCU
01/04/2023 at 03:48 • 1 commentSecond attempt working at this project.
I want to figure out if I can load my own firmware onto the existing hardware. If I can do that, all I need to do is:
make it join my artnet network by giving it the ssid and password
figure out how to give it a persistent IP address once it's on the network
Make it listen on the network for frames of artnet data
I've been able to get ESP32's onto artnet and listening for UDP data. I've been using Resolume to push data and it's been working great.
Question for this session:
Can I load my own (ok, someone else's) code onto the chip?
Do I need specialty hardware to do that, or can I somehow do it OTA?
------------
Chip info: STC 8A8K64S4A12 281-LQFP48
https://www.lcsc.com/product-detail/STC_STC8A8K64S4A12-LQFP-48_C84390.html
single chip MCU
-------------
How to upload to this particular MCU:
From some initial poking around, it looks like I need a tool called the STC-ISP to change the code running on the chip. "ISP" stands for "In System Programmer" and I think that might be a broader class of software.
From datasheet for the chip: under "Features":
In-System-Programming, ISP in short, can be used to update the application code, no need for
programmer.From my research: I found a site called Embedded Artistry, which has this helpful summary:
In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. It allows firmware updates to be delivered to the on-chip memory of microcontrollers and related processors without requiring specialist programming circuitry on the circuit board, and simplifies design work.
https://embeddedartistry.com/fieldmanual-terms/in-system-programming/#:~:text=In%2Dsystem%20programming%20(ISP),installing%20it%20into%20the%20system.
From this, I'm assuming there are some header pins somewhere on the board that I could attach to in order to reprogram the chip.
The datasheet for the MCU has a section on the ISP, and it looks like I could use this tool:
STC-u8 Mini - a USB hardware device that can communicate with the chip over serial.
https://www.amazon.in/ELECTROPRIME-U8-Mini-Downloader-Offline-Programmer/dp/B07X6JDVVH
Now, I'm going to examine the board and try to figure out where the STC-U8 Mini would plug in.
There is a four-pin hole in the board that I think is exactly what I'm looking for!
G, T, R, +3V
I'm going to guess that stands for Ground, Transmission, Receiving, +3V - sounds like a port to me.
The STC-U8 Mini I found on Amazon comes with some multi-line cables, which may or may not correspond to those holes.
I think that's it for me today. I learned about ISPs, which is super cool because I hadn't ever heard of those before. It makes sense as a tool, because (as the source I found points out), you can take out a step between prototype and production by being able to change the program running on the chip. I assume having ISPs is probably an industry standard for embedded electronics.
I need to decide whether I want to investigate getting one of these tools for changing the program on the MCU, or if I should focus on figuring out what type of signal it is outputting so that I can focus on emulating that with my own hardware. I want to be able to buy these led curtains cheaply and then turn around and use them for streaming data from Resolume, preferably with as little actual work in between as possible. Changing the program on the MCU would require pulling apart the box, and uploading my code.
Pros: I know the power management is all handled well - I don't know how to do that if I redesign a hardware controller from the ground up. I think these pixels take a weird voltage (6.6V).
Cons: I couldn't figure out how to open the box without totally destroying it.
---edit---
can easily open the box - they are triangle-head screws. If I can figure out how to write a program that will automatically connect to my artnet router and then print out the IP address over serial, I could have an easy way of getting loads and loads of low res pixel matrices for $75 a pop.