Image Map Image Map
Page 4 of 5 FirstFirst 12345 LastLast
Results 31 to 40 of 47

Thread: Open source WiFi RS232 Modem

  1. #31

    Default

    There's no magic in his device. This design should do exactly the same and more (and obviously you can extend the firmware to do what you want). I'm not intending to build/sell these these, but everything for these is open, you can order 20pcbs for about $9 including postage. I've just put an order in to test the design. Assuming it works, people can just build away. Everything is here:https://github.com/stardot/esp8266_modem

    FreeFi232v2-3d.jpg
    Last edited by drdanj; June 12th, 2018 at 02:14 PM. Reason: Add image

  2. #32

    Default

    Looks nice. I look forward to hearing how it goes together.

    g.
    Proud owner of 80-0007
    http://www.f15sim.com - The only one of its kind.

  3. #33

    Default

    Quote Originally Posted by edcross View Post
    Is anybody developing an alternative device? If so i'm interested in at least one uni, like many other I have messaged the guy behind Wifi232 but he simply ignores any questions, even the simple questions around expectations on new product batches or making the schematics/firmware public.
    Iíve planned on doing Modem Emulation as alternative firmware for my RS-232 WiFi SLIP Adapter. It supports *all* 8 RS-232 signals. Though it was originally designed as a SLIP server, modem emulation should be pretty easy to implement.

  4. #34

    Default

    More OSH If you can fit the arduino programming header on it should be able to use the same firmware? This has all 8 RS232 signals routed - it's not half as tidy as yours - I was really thinking about how easy/quick it'd be to hand build. And it's all been something of a learning curve in the PCB department. I should have the boards sometime next week.

    -> one thing I notice you've done is not use GPIOs 13/15 for RTS/CTS - the ESP8266 will give you RTS/CTS for free if you use these? Or is there a way of getting the same for free out of other GPIOs? If so that might make routing rather easier... (I couldn't see a way of implementing the hardware flow on anything other than those two GPIOs when I was reading the documentation).

    The other thing to use your dongle as a modem, DTR isn't always hooked depending on system and serial port (e.g. I'm using a 5pin RS423 on which you'd not be able to rely on any of the lines giving a signal at any time), so having another method of asserting the EN line to the ESP module would be useful?

    d.
    Last edited by drdanj; June 17th, 2018 at 02:41 AM. Reason: Some more comments.

  5. #35

    Default

    Quote Originally Posted by drdanj View Post
    More OSH If you can fit the arduino programming header on it should be able to use the same firmware? This has all 8 RS232 signals routed - it's not half as tidy as yours - I was really thinking about how easy/quick it'd be to hand build. And it's all been something of a learning curve in the PCB department. I should have the boards sometime next week.

    -> one thing I notice you've done is not use GPIOs 13/15 for RTS/CTS - the ESP8266 will give you RTS/CTS for free if you use these? Or is there a way of getting the same for free out of other GPIOs? If so that might make routing rather easier... (I couldn't see a way of implementing the hardware flow on anything other than those two GPIOs when I was reading the documentation).

    The other thing to use your dongle as a modem, DTR isn't always hooked depending on system and serial port (e.g. I'm using a 5pin RS423 on which you'd not be able to rely on any of the lines giving a signal at any time), so having another method of asserting the EN line to the ESP module would be useful?

    d.
    Your board actually looks pretty good. Off hand I don’t see any major errors or omissions (there’s a couple of small things, but nothing that would affect operation at this speed level).

    Just a few general tips on PCB design:

    After your next board, I’m sure you’ll have the tools down pat, after that it becomes all about learning to visualize the various permutions of the layout in your head as you go. When you start working on bigger boards it really helps to break it up into sub-sections (route each section separately, then move them onto the board and route them together); last year I did a 500x500mm board that contained close to 600 separate parts (mostly through hole resistors, capacitors and transistors) and it would have been impossible to do without breaking it up into sections.

    I do PCB design and layout for a living and when I’m working on a difficult project I sometimes *dream* about the layouts; it can become an all consuming puzzle, but man does it feel great when you figure out a solution. Don’t get too caught up on the “right” way to to design a board. I see this a lot with people new to PCB design; they all assume there’s only one correct solution for a particular design. Aside from a few basic tenants (use a solid ground plane, observe high speed design rules for signals over a few MHz, etc.) there’s no one correct way to design a board. (At the hobbyist level, anyway! If you were designing a board down to a cost, or for mass production, obviously choices become a lot more limited and there’s many more rules you have to follow.)

    Finally, don’t be afraid to make mistakes! A set of PCBs costs $10 or $15 from OSHPark or DirtyPCBs and you can have them in a week or two. In the grand scheme of things that’s nothing. Mistakes are the greatest teacher you’ll ever have; you’ll almost always learn more by a making a mistake and figuring out the solution yourself, so don’t be afraid to iterate your designs, PCBs are cheap!

    Anyway, back on topic!

    Thanks! I put a lot of work into my layout, so I appreciate the compliment. My board can still be hand populated with good tweezers, a magnifying headband and steady hands, but does require reflow soldering (either hot air or an oven). I specifically used oversized pads for the 0402 resistors and capacitors to make sure they could be easily hand placed. Initially I planned to not go below 0603 (which can be hand soldered with a fine tipped iron), however the ESP module itself requires reflow soldering, as does the onboard buck converter, so I figured, what would be the point? I’ll be populating all the boards I sell by hand, but reflowing them in a modified toaster oven. Plus this way I get to keep the board really small (the whole thing is no bigger than two US Quarters, including DB-9 connector).

    As for an Arduino connector, there’s just no room for a 2.54mm pitch header on there. That said, you could still program it with firmware created from the Arduino IDE, you’d simply compile your program, locate the binary it produces and use esptool.py to program it straight over the DB-9 serial port with a USB to Serial Adapter. That’s why I added a tiny push button to get the ESP into flash (bootloader) mode!

    I decided to implement CTS/RTS in software myself, as it’s pretty simple to just check the input before transmitting (or raise a pin if you’re about to be busy/the buffer is nearly full). The reason is because RTS being on IO15 means the ESP won’t boot if your system doesn’t asserts RTS immediately with DTR (however, most software does this, but there are exceptions). IO15 has to be pulled down on powerup for the ESP to boot; the RS-232 transceiver inverts all inputs, so if RTS=0 then IO15=1. I also had some issues getting the built-in RTS implementation to work properly all the time. I could never fully track down the cause, it seemed nearly arbitrary. Because of these issues it made more sense to just do it myself.

    ~
    Edit: Though, CTS is still on IO13, so I could always use the hardware CTS implementation and just do RTS in software. Hardware CTS control seemed to work fine and that is the more complex of the two to implement in software.
    ~

    And yes, in the latest release candidate of the board I’ve added a three-way solderpad to switch between DTR Enabled and Always Enabled. I’m also considering adding a tiny slide switch on the left hand side of the board to make selection easier and less permanent. (This way the user can move the adapter between hardware.)

    Originally this was designed for use with PCs, which almost always have all 8 signals available. Am I missing anything else that would prevent it from working on other platforms, aside from the aforementioned DTR issue?
    Last edited by timb; June 17th, 2018 at 12:03 PM.

  6. #36

    Default

    Thanks - most of all it's fun! I'm fairly sure I can get it a bit smaller but I was trying to keep everything on one side, by the time I got it all to line up nicely I'd slightly lost the will to live! Do tell me the small things though - all feedback/constructive criticism is really welcome, and really has been the best way to learn. Re. bootloader mode, - that makes sense now with the reset button, I'd not quite twigged! I'm still deeply impressed by the size - I'm assuming you have to use solder with different melting points on each side?

    I don't think there are any other oddities other than being able to turn off hardware flow control (and have flexibility in what's asserted when across that, DCD and DSR) - in my specific use-case, HW flow needs to be on from the off, or at the very least CTS needs to be asserted at the terminal end. Most obscure cases just need a bespoke cable rather than anything on the modem end, so as long as that's behaving "properly" you're all good.

    Pin 15 when in HW-flow mode is RTS for the ESP-8266, but that's an output (essentially "ready to receive", wired to CTS on the RS232) so the terminal will never assert anything down that line (check my schematic), thus all it needs is a pulldown to ground - I just double checked this on my NodeMCU mockup, and it is the right way round. Do you think that might have been the problem?

  7. #37

    Default

    Quote Originally Posted by drdanj View Post
    Pin 15 when in HW-flow mode is RTS for the ESP-8266, but that's an output (essentially "ready to receive", wired to CTS on the RS232) so the terminal will never assert anything down that line (check my schematic), thus all it needs is a pulldown to ground - I just double checked this on my NodeMCU mockup, and it is the right way round. Do you think that might have been the problem?


    Ugh... Of course! The pin naming on the ESP is as a DTE... This is why I hate the RS-232 signal naming so much. Having the names mean different things depending on which side of the connection youíre on is so incredibly confusing. SPI has the right idea with MOSI/MISO (Master Out Slave In/Master In Slave Out); it clearly defines the function of the signal no matter which side youíre on!

    So I need to hook it up like this:
    Code:
    DTE      DCE
    CTS <--- RTS
    RTS ---> CTS
    Iíll give that a try on my prototype tonight and then reroute the nets on the PCB. I canít belive I did that. I kept thinking, ďOkay, the adapter is functioning as a DTE, so everything but RX/TX needs to be wired straight through from the ESPĒ, without taking into account that RTS and CTS needs to be swapped too! Oh man, how embarrassing.

    Good thing OSHPark rejected the first set of Gerbers I submitted last week (I need to pull back the pads for the DB-9 connector; the fab thought they were gold fingers), so I can include this change in the new Gerbers Iíll submit tomorrow.

    Iíll get to the rest of your post in a bit, I need to try and install KiCad to have a good look at your layout. The KiCad to DipTrace converter I used didnít do a very good job. (Unless you want to post a PDF or high resolution image of both sides of your layout, preferably with layer contrast enabled, if that works in KiCad now.) I use a PDF Printer Driver to make PDFs of my schematics/layout and it works great from any tool. (Thatís another tip, always try to include a PDF version of the schematics and board layout with your project, so people who use different software can easily view your work.)

    When I release an open source project I like to include a PDF with the schematic/BOM/layout, the original DipTrace files of the schematic/layout, a 3D model in STEP format of the complete board and ready to go Gerbers of the board. I feel this pretty much covers all the bases and makes it easily accessible.

  8. #38

    Default

    You have no idea how many knots I kept tying myself in with that and going back and forward checking what each end was doing with a scope before I was comfortable I had it straight in my head!

    I'm about to turn in, and can't immediately see a way of getting it to plot in a pdf that looks nice. Here are the gerbers though: https://gerber-viewer.easyeda.com/sh...list=1-2-3-4-5

    -> I should note, the power trace around the right hand edge was too close to it, I fear it might have got reduced in width with cutting... I've changed that a bit now but not updated the gerbers with it.

  9. #39

    Default

    Quote Originally Posted by drdanj View Post
    You have no idea how many knots I kept tying myself in with that and going back and forward checking what each end was doing with a scope before I was comfortable I had it straight in my head!

    I'm about to turn in, and can't immediately see a way of getting it to plot in a pdf that looks nice. Here are the gerbers though: https://gerber-viewer.easyeda.com/sh...list=1-2-3-4-5

    -> I should note, the power trace around the right hand edge was too close to it, I fear it might have got reduced in width with cutting... I've changed that a bit now but not updated the gerbers with it.
    Hey, that Gerber Viewer works fine. So, yeah, first off that power trace is way too close to the edge of the board. You should always check the minimum specifications of the fab you plan to send the board to and enter those in the DRC section of your EDA tool. For example, OSHPark requires traces to be no closer than 15mil to the edge of the board, traces/pads be no closer than 7mil to each other and no copper features (traces, rings, parts of a pad, etc.) smaller than 7mil in width. The trace coming off R3 appears to be way too close to J3 and J2. The same with the trace off J3 on the bottom layer.

    The DRC options (Design Rules Check) in your layout tool will automatically verify your layout isn’t violating any design rules (once entered) and will highlight any errors for you. It’s very handy.

    The other issues I see are:

    1) Needs more Ground Stiching. You should have a lot more vias connecting the top and bottom ground planes in the available free space. Remember, the current going through a trace has to travel through the ground plane too. Since you don’t have a solid ground plane (like you would on a 4 layer board) you need to make sure the ground plane is stitched together well, otherwise voltage differences can develop between the areas, which can cause all sorts of weird issues.

    2) Avoid routing traces to/from the inner corners of pads. I’ll use the right hand pad of C3 as an example: Instead of the trace connecting to the inner corner of that pad, I would have tee connected it to the trace already coming off the top. Here’s the reason: Notice in the Gerber view how some of the copper is exposed on the traces that connect to pads? This is called the solder mask swell; essentially the soldermask is pulled back by a small amount (typically 0.05mm/1mil) around exposed copper. Well, when you route off the inner corner of a pad part of that exposed copper ends up under the component. Since the copper is exposed it will attract solder and can cause components to roll onto their side, or even tombstone (which is where small SMD parts will sit straight up on on their butt, like a tombstone), during reflow. (This is also why you have to be careful when putting vias under SMD passives and hooking them to an inner side of the pad, as this can also cause tombstoning.)

    In fact, I don’t like having more than two traces going into any single pad. If you need more than that, you’re better off connecting the traces in a 3-way tee (—|) before the pad, but try to avoid 4-way tees (—|—). If you need more than 3 traces to intersect do it like this:

    Code:
      |
    ——|
      |——
      |
    You may have been told never to have traces do 90 degree turns; don’t belive it. Yes, it’s true in some very, very specific circumstances, but nothing you’ll likely encounter anytime soon. (Basically, when you’re dealing with RF or *very* high speed stuff it can apply, but otherwise you’re fine.) When you think about it, it makes sense: Everytime you route a signal through a via it’s making a 90 degree turn (only along the Z axis instead of the X or Y ones), so a trace making a 90 degree turn into a tee isn’t any different.

    3) Parts that handle larger currents need larger thermals. I’d double the size of the thermals on C6, C8 and U2, as these are likely to carry more current, so should be lower impedance. All the power traces could also use sizing up. Personally, I wouldn’t go below 40mil. Search Google for “trace and via power calculator” for some good resources on power handling capability and resistance per mil of various trace sizes.

    Like I said, these aren’t major issues (aside from the traces that are too close to the edge of the board and pads), just things to be aware of.

    Quote Originally Posted by drdanj View Post
    Thanks - most of all it's fun! I'm fairly sure I can get it a bit smaller but I was trying to keep everything on one side, by the time I got it all to line up nicely I'd slightly lost the will to live! Do tell me the small things though - all feedback/constructive criticism is really welcome, and really has been the best way to learn. Re. bootloader mode, - that makes sense now with the reset button, I'd not quite twigged! I'm still deeply impressed by the size - I'm assuming you have to use solder with different melting points on each side?
    Okay, I’ve made the changes to CTS/RTS and added a 3-way solder pad jumper to select between DTR Enabled and Always Enabled.

    Here’s a PDF of the current revision, including some 3D renders.

    You were right, it did simplify the routing between the transceiver and ESP a bit!

    As for how a double side board like this is soldered, there are a few methods, depending on how many boards you’re making and how you’re soldering them. In large production quantities and with reflow soldering, one method would be to use glue dots or some other adhesive on the top components and solder the board upside down, the adhesive keeps the components from falling off while the board is upside down. You’d also need a piece of polymide tape across the top of the ESP-07S to keep the shield from falling off. Another method involves special IR ovens that essentially direct more heat to one side of the board, which means you have to run the board through twice.

    In my case, I’ll reflow solder the bottom side of the board in an oven, then use hot air to solder the ESP module, bypass cap, LED and switch. (If you’re not careful you can actually cause the solder to melt on the opposite side of the board with this method, however it generally doesn’t hurt anything as the surface tension of the solder will generally hold the small parts in place; a piece of polymide tape across the ICs will keep them secure as well.)
    Last edited by timb; June 20th, 2018 at 06:55 PM. Reason: Fixed Link; Fixed Grammer; Clarified (2)

  10. #40

    Default

    Thanks Tim Those're really awesome bits of advice. Beefed up the power and tidied it up where I can - you can't really go any bigger than the pad that you're supplying the voltage to (or taking it from), but I tried to keep the trunks bigger where possible. Also added lots more stitching between the layers. I did have a go at shrinking it, but if I want to keep everything on one side it did start getting rather too tight

    Anyway, I think this is better:
    https://gerber-viewer.easyeda.com/sh...-2-3-4-5-6-7-8

    d.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •