Go Down

Topic: Creating a low-cost pin-compatible Arduino/Due board using an STM32L471 (Read 15726 times) previous topic - next topic

westfw

Quote
whoops, schematic's there, but the brd file is a zero-length file!
Grr.  Google Drive apparently doesn't like firefox very much.   Things went better with Chrome, and I've uploaded a combined .zip file...
Quote
i would have to learn how to [reshape board outline]   ... select two edges, right-mouse, select "stretch arc".
Draw new edge in "dimension" layer, use "miter" tool on corners.  Delete old edge...  (uploaded a "-rounded" version as well.")

lkcl

Grr.  Google Drive apparently doesn't like firefox very much.   Things went better with Chrome, and I've uploaded a combined .zip file...Draw new edge in "dimension" layer, use "miter" tool on corners.  Delete old edge...  (uploaded a "-rounded" version as well.")
awesome.  ok will take a look!

lkcl

Grr.  Google Drive apparently doesn't like firefox very much.   Things went better with Chrome, and I've uploaded a combined .zip file...Draw new edge in "dimension" layer, use "miter" tool on corners.  Delete old edge...  (uploaded a "-rounded" version as well.")
ok so that's committed and uploaded, went over it - really appreciated what you've done.

i did that re-routing around C19 (top left of MCU), i feel happier with the tracks top and bottom crossing at right-angles or 45.  also the GND connectivity to C19 was a bit... tenuous: moving the tracks around allowed me to put some better GND connectivity in, jumping several times between the planes.

put in the SMT switch (thanks for the suggestion!).  also i am a bit... funny about adding in GND VIAs, i think in 3D, so added some as a 3D barrier around the ADC traces where they come in to the MCU.  also there's some areas where i add them to join pieces of GND flood-fill together.  on one layer it's GND then track and on the other it's track then GND, and there's this little bit in between where you could fit VIAs in between and get a contiguous GND connection.

it's all the little bits that add up, y'know?

i also really appreciated that you managed to get some GND in between that right-hand connector pins, i was able to add some more in.

btw westfw, i put the GND/Power clearance back to 8mil not because i disagree that it should be (i haven't moved tracks closer) but because when tStop is enabled there's over i think it was 180 DRC violations (!) all on the MCU...

lkcl

aaaa the flood-fill changes if you alter the POW net class clearance!!! aaaa must remember to put them back to 10mil when doing the gerbers.

i reaaally don't want to have to hit "Approve" on over 180 DRC errors, i might miss one or two of them.  or ten.  westfw is there a way to do *component* level DRC like you can in PADS, Altium etc., do you know?

westfw

Quote
i put the GND/Power clearance back to 8mil
I meant to do that, but I got tied up when I forgot which one(s) had always been 10mil, and forgot to look it up.
I also didn't look at the DRC before changing things...
Hmm.  Ok, thanks to the backup files....  ALL the signal clearances were at 8mil, and when we return to that the only DRC warnings are for the mounting holes (on both original and modified versions.)
Quote
the flood-fill changes if you alter the POW net class clearance!!!
You can change the clearance of the flood separately from the signal clearance using the "change isolate x" command on the polygons.  I like the way it looks with a 14mil "isolation" parameter - that's nicely separate, but still floods between the connector pins.
Quote
is there a way to do *component* level DRC
not that I know of.

lkcl

HA!  found one.  http://www.engtaobao.com/item/559452178207.html

STM32F070F6.  i think this might have been the one you were referring to, westfw, and i got it confused with the 072.  this guy on taobao, very sensible: each one is USD $0.16... he then charges USD $28 for shipping (flat-rate).   so... buy 1,000 and you're good.  buy 10,000 and you're laughing.

what that means is though that i'd stand a good chance of getting it reaaally cheap in the huaqiang road markets.

even the prices on ST's web site - $0.50 or so for 1k volumes - are good.  crystal-less USB operation, UART, GPIO, SPI.  i could put up with that.  hell i'd be happy to try to run the SPI wires over to it and wire up SPI and a CS to that last remaining GPIO on the 471, try making it a slave SPI device to get better data-rates when communicating on its USB interface.  up to 18 mbits/sec full duplex where the USB interface actually only goes up to 12.

the only thing: it's not OTG, it's plain USB.  but still, plain USB is better than a kick in the teeth.

ha, connecting it to the SPI interface would allow direct boot-level reprogramming of the 471.  HA!

still owe you a reply on your last message, westfw - haven't forgotten about it.


lkcl

argh!  did... did this just appear in the past couple of weeks? http://www.st.com/en/microcontrollers/stm32l496ve.html  if not.. how the heck did we manage to miss it??

[edit] anyway... thought about it... it's too modern.  pricing on taobao is higher than st's own distributors.  plus, for an auto-reset/boot0 you still need an extra MCU/USB-UART IC to manage it, even though it has native OTG.  arrangement would have to be similar to the due (dual OTG interfaces) and that's a big redesign (too big).

so... stick with this design for now.  bit of a surprise on the STM32L471 datasheet: not only is it missing USB it's also missing an SPI-based bootloader.  looks like there were a few screw-ups at ST during the fab / layout on this one.  all the other ICs in this family/range have OTG and SPI-boot.. hmm....

lkcl

I meant to do that, but I got tied up when I forgot which one(s) had always been 10mil, and forgot to look it up.
I also didn't look at the DRC before changing things...
not a problem.

Quote
Hmm.  Ok, thanks to the backup files....  ALL the signal clearances were at 8mil, and when we return to that the only DRC warnings are for the mounting holes (on both original and modified versions.)You can change the clearance of the flood separately from the signal clearance using the "change isolate x" command on the polygons.  I like the way it looks with a 14mil "isolation" parameter - that's nicely separate, but still floods between the connector pins.
cool.  well, i left it at 10mil and it seems to be ok.  the 180 DRC errors seem to have gone walkies..

anyway i'm going over the board again and again (i tend to do that), dropped in that F070 and it looks really good.  noticed that CANTX/RX are also ADCs but go up to the top of the MCU so tried to get a bit of GND around them...

man the pins disappeareed fast on the F070!  there's 3 GPIOs left.  i really should wire up the SWCLK/DIO to the F070, that would be neat: allow remote-debugging over the serial link, like with the NUCLEO boards.  however doing so would disrupt the GND plane which is already quite dicey around C19.

just noticed another bit of parallel-tracks that need moving... does this ever end? :)

westfw

Quote
STM32F070F6
I don't think that it allows crystal-less USB operation, though.  :-(  Sure fits nicely, though (SSOP20 vs SOL16, eh?  Interesting the way that works out.)
flip/pinswap the reset switch so the reset signal doesn't have to snake around so much?  Or is that intentional?
I'm a little worried about the uSD card having room to slide out...

Newer Arduinos have simplified the op-amp part to only use a single op-amp, which would theoretically permit use of a smaller package.  (OTOH, they're using the send opamp as a buffer for the L led.)



lkcl

I don't think that it allows crystal-less USB operation, though.  :-(
*deep breath*.... argh you're right.  i remember looking at the 64-pin F070 and then selecting the 64-pin 072 instead ... then forgot that the 070s don't operate crystal-less argh. 

Quote
Sure fits nicely, though (SSOP20 vs SOL16, eh?  Interesting the way that works out.)
yeh it does... but ngggggh the extra cost of the crystal takes the BOM up to around $0.70... is it worth it?  i'm tempted to say yes.

Quote
flip/pinswap the reset switch so the reset signal doesn't have to snake around so much? 
Or is that intentional?
the 5th pin on the switch means i'd have to move the ... no it doesn't: managed to shoe-horn it in.  will update.

Quote
I'm a little worried about the uSD card having room to slide out...
i think it'll be ok.  those components aren't that high (R8), LED (marked PWR).  if nothing else the uSD card will go over the top of them.  if there was a 1206 capacitor or a pinheader i'd be concerned.

Quote
Newer Arduinos have simplified the op-amp part to only use a single op-amp, which would theoretically permit use of a smaller package.  (OTOH, they're using the send opamp as a buffer for the L led.)
... because it's there, most likely.  any schematics around that you know of that i can copy?  is it worth shaving the cost by reducing down to a single op-amp? (answer's yes...) so have to find a single-channel op-amp... what's equivalent?  LMV321? http://www.ti.com/lit/ds/symlink/lmv358-n-q1.pdf says so...

although it doesn't look very much lower in cost!! http://www.ti.com/product/LM321  $0.19 in 1k volumes...

UA741 http://www.ti.com/product/UA741 is $0.12 that's better....

honestly the last time i used op-amps was at school, and that was... um... 1985? :)   help!




lkcl

found one - https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

uses a resistor divider, 2x 10k resistors, through the op-amp... onto the gate of aaa.... FDN340P which is a..... single P-channel MOSFET.  hey it's the same one already being used. 


err... errr.... that's what's in the PDF of the mega2560 schematic!  damn it this sort of thing pisses me off: the reference design that arduino.cc released (the actual eagle files) are hopelessly out-of-date.  yes you can just cut the 2nd gate completely out of the circuit.  ngggggh.

ok so that's done... but i'm still really uncertain about what (low-er cost) single-channel op-amp to put in its place?

zoomx

UA741 http://www.ti.com/product/UA741 is $0.12 that's better....

honestly the last time i used op-amps was at school, and that was... um... 1985? :)   help!
uA741 is very old maybe in 1985 you used it !

westfw


Quote
that's what's in the PDF of the mega2560 schematic!  damn it this sort of thing pisses me off: the reference design that arduino.cc released (the actual eagle files) are hopelessly out-of-date.
When and where did you get your copy?   The versions I see now at https://store.arduino.cc/usa/arduino-mega-2560-rev3 look updated and current.


Quote
uncertain about what (low-er cost) single-channel op-amp to put in its place?
LMV321 ?  Seems to be available from several vendors, and on ali-express for cheap.  Beware the non-V version, which isn't a rail-to-rail-y.

lkcl

When and where did you get your copy?   The versions I see now at https://store.arduino.cc/usa/arduino-mega-2560-rev3 look updated and current.
can't remember.  off the arduino.cc web site, about... 7-8 days ago?

Quote
LMV321 ?  Seems to be available from several vendors, and on ali-express for cheap.  Beware the non-V version, which isn't a rail-to-rail-y.

ah good advice.  yeah i just saw the LM321, was going to use that... will make sure it's the LMV321.  eagle std libs has the LMV321M5 https://www.digikey.com/product-detail/en/texas-instruments/LMV321M5-NOPB/LMV321M5-NOPBTR-ND/270736 *splutter* $0.38 in 1k volumes? that's _got_ to have been cloned to be at such low prices on taobao...

ok so added a 12mhz XTAL on the STM32F070 - still cut up about that... LMV321M5 replacing the LM358... nearly there.

lkcl

uA741 is very old maybe in 1985 you used it !
yeah more than likely :)  it was lab equipment, bright orange metal case, 10in x 5in x 5in triangular, with the circuit diagram on the front, and this tiny DIL IC plugged into a socket and those huge jump-leads so we could do experiments in the lab plugging in wires instead of burning ourselves with soldering irons.

.... then in the corridor was *VICTORIAN* era equipment!  stuff that went round in sunlight, a tube that lit up when you connected it to a van-der-graaf generator (yeah we had one of those - it was hilarious when it zapped our teacher in the head with a metre-long spark after he left it running for too long...), and a wheel made of two counter-rotating bits of plastic with metal strips on the outside that is only really now known by "conspiracy-level" theorists for generating electricity... but we actually had one in the lab.  stonyhurst college is really... old.  they also had (have?) one of the UK's longest-running active volunteer earth's magnetic field measurement sensors, providing information to the MET office on a weekly basis.  amazing place.  i was very lucky.

Go Up