Close

Investigating the MCU

A project log for VanthyLit LED Curtain Teardown

I'm reverse-engineering a plug-and-play addressable led curtain from Amazon.

spicuriousSPIcurious 01/04/2023 at 03:481 Comment

Second 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 devicesmicrocontrollers, 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.

Discussions

SPIcurious wrote 01/04/2023 at 04:49 point

Found an amazing tutorial on programming these STC chips specifically:

https://embedded-lab.com/blog/exploring-stc-8051-microcontrollers-coding/

  Are you sure? yes | no