Today, everything from your computer to your dryer has wireless communications built in, but devices weren’t always so unencumbered by wires. What to do when you have a legacy serial device, but no serial port on the computer you want to connect? [vahidyou] designed a wireless serial dongle to solve this conundrum.
Faced with a CNC that took instructions over serial port, and not wanting to deal with the cabling involved in a serial to USB adapter, [vahidyou] turned to an ESP8266 to let his computer and device talk wirelessly. The hand-made PCB connects via a 3.5 mm headphone jack to DB9 adapter which he describes in another article. While [vahidyou] did write a small Windows program for managing the device, it is probably easier to simply access it in a web browser from any device you have handy.
Want to see another wireless serial port application? This Palm Portable Keyboard Bluetooth dongle will let you type in comfort on the go, or you can use a PiModem to get your retrocomputer online!
It would be ‘fun’ if someone would put a CNC lathe on the web, so that people could send motor commands to it via cURL, and then put the whole thing up on a twitch stream. see what kind of creativity people get up to!
I don’t know if this counts, but I connected 8266 to Arduino with GRBL to send commands through browser. Took me an hour, not really a rocket science.
they would just break the tooling instantly and the party would be over.
Nice hack – but relying on wifi for anything around a CNC machine with their typically very (electrically) noisy spindles and power electronics is a recipe for problems and potential disaster, depending on what is it used for.
I thought so too however was converted in the early 2000s when using a Burny 10 plasma CNC wirelessly at a trade show where other plasma machines were being used. I just worked.
Agreed. I’m not even going to connect my 3s printer to WiFi.
UART over 3.5 mm headphone jack was strange enough to slow you down when this setup breaks. However, the 3.5 mm headphone jack to DB9 adapter is a going to be a nightmare to fix since there is no PCB! To make things worse, both of these need separate power supplies and they both use linear voltage regulators.
This isn’t a serial to wifi adapter, it’s a guide on how to needlessly waste as much electricity as possible while creating non-recyclable e-waste!
I’ll be honest here: this is sketchy and jank at best; and downright dangerous at worst. Worse still, title suggests that you should use a technique like this to expose serial ports *on the internet*. Thanks, but I’d prefer to not expose complete unauthenticated control of a CNC machine over the internet.
A more correct approach would be to run a small SSH server on an ESP32 that provides encrypted access to specific devicy, or to use something like octoprint.
This is precisely the issue I was facing recently.
My projector (BenQ W5700) recently became supported by Home Assistant, and I wanted to hook it up. Except my HA box is about 15m away from the projector, and I can’t easily run a cable there.
First idea was to use an ESP32 module – the projector has USB ports that can provide power (even when turned off), and since my WiFi AP is right next to the projector, wireless connectivity wouldn’t be an issue. Except I couldn’t really find any examples of making the MCU’s serial port available as a native serial port on another device.
Then I realised that both my HA host (running on Proxmox), and my AP (running OpenWrt) can run `usbip`, so I grabbed a cheapo USB serial adapter, hooked it up, set up `usbip` services on both ends, and attached the USB serial device to my HA instance.
“[..] and they both use linear voltage regulators.[..]”
That’s not a bug, that’s a feature. Linear voltage regulators are dependable and clean. Efficiency is fine, too, if the difference between input and output voltage is reasonable.
By the way, the LM7805 can do the job of the MAX232 in one way on its own.
It’s an old hack.
If the baud rate is not too fast, it can convert +12v signals of the V.24 to +5v without any extra parts. Since there’s merely voltage and little current floating from A to B, it’s not critical. A diode before the 7805 input is recommended, however.
The other way round, from B to A, merely requires a diode. The V.24 port can decipher +5v signals (3v is the lower limit, afaik).
Of course, someone could also use simple bipolar transistors (BC548/2N2222) and pull-up / pull-down resistors instead. Or a pair of opto-couplers. Would be a little bit cleaner, design wise.
This has been done before in a much more sophisticated way: https://github.com/jeelabs/esp-link and has been mentioned here many years ago: https://hackaday.com/2015/09/18/transparent-esp8266-wifi-to-serial-bridge/
DB9? That’s a car. There is no such thing as a DB9-connector. It’s called DE-9.
DB9 is the name for the connector. And no RS-232 is not a character from star wars. Learn ur terms buddy or don’t comment.
Not so fast…. https://en.wikipedia.org/wiki/D-subminiature
Well, Jeffrey Stelmach (if that’s your real name), I think you should learn your terms or refrain from commenting:
https://en.m.wikipedia.org/wiki/D-subminiature
So true!
DB9 is an old falsehood that doesn’t want to go away. It’s DE-9.
DB was fine for DB-25, though.
V.24 also refers to RS-232-C.
And if we’re very picky, we could argue that RS-232 was superseded by EIA-232.. ;)
Am I the only one who has a little tiny reflexive shudder when I read sentences like “CNC controller over wifi” ?
Don’t read the next article then:
https://hackaday.com/2023/01/07/wireless-cnc-pendant-implemented-with-esp-now/
” Looks like I picked the wrong week to stop sniffing glue… “
B^)
Not at all. That was my immediate reaction upon seeing the article, especially considering the fact that there are much better and more secure ways to do this with the same hardware.
It would be much easier to setup a serial server on a Rpi https://www.jpaul.me/2019/01/how-to-build-a-raspberry-pi-serial-console-server-with-ser2net/ I use this setup at work all the time and works great!
Have you tried buying a Pi in the last year? Also the ESP8266 and ESP32 both have significantly lower power requirements than even the Pi Zero.
I just bought 5 Pi Zero W’s – at a discount too! Agreed, it’s a different beast, but should be able to do UART-WiFi.
Isn’t this exactly what an off-the-shelf ESP8266 was designed for? Wireless serial interface?
Shhh….
Don’t point out the irony or it loses its comedic power.
It was more or less designed for the reverse: giving a local (serial) device network access.
I guess Im the daft one here.
I’d go find an ancient PC with a serial port, as it just seems so much easier.
*looking in the shed*
Crikey, didnt realise that I have 23 junkers.
Will you keep your ancient PC on all the time to control your device? And run web-server on it? I guess paying $3-5 for ESP8266 is much cheaper at the end of the day.
Why do you guys always associate the RS-232 with old rusty PCs from the junk yard?!
There are *real* serial port controllers for PCI, PCIe and Express Card! 🙂
They’re even superior to on-board ports, since they contain high-end UART FiFos.
Not just an old 16550A (or worse, a 16450 from the 286/386 days), but very compatible successors!
The RS-232 isn’t dead, it’s safe and sound.
It’s just nolonger a consumer’s tech.
Why not just use a Terminal Server? I found one, new, on amazon, for about $20, and one at Walmart.com for $10.
Why not just use a 555? I found one in my parts bin.
Why not pay a neighbourhood kid to copy the data across?
Thoughts and prayers work best, I heard on the news…
How about using SSH?
https://github.com/defdefred/Remotty
Interesting project. But what a crazy schematic! Really hard to follow. Convention has voltage rails at the top, 0V or GND at the bottom, and a general left to right flow.