thejpster / monotron

A simple 8-bit home computer style application for the TI Tiva-C Launchpad
Apache License 2.0
191 stars 9 forks source link

[WIP] Design PCB #17

Closed hannobraun closed 5 years ago

hannobraun commented 5 years ago

Here's my work-in-progress state for a Monotron PCB. It comes with:

What's missing (Update: Added a new list below):

@thejpster Can you tell me what kind of audio connector you plan on including? 3.5mm? Mono/stereo? (I know very little about audio connectors, but I believe that's all I need to know.

If anyone who's familiar with KiCad and/or PCB design happens to come by here, I'd appreciate some constructive feedback. I'm what they call self-taught slash an idiot.

thejpster commented 5 years ago

The audio connector will be a 3.5mm tip-ring-sleeve, and I'll feed both the left (tip) and right (ring) from the same output. I'm still working on which pins are best, and whether some form of RC filter is necessary.

As part of my keyboard debugging I've jigged around the video pins. Right now I have Red on PF1, Green on PB7 and Blue on PD3. This works, and leaves SPI0 completely free, which is the only SPI where all the pins are available on a Launchpad. I think I need this because to get the PS/2 keyboard into the SPI peripheral I need to pull chip-select low and connect Rx and Clk. Whether or not I get the keyboard working on this interface (it currently doesn't work), I think I'm going to leave the video in their new positions - having SPI0 available just gives me more options later. The keyboard may or may not stay on SPI0.

thejpster commented 5 years ago

Ok, so I have #19 open to move the VGA pins over. If you have a moment, I'd appreciate a quick double-check that I haven't done anything daft.

Next, I think I'm going to:

Given all of that is up in the air, I wouldn't suggest committing any of it to PCB yet - it's just an FYI.

hannobraun commented 5 years ago

@thejpster

Ok, so I have #19 open to move the VGA pins over. If you have a moment, I'd appreciate a quick double-check that I haven't done anything daft.

Sorry, I didn't get to that in time!

I've pushed new commits that:

Here are the parts I selected for the various connectors:

I'd really appreciate if someone could double-check my selection, as I don't really know what I'm doing.

@thejpster Which of your plans do you think I should factor into the first version of this PCB design? You mention a lot of other connectors, but given this should get done before Rust Belt Rust, I figure it's prudent to restrict ourselves to what's immediately relevant.

thejpster commented 5 years ago

VGA connector looks good. PS/2 connector looks good. Audio connector looks good.

The (new) VGA pinout we know works - we can track that through to the Launchpad. Please add two through hole resistors on each of Red, Green and Blue - one in-line and one down to ground (as per the README). I will start with 330R in-line and nothing to ground, but I might need to fiddle to cure some video interference I was seeing at the Retro Computer Festival.

The PS/2 and Audio pinout I'm still not sure on. The ground/5V we can connect, but I think we need to bring PS/2 +CLK, PS/2 +DATA and Audio to 0.1" pin headers, and then we can connect them over to the Launchpad using flying leads on which pins we want. Please fit add through-hole resistor pull-ups (to 5V) on +CLK and +DATA - I'll probably fit 10K and see how it goes.

In a similar fashion, if you could add a https://www.mouser.co.uk/ProductDetail/Amphenol-Commercial-Products/L717SDE09PA4CH4RC309. Put 5V on pin 7, Ground on pin 8 and the other pins to 0.1" pin headers and I'll jumper them over to whatever GPIO pins I have left.

image

The other connectors I mentioned (UART and I2C) I can just take from the top of the Launchpad - no special D-sub connectors required.

I can draw something on the back of a envelope if that helps.

thejpster commented 5 years ago

Ok, so my back of the envelope turned into a schematic in Fritzing. It's very much an ambition as opposed to a proposal. As I said above, apart from the VGA pins most of this stuff is up in the air so I still think the best approach is for the connectors to be soldered down but routed to some 0.1" pins so I can add jumper wires to the correct place.

monotron_schem.pdf

hannobraun commented 5 years ago

Thanks for all the info! I added a joystick connector to the README. Not the one you suggested, as I found one that costs less than half and looks essentially the same.

I plan to order the parts and start on wrapping up the design this week. Hopefully I can create the first PCBs next week, but that might be too ambitious. Still, Rust Belt Rust is approaching, and I don't want to cut it too close.

thejpster commented 5 years ago

Great, thanks! Very excited about all this.

PS: Tested single-channel audio and it works fine. Doubt I'll implement stereo or 16-bit so it should be fine as I've drawn it.

thejpster commented 5 years ago

Oh, and it turns out that the pull-down on the VGA R/G/B signals is never required - it's just not a thing. Might as well remove it.

I did find a very nice RGB video buffer chip, which would allow us to use a 75R resistor to get the source impedance right (improving picture quality and reducing signal reflections) - it can deliver the full 9mA you need for each of the red, green and blue channels, and has 50MHz bandwidth. But it's £10. Hopefully by keeping the traces short and using a decent VGA cable we we won't need it.

hannobraun commented 5 years ago

Done:

Next up:

hannobraun commented 5 years ago

Updated the Launchpad footprint, added other connectors to schematic and updated schematic to be more readable.

Updated my task list above.

hannobraun commented 5 years ago

Rebased my branch on master. Finished first draft of the schematic.

@thejpster I'd appreciate a review, if you have some time. It's not urgent. I don't expect to resume before Monday, and I'll be busy creating footprints for the various components then, before I can design the actual PCB. Here's the schematic as a PDF, in case you don't have KiCAD: monotron-pcb.pdf

hannobraun commented 5 years ago

And by the way, everything regarding that connector for the jumper wires is preliminary. I expect the pin allocation to change, as I design the PCB. Maybe I'll even split this up into multiple connectors.

thejpster commented 5 years ago

LGTM!

thejpster commented 5 years ago

If there's any chance you can squeeze in an SDMMC connector that would be ace. Otherwise I'll just buy a Sparkfun breakout board.

hannobraun commented 5 years ago

If there's any chance you can squeeze in an SDMMC connector that would be ace. Otherwise I'll just buy a Sparkfun breakout board.

I thought it over, and I decided I'll only look into it after I finish the PCB design as currently envisioned. I want to start manufacturing the PCB next week, and for logistical reasons (I don't have a laser printer for the toner transfer at home), that means I have to finish the design by Friday, or I'll have to wait another week. If I have time to spare, I'll include it in the design. If not, it'll have to wait for the second (post-conference) production batch.

hannobraun commented 5 years ago

Missing footprints have been added. Next up, doing the PCB layout!

thejpster commented 5 years ago

Ok, wow, you're actually making the PCB. I haven't done that since my technology classes back in 1995.

Your approach makes total sense. I look forward to the layout.

PS: I made a veroboard to try and fix my VGA noise issue and it didn't help. Let's try and keep the traces as short as possible :/

thejpster commented 5 years ago

Actually, as you have possibly the only other Monotron, did you see any noise on your version?

hannobraun commented 5 years ago

Ok, wow, you're actually making the PCB. I haven't done that since my technology classes back in 1995.

That's what I told you, didn't I? Do you think you're getting some half-assed service here? :-)

Actually, as you have possibly the only other Monotron, did you see any noise on your version?

Not sure. I didn't notice any noise specifically, but:

  1. Most of the time I was either sitting behind the monitor, or when I was in front, I was usually talking to people.
  2. The display went out really often, either because someone had moved in the general vicinity of our rickety connectors, or because the monitor decided to take a break and needed to be power-cycled. That might have masked other problems.

I haven't used the Monotron since FrOSCon. Don't have a VGA monitor here.

thejpster commented 5 years ago

I figured you'd just upload a Geber to oshpark like everyone else!

I might order a couple more Launchpads to get some test coverage - I currently only have 1 Stellaris Launchpad (which is fine) and one Tiva-C Launchpad (which is noisy).

hannobraun commented 5 years ago

I figured you'd just upload a Geber to oshpark like everyone else!

Well, I could argue that manufacturing in-house is much more flexible, and therefore better for prototyping. But seeing how the gear I need is spread all over the place and I can only access parts of it at different times of the week... it's better not to act as if this was a rational decision :-)

I might order a couple more Launchpads to get some test coverage - I currently only have 1 Stellaris Launchpad (which is fine) and one Tiva-C Launchpad (which is noisy).

I have two Tiva-Cs now. I'll report back once I had a chance to test them.

hannobraun commented 5 years ago

Okay, I'm done! Really ran out of time towards the end, so the PCB design turned into a bit of a rush job. I hope I didn't make any mistakes I can't fix in production.

Needless to say, I wasn't able to include the SD card connector. Let's tackle this for the next version.

hannobraun commented 5 years ago

I ran into an unexpected problem with the production process that I don't think I can overcome in time: The PCB is larger than the ones I've been working with before, and I can't apply pressure and heat evenly to it with the tools I have. I wasn't able to get the toner transfer to work under these circumstances.

I'm really sorry, but this means I can't make a PCB in time for Rust Belt Rust. There's simply not enough time left to do things another way, as far as I can see.

thejpster commented 5 years ago

Don't worry about it! I've got a veroboard here that should work fine for this week.

Would you like to:

I'd be happy to put an order in with a PCB fab house, but I'd rather avoid a second spin if at all possible as they're usually quite expensive for small orders.

hannobraun commented 5 years ago

Thanks!

This option please:

Wait until I've resolved a few more pinouts and then go all-in.

Now that the deadline is blown anyway, I can see no reason not to wait a bit until some of the pinout questions have been answered. This will also give me the chance to get some other work out of the way first.

As for production, I'm still very interested in doing that myself, but I see no way to make the toner transfer work for a PCB of this size. I can get access to a CNC mill, but I haven't milled a PCB before, so I foresee multiple iterations being necessary, and I can probably use the CNC every 1-2 weeks at most.

If you need a PCB soon-ish, outsourcing is your best bet, but do not use the current design for that. In my rush to finish, I left bugs in the design in that I planned to fix in production. If you need a PCB before I get a chance to update the design, let me know, I can make a quick fix.

thejpster commented 5 years ago

I can confirm the joystick pinout on C6/C7/D6/D7/F4. No pull-ups required - internal pull-ups work OK.

thejpster commented 5 years ago

Oh, I also have a €25-off voucher for Eurocircuits.com, if we think the boards are too large to get hand-made.

hannobraun commented 5 years ago

Oh, I also have a €25-off voucher for Eurocircuits.com, if we think the boards are too large to get hand-made.

I am relatively sure I can get the boards manufactured with my friend's CNC mill, so that's what I intend to do. That will be a long process though (I have limited access and some trial and error will certainly be required).

thejpster commented 5 years ago

How are you doing with this? If you've got other things on, I might have a crack and get a few made in China, just to get started.

thejpster commented 5 years ago

Also, I can confirm the SPI works for SDMMC but I think you need 10k pull-ups on some lines. I think my adapter had pull ups on all lines.

hannobraun commented 5 years ago

@thejpster

How are you doing with this? If you've got other things on, I might have a crack and get a few made in China, just to get started.

No progress recently, but more bad news on the manufacturing front: Turns out both copper and FR-4 are toxic in dust form, so milling them at my friend's house is out of the question (no dust collection on his CNC). Looks like having them made elsewhere is the only solution left.

I don't have loads of time to dedicate to this right now, but I should be able to update the design over the next 1-2 weeks, to get it ready. Do you have any news regarding pinouts?

thejpster commented 5 years ago

So, I thought I'd have a play in Kicad, to brush up my skills. It's been about four years since I tried to do a schematic!

https://github.com/thejpster/monotron/tree/jgp_pcb_launchpad is where I've got so far. It has a 25-way printer port, PS/2 for Keyboard and Mouse, MIDI In/Out/Thru, Joystick, VGA, SD-MMC and stereo/mono audio. The PCB layout is probably take me forever though.

hannobraun commented 5 years ago

Cool, looks like you finished it! Sorry I couldn't be more helpful. I had hoped I'd be able to finish by now, but no such luck.

Looks like this PR has become redundant then? Should I close?

thejpster commented 5 years ago

No worries! You provided inspiration and helped make it happen :) Yeah, let's close this one.