Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2 - Routed PCB #6

Closed
wants to merge 3 commits into from
Closed

R2 - Routed PCB #6

wants to merge 3 commits into from

Conversation

Ringel
Copy link

@Ringel Ringel commented Jun 10, 2019

Great project - to play with it, i've designed the board out of your schematic.
I've routed to 4" x 3.25" - 2 Layer board with 0.17mm Trace/Space width.

@kkszysiu
Copy link

Awesome @Ringel

@simon-jouet
Copy link
Owner

Thanks @Ringel I will have a look at that in a bit more details when i get some time this week :)

@simon-jouet
Copy link
Owner

simon-jouet commented Jun 23, 2019

Hey @Ringel going through the changes in the schematic, I've noticed the therm2 line that you've fixed, any chance you could point out the other changes you've made if you don't mind (so i can bring them in knowing what it is :))

I like the PCB layout, very few lines on the bottom plane which is great. I've got a few concerns though (some that might be irrelevant) but it's clearly a good start

  • The ESP32 placement should likely be in the corner in order to follow the design guidelines (https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf) not sure what the impact is
  • The current I2S lines are quite long as they cross most of the PCB, i'm wondering if this will cause some noise considering the frequency?
  • A bit the same for the USB line? not sure if that would be an issue but having the serial lines right next to the i2s lines sounds like a potential problem
  • To optimise the space I think J3/4/5 should be side by side like on RAMPS boards. I should probably have made a conn_03x03 symbol/footprint

And some other stuff that needs some thought from all of us :)

  • I don't know if the connector for power + mosfet should be on the edge, I was trying to avoid that previously because if you mount it on the side of a printer (for instance a prusa) then the wires going out will likely interfere with the motion. I like the big spade connectors which is why I used them on this PCB but they take a lot of space, I could go for the phoenix connectors are something like that but the proper ones are quite pricey and the fake are clearly overrated...
  • Should we put the huge I2S and esp32 breakout connectors (32 pins) on the edges? connecting anything to them if they are in the middle will likely result in quite a ratsnest.
  • Should we change the jumper connector for the 5V source of the LDO to use a comparator + FET like the arduino (not sure it's very much worth it?)
  • Might be worth changing the TPS560430 to something else. A friend of mine pointed that the current power budget is tight and that the 600mA from the TPS might be on the low side. (won't be an issue immediately but with a bltouch and other things it might) Any suggestions on a good and cheap buck converter? Could go with the LM2596 but it's quite bulky and we clearly don't need 3A (and it's not that cheap if you get the proper TI ones).
  • I've just pushed some tweaks to the board, added connectors for the mosfets (so we can test using them on the I2S pins easily) and added testpoints. Not sure the footprint I picked for the testpoints is the best one

Out of curiosity is this handrouted or you used an autorouter?

@Ringel
Copy link
Author

Ringel commented Jun 23, 2019

I've noticed the therm2 line that you've fixed, any chance you could point out the other changes you've made if you don't mind (so i can bring them in knowing what it is :))

Hello @simon-jouet. Mirror the jumpers J16-J20 and therm2 was the only schematic change - for further changes i've used my r3 branch.

I like the PCB layout, very few lines on the bottom plane which is great.

A good GND plane was one of my goals

* The ESP32 placement should likely be in the corner in order to follow the design guidelines 

Corner Placement might improve antenna performance, but makes escape routing for the side pins harder and costs some more precious side-space. But current placement respects at least the keepout areas.

* The current I2S lines are quite long as they cross most of the PCB, i'm wondering if this will cause some noise considering the frequency?

If we keep J6 it's easier to long-route I2S and serial. Having a closed GND plane, the should be minimal cross talk.

* To optimise the space I think J3/4/5 should be side by side like on RAMPS boards. I should probably have made a conn_03x03 symbol/footprint

For productive PCBs without J5/J8 it could be much more compact. I'd also prefer 5mm pitch screw terminals and micro USB to have more edge.

* I don't know if the connector for power + mosfet should be on the edge, I was trying to avoid that previously because if you mount it on the side of a printer (for instance a prusa) then the wires going out will likely interfere with the motion. 

The 24V should only be used at 2 L-shaped sides for clean routing - not interfering the inner PCB with 24V.
If the bottom side is used for the motors, the 24V input and FET outputs should fit on the right.

* Should we put the huge I2S and esp32 breakout connectors (32 pins) on the edges? connecting anything to them if they are in the middle will likely result in quite a ratsnest.

For productive version we should only connect unused pins to the connector - maybe ~15 pins from the shift registers.
An ideal PCB has all connectors at the side - maybe even angled to have a low profile. And nothing on top to interfere with the airflow of the driver cooling fan ;)

* Should we change the jumper connector for the 5V source of the LDO to use a comparator + FET like the arduino (not sure it's very much worth it?)

A diode from VUSB should be sufficient - to only draw current from USB if there is no 24V supplied. (e.g. for programming)

Out of curiosity is this handrouted or you used an autorouter?

Handrouted. Routing isn't the most afford - i use most time for placement ;)

@simon-jouet
Copy link
Owner

simon-jouet commented Jun 23, 2019

For productive PCBs without J5/J8 it could be much more compact. I'd also prefer 5mm pitch screw terminals and micro USB to have more edge.

The previous version used micro USB and I still have about 90 left from the previous batch but the issue is that the board is too heavy and the connector strip from the PCB and pull the tracks... That's why I went for a type B connector instead. A through hole (at least for the USB shield) micro B might be okay. I guess we could go for a type C connector too, it's the most resilient of all USB connectors and they are quite cheap now.

Any suggestions on the power connectors? We could do it the same way as the Duet use, it would save quite a bit of space compared to the current ones:

  • KF635 with 6.35mm pitch for the power in and the heatbed -- At the moment the power rail is split for the BED and the rest, we could have a single connector for the board but I do think two is nicer
  • KF128 with 3.50mm pitch for the heater/fan

For productive version we should only connect unused pins to the connector - maybe ~15 pins from the shift registers.

Yeah I agree with that, at the moment i'm exposing everything because it will be helpful to test stuff that isn't too settled yet. I guess we could do this one already as I doubt there won't be much at all to experiment with the stepper drivers.

Can you have a look at some of the other points i've made in the previous message, having your input will be helpful (one was about the power connector which you've raised here too). I think the next step would be to get a new board with most of those points addressed, so we can test out the remaining things (for instance running the mosfet from I2s) once that's done we should be able to make a more user friendly (and smaller) PCB. If you are keen on that, I could to give you access to this repo so we can keep working in one consistent place instead of having multiple forks that we need to sync :)

@Ringel
Copy link
Author

Ringel commented Jun 26, 2019

Hello @simon-jouet

I guess we could go for a type C connector too, it's the most resilient of all USB connectors and they are quite cheap now.

Type C seems to be best option ... found some 16 Pin ones that might fit.

Any suggestions on the power connectors? We could do it the same way as the Duet use, it would save quite a bit of space compared to the current ones:

4 Screw terminals for supply and bed should handle the current. Maybe KF7.62

At the moment the power rail is split for the BED and the rest, we could have a single connector for the board but I do think two is nicer

I'm always using only 24V fans/heaters - so single connector is fine for me.

* KF128 with 3.50mm pitch for the heater/fan

For the < 3A Outputs (heater, fans,...) Dupont connectors or JST XH (used by most fans) should be enough. A single connector could carry everything for the hotend/effector (2 fans, temp, heater, z-probe) - and could ease the wiring.

Can you have a look at some of the other points i've made in the previous message

We might need more current on the stepdown - maybe the popular TPS5430 for several amps.

I think the next step would be to get a new board with most of those points addressed, so we can test out the remaining things (for instance running the mosfet from I2s) once that's done we should be able to make a more user friendly (and smaller) PCB.

My r3 PCB's should arrive end of the week - using 2 of the i2s at 5V to drive the mosfets. Maybe i can even setup the display.

If you are keen on that, I could to give you access to this repo so we can keep working in one consistent place instead of having multiple forks that we need to sync :)

Merging shouldn't be that of a problem ... at least when the schematic is settled little more.

@vivian-ng
Copy link

vivian-ng commented Jun 27, 2019

I tried using the I2S outputs for LCD pins, but it doesn't work (at least, not for LCD_D4, D5, D6, D7 pins). I will see if I2S works for BEEPER, LCD_EN, and LCD_RS pins.

Update: Trying to use I2S outputs for BEEPER, LCD_EN, and LCD_RS pins didn't work too.

@simon-jouet
Copy link
Owner

I've pushed an updated schematic. It's now split into different sheets to make things cleaner

  • I've changed to USB C and designed the footprint for the one on aliexpress @Ringel linked (also ordered some)
  • The connectors used are now the same as the duet board
  • The board now has only one input for everything (still two fuses)
  • The buck converter is now a TPS5430 (thanks @Ringel for the suggestion)
  • I've added quite a few test point which should make things easier to debug
  • The I2S breaktout header now only includes the unused pins
  • Still need to change the breakout header for the ESP32 to simplify the routing

4 Screw terminals for supply and bed should handle the current. Maybe KF7.62

That's what I used in the R1 but people complained that the connector was too wide (I like it because we can use spade connectors)

My r3 PCB's should arrive end of the week - using 2 of the i2s at 5V to drive the mosfets. Maybe i can even setup the display.

Did you get your board :) ?

@vivian-ng Are you sure your I2s stream is working properly? I would have thought the LCD was slow enough to work with the i2s stream. Which pins are you using? You should likely use pins 16-32 (the third and fourth shift register) if you use the first two registers then it's expected for it not to work (because its used by the i2s stream for the steppers) -- read the i2s MR there should be details on the difference between the two channels

@Ringel
Copy link
Author

Ringel commented Jun 30, 2019

I've pushed an updated schematic. It's now split into different sheets to make things cleaner

@simon-jouet Great - stepper pinout seems to fit my r3, and everything from the discussion is integrated ;)

* The buck converter is now a TPS5430 (thanks @Ringel for the suggestion)

You might want to use the placement and copper planes from the example in the datasheet.

* Still need to change the breakout header for the ESP32 to simplify the routing

Yes - but your Placement looks quite compact - nice!

Did you get your board :) ?

Arrived yesterday ... but hadn't the time to solder it. I'll report if i can get it up.

@Ringel
Copy link
Author

Ringel commented Jul 1, 2019

Unfortunately i have ordered the 74HC595D with SOIC16 footprint - but have placed TSSOP16 footprint only fitting 74HC595PW.

@simon-jouet: Do you prefer the smaller 74HC595PW you placed too over the easier to solder (and source) but double the length 74HC595D?

Fortunately i've just found some 74HC595PW at ebay.

@simon-jouet
Copy link
Owner

@simon-jouet: Do you prefer the smaller 74HC595PW you placed too over the easier to solder (and source) but double the length 74HC595D?

I picked the tsop16 package at the time because pricewise it was the same and the tsop package is smaller. I think TSOP16 is still fairly reasonable to handsolder so I will stay with that for the time being.

I got 40 of them coming from aliexpress but I can see them in stock also in farnell/rs so getting a hand on some shouldn't be too complicated (on farnell they are actually cheaper by a fraction than the soic package)

Hopefully I get the routed PCB pushed this week, I'm almost there, mostly the routing around the ESP32 that's left to do/improve

@simon-jouet
Copy link
Owner

Okay I just pushed the fully router R2, hopefully there isn't too many mistakes... Just ordered 10 on JLCPCB for $5.45 (not sure how pcbs can be so cheap)

The 3d render if anybody is interested

Screenshot_2019-07-05_19-13-01

@Ringel
Copy link
Author

Ringel commented Jul 7, 2019

After fiddling with the pins-file i've got some progress in my r3 board running yesterdays Marlin/bugfix-2.0.x

  • Endstops are working

  • Temperatures are somehow working - 100°C are quite accurate.
    but disconnected shows 26°C and Ice-Water is measured between 30-50°C

  • REPRAP_DISCOUNT_SMART_CONTROLLER works with low contrast at 3V3

  • REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER needs 5V for proper contrast - but shows garbage.

  • SD Card works on both Displays - if ether powerd by 5V or 3V3 LDO on Display is shorted.

  • Steppers work most of the time
    Evey 4ms there is no Out-signal for 4 BLCKs
    Sometimes after a stop the steppers are continuously (very slow) driven - even after motor disable time there is an enable for 4 BLCK's with a step inside.
    Maybe there's something wrong when changing DMA blocks?!?
    @simon-jouet did you ever experience something like that?

  • Fan FET are't driven at all - there is just no signal in the i2s stream.
    Need to dig deeper in the left/right signal and Pin numbering.

  • had the wrong CH340G - USB doesn't work without oscillator for this part - maybe place some X/C as option.
    But having OTAUpdate running, i don't need the complex programming stuff any more and added an external USB-Serial stick.

  • Besides OTA the websocket-serial doesn't seem to work - maybe the website doesn't fit the server.

  • We should switch to 74HCT595 - these TTL ones accept high level of 2V even if powered on 5V as level shifters. The 74HC595 CMOS type need 3.5V (or luck) if powered by 5V. First thought the fans don't work because of that - but there is just no input signal.

Maybe we should close this PR ... and move discussion to another issue;)

@simon-jouet
Copy link
Owner

Temperatures are somehow working - 100°C are quite accurate.
but disconnected shows 26°C and Ice-Water is measured between 30-50°C

Temperatures above ~30ish should be working fine, the issue is that the reference voltage for the ADC is 3.3V but the ADC will still return the highest value up to around 3V IIRC so you can't measure low temperatures. I didn't put too much effort in that at the moment because not being able to measure low temps is not very critical.

Steppers work most of the time
Evey 4ms there is no Out-signal for 4 BLCKs
Sometimes after a stop the steppers are continuously (very slow) driven - even after motor disable time there is an enable for 4 BLCK's with a step inside.
Maybe there's something wrong when changing DMA blocks?!?
@simon-jouet did you ever experience something like that?

Considering the timing I would say it does sound like something to do with the i2s stream. I'm surprised you have no signal for 4bclks, I don't remember seeing this. Could be some changes to the HAL, I haven't touched it in a while. I will have a look see if I have the same issue. But before no i've never had anything like that although I don't have many hours printing over i2s.

Fan FET are't driven at all - there is just no signal in the i2s stream.
Need to dig deeper in the left/right signal and Pin numbering.

Someone might have modified the upstream HAL but IIRC in my latest commits the higher 16 bits of the I2S stream was the constant value. so you any pin 144+ should work for that (although that might depends on how Marlin does it, i can't remember from the top of my head). The easiest to test the upper 16 bits is to use M42 IIRC

Besides OTA the websocket-serial doesn't seem to work - maybe the website doesn't fit the server.

It definitely used to work at some point. I will try that when i get my board soldered (@Idorobots said it was working fine, in marlin #14345)

Yeah let's close the PR and we can start an issue do discuss that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants