Announcement

Collapse
No announcement yet.

WiFi retro-Modem for under a tenner

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WiFi retro-Modem for under a tenner

    Or "Stick that in your WiFi232 and smoke it"... I posted this on stardot, but it's applicable beyond the BBC Micro/Master to anything with a serial port...

    So, WiModems, WiFi232s etc... These have been doing the rounds lately, they're around $40-50 + shipping from the US (and you can add VAT+Royal Mail's courtesy fee onto that to). There's not a lot to them, they're all derived from the ESP8266 wifi module and some form of TTL-Serial -> RS232 level shifter. Add in a bit of firmware to allow it to connect over telnet to things and respond to AT commands and you're pretty much up and running.


    Now, there's open source firmware for the ESP8266 out there - and I strongly suspect some of these being sold are based on that - but anyway, this combination means it's cheap and pretty easy to get yourself up and running without it costing the earth I've tested on a Master, it will work on a beeb, it should work on anything that has an RS232/RS423. I've had it connected to various things now at 9600bps using hardware flow control.

    You will need:
    1x LoLin NodeMCU board with an ESP12E module on it (£5ish shipped from UK, less if you want to wait for one from china)
    1x MAX3232 level shifter board - not just the IC on its own! (99p from Hong Kong, probably about £4 from the UK)
    1x Domino plug for the beeb's serial...
    Some wire for wiring things together.


    On your modern computer you need:
    The Arduino IDE: https://www.arduino.cc/en/Main/Software
    The source for the firmware (this has been updated to offer hardware flow control if you want to use it): https://github.com/stardot/esp8266_modem


    On the beeb you need:
    Commstar 1.4: http://archive.retro-kit.co.uk/bbc.n...-882A-1.40.rom


    1st, you need to get the ESP8266 environment set up on the Arduino IDE. Instructions here:
    http://www.instructables.com/id/Quic...n-Arduino-IDE/


    I'd try this as a sample sketch just to make sure you're working OK and able to see wifi networks:
    https://github.com/esp8266/Arduino/b...n/WiFiScan.ino


    Once you're sure that you can compile and upload sketches to the NodeMCU board, compile and upload the ESP8266 modem sketch.


    Next step is to hook this up to the BBC/Master. If you're just going for standard RS232, just use the TxD, RxD, GND, CTS and RTS pins - you might need to use DSR/DTR instead of CTS/RTS depending on your machine, be prepared to try different combinations. Anyway:


    On the domino plug, looking at the solder side, join pins 5/2 (RTS/CTS, red link in my picture), and take lines from GND (centre pin 1), RD (4, Green in my picture) and TD (3, Yellow in my picture):


    Click image for larger version

Name:	DSC_3466.JPG
Views:	1
Size:	89.0 KB
ID:	1565140


    Take TD to the TxD pin on your level shifter and RD to the RxD pin (That's pins 3 and 2 respectively of a 9 pin connector on mine), and GND to GND:


    Click image for larger version

Name:	DSC_3467.JPG
Views:	1
Size:	91.3 KB
ID:	1565141

    On the other side, the MAX3232 will need 3.3V from somewhere (you could snaffle it from the LoLin board) and you can bring the GND from it out to attach to the LoLin board...


    Connect the TxD output to the TX pin on the LoLin board (black wire on my picture below), and the RxD output to the RX pin of the LoLin board (brown wire), GND to G (blue wire), and then it's up to you to choose how to power the LoLin board - I've taken 3.3V from my beebscsi (red wire again, but a different red wire to the previous picture) - but you can take 5V and feed that to the VIN pin, or you can just use a USB adapter and power it through that. Entirely up to you. JUST DON'T FEED 5V TO ONE OF THE PINS MARKED 3V! YOU WILL FRY YOUR BOARD!


    Click image for larger version

Name:	DSC_3469.JPG
Views:	1
Size:	58.0 KB
ID:	1565142


    You're now ready to get the thing connected!

    If you decide to try hardware flow control, CTS in to the NodeMCU is through D7 (i.e. GPIO13 on the ESP8266), this should be connected to RTS on the host side, and RTS out of the NodeMCU is through D8 (i.e. GPIO15 on the ESP8266), this should be connected to CTS on the host side.

    As I mentioned above, you may need to use DSR/DTR instead, or some other combination, depending on your machine.

    In the stardot repository I've also put a schematic/PCB layout for an RS232 ready board, in a similar vein to the WiModem or WiFi232 (FreeFi232!) - it's there under the CC-BY-SA 4.0 license, please feel free to make, share and develop!

    Additionally, if there are any features you'd like to see implemented in the firmware, raise an issue on github and I'll see what I can do!

    d.
    Last edited by danielj; 20 May 2018, 21:02.
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Working...
X