Extracting sled X and Y coordinates for displaying on LED DRO

Ahh! I understand now :slight_smile:

I will get you a photo this morning of the connection from ESP32 to the LEDs and ESP32 to the Arduino.

1 Like

I had to take it to pieces to get the photos and in doing so I remembered something I’d put in the box that I’d forgotten about. I used a resistive divider to step down the TX line voltage from the Arduino (5V) to the levels that the ESP32 can handle (3.3V).

I’ve put additional pictures in the github repo but I’ll try to also post a couple of pictures here. The first one is the Arduino end. You can see I’ve wired resistors between the TX pin and GND then fed the signal wire to the ESP32 from the junction between the resistors. The signal goes into the RX2 pin on the ESP32.

The connections on the Arduino end are actually made on the top board which is the motor driver board, but the signal is coming from the Arduino underneath - that was just the easiest place to tap in. I also take a 12V DC (and ground) feed off from motor driver board to feed the 12V input on my LED boards.

The LED boards each have a 5V switchmode regulator on-board (their daisy-chain voltage down the ribbon cables is 12V). That way you don’t end up with dimmer boards further down the chain. I take a tap off the 5V regulator on the first digit and use that to feed 5V into the VIN pin on the ESP32 and I connect the GPIO13 pin of the ESP32 (display signal out) into the DIN pin on the first display.

It would probably be pretty straightforward to copy/paste multiple copies of the LED board onto a new single board layout in easyeda. The only problem is that JLC require a minimum build of 2 boards for pick N place. That’s why I ended up going for a single digit; it allows me to build up different sized displays depending on what’s needed :slight_smile:


1 Like

You build some pretty neat stuff too Tim! Your art skills leave mine for dead :slight_smile:

I posted this on another thread as well. But it has use in your project since you are using a wifi capable micro:

http://<Maslow IP>:5000/LED

Will give you the details you want in json format to parse. Based on your post, I ordered 3 displays each with 4 8x8 dot matrix LEDs run by an spi connection. Max7xxx chip… I forget the number. I’m going to use the esp to pull via the http get request listed above and put the sled coordinates on display as you have shown can be done. I’ll also add a status led for the system state and buttons to start. Stop and pause the loaded job… Cool idea with the big numbers.

Yes I think even earlier on in this thread we were discussing the /LED page and parsing output from that. Then @josm put me on to the idea used in the Big-Z project of reading the serial data as it passes by live from the Arduino back to the host controller.

I liked the serial sniffing idea because of the immediacy with which the display shows the sled position (all of the latency of going through the rpi, web-control and wifi are removed), plus I wasn’t sure realistically how often I could update the display from the http feed (the serial updates are twice per second, so pretty quick).

However the http method adds all that other button and state-display functionality which would be really nice too. I’d still like to have that. Hopefully I can copy your hard work and just cut out the display part :slight_smile:

One thing I had on my rpi command line display was an elapsed time timer when the status went from idle to cutting. Maybe the 3 displays can show xyz when not running gcode then show a timer on x and the gcode file line number on y when running and the z during the cut.

I’m not sure how often one can poll the /LED dataset, but it should update fast enough.

I actually just mentioned my interest in adding MQTT in the thread Orob was talking about posting the LED url on above, but this is another use case where it would excel.

MQTT is vastly superior to HTTP when it comes to transmitting data. MQTT messages can be sent and received 1000s of times a second, with practically no overhead.

Basically using the python paho mqtt library I think it should be fairly easy to get basic MQTT functionality into WebControl, and plan to look into myself in the future.

I was inspired by the z display idea and made a new controller box to house the raspberry pi and the mega along with some gpio inputs to the rpi and a BIG display for X-Y-Z when shuttling. I think when it runs, I will have elapsed time on X, gcode line number on Y and z will be z height… not coded yet, but I like the box so far.


Once I get the controller thing figured out in the other thread, I’ll complete this thing. the real reason is that my tab-placement skills have been lacking lately and the vacuum has been pulling out small chunks and wedging the sled causing it to lift and tilt and mess up the cut. if I had a pause button for when a piece broke loose without having to log into my phone again real quick and find the pause button, it could save some material and some time.

the x location will double as a menu selection and the select button when pressed will change the mode from x-y to z and then to zero or save home or reset home options… not sure the logic on how to set that up just yet, but that is the idea.

I thought about using a wii remote again, but I need a button to turn on the pendant service, so would have to make one of these anyway. I also messed with the ESP32 wroom kit I have but that was not a simple thing to set up. VS code was not playing nice just to get the socket communication, so then I was going to use the raspberry pi zero with the nes controller and the oled matrix display, but that would require a battery charging circuit set up, which I don’t have at the moment and so just using the resident raspberry pi and adding a display and some buttons seemed like a faster, cleaner path. I’ll revisit the other options at some point, but for now the pause feature was most important.

4 Likes

Looks awesome

1 Like