Spark Logic

Is anyone interested in helping to make an Arduino Due which uses [edited:] a 100-pin STM32L471

lkcl Thu Sep 28, 2017 6:11 am

hi as i hinted at in the introduction hello here viewtopic.php?f=2&t=2629 i would like to (quickly) investigate the feasibility and viability of creating an Arduino Due compatible design which uses the 100-pin LQFP STM32F072V8T6.

the Reference Design from arduino.cc is in Eagle and is available publicly so it should be pretty straightforward and achievable. i’ve worked with the STM32F072 64-pin variant before so know what i’m doing, and love this particular series because it’s crystal-less and really really low cost. $1.66 in 10k volumes as opposed to (in the case of the ATSAM3X8E) more money than a quad-core 1.5ghz 64-bit ARM Cortex A53 processor can be bought for.

i’m aware that the 072 is only 48mhz: that’s absolutely fine for me, given that there’s a reasonable chance of hitting a BOM target that’s about the same as an 8-bit Arduino Mega 2560’s r3.

so the real question is: would anybody be interested in helping to do a feasibility study for the pinouts, help review the schematics and board designs (which i will continuously publish online – immediately – with each and every single modification made, because that’s what you do as a software libre and hardware designer) and so on.

even more than that, would anyone be interested to actually buy the resultant open hardware… or of course get it manufactured for themselves because it’s an open, libre project? the reason i ask that is, this is the arduino forum for stm32 boards… but the only boards i see which are arduino hardware-compliant are for the *uno* pinouts which was one of the very very early boards, and you only get a small range of pin-compatibility.

… and i would like to make a board that is FULLY compatible with the FULL pinout range of the *DUE*.

that would mean that people could use the FULL range of available Arduino-compatible shields in their projects.

Replies

zoomx Fri Sep 29, 2017 7:17 am

Can I suggest that the New Blue Pill will have a reset circuit like the Maple Mini?

RogerClark Fri Sep 29, 2017 7:27 am

[zoomx – Fri Sep 29, 2017 7:17 am] –
Can I suggest that the New Blue Pill will have a reset circuit like the Maple Mini?

I’m just entering the BP schematic into KiCad now

I’ll post to a github repo later. I think we can use a single P Channel FET for the rest.

The other problem with the Blue Pill and the Maple Mini clones is the lack of separate analog grounds. We should really address this as well.

Anyway, I’ll update the other thread later.

Edit. Actually I”ll look at the Maple Mini schematic and do a hybrid

lkcl Fri Sep 29, 2017 11:22 am

[RogerClark – Fri Sep 29, 2017 1:05 am] –
I agree about parts supply, but AliExpress are probably better than eBay in terms of the escrow, and getting your money back if the item delivered is not as advertised.

Still… Buying though AliExpress is not viable for actual production, its only useful for making reasonably priced prototypes.

they know this can (or will) happen… so that’s why they add a huge markup. also they have to pay someone specially who speaks (or can at least write) english….

my friend mike’s english (vast electronics) is extremely good, and he’s very conscientious as well.

anyway, main holiday coming up, lights are off in china, nobody’s home for a week… :) i mean it! except for maybe shenzhen, shanghai and beijing all other cities become 10%-populated ghost towns as everyone ups-sticks – the entire country – and goes to visit their family somewhere else. amazing.

lkcl Fri Sep 29, 2017 3:05 pm

ok so this is what i have so far, with the STM32L471VX. pinouts match great with the ATMega2560 with the exception of the 8080 MCU bus (which is normally bit-banged anyway),the Due with the exception of the timer channels on the end connector: the ATSAM3X8E simply has more timer channels than the STM32L471VX, and like the Due the CAN bus TX and RX is connected in place of ADC14 and 15.
Untitled1.jpg
Untitled1.jpg (49.91 KiB) Viewed 285 times

RogerClark Fri Sep 29, 2017 8:15 pm

I recommend you do your design in KiCad as its free and open source, and has symbols for STM32 component as part of the installation.

Then put your design on github so people can access it and potentially help by sending updates via PRs

lkcl Fri Sep 29, 2017 8:28 pm

[RogerClark – Fri Sep 29, 2017 8:15 pm] –
I recommend you do your design in KiCad as its free and open source, and has symbols for STM32 component as part of the installation.

i found some arbitrary tool online that converts ST’s bxl library files for the STML4 range into a suitable eagle part-generating script. quite neat (and totally excessive in size for what it actually does…) surprisingly such a tool doesn’t exist as software libre (not an easily found one, anyway).

anyway job done, schematic done and needing review, track layout about… 40% done: maan eagle is hard to use compared to PADS. just extremely relieved that the Mega Arduino Reference Design exists: i’m not going to touch the USB or power layout (at all), with the exception of adding that 800mA 5V to 3.3v LDO used in the Due.

what would _really_ be handy is a pointer somewhere to some arbitrary STML47x schematic, i’d like to make sure i’m getting the power provision right etc. does anyone know of one around anywhere?


Then put your design on github so people can access it and potentially help by sending updates via PRs

these are good suggestions… which anyone without the experience i have would follow immediately, as it’s a good way to collaborate and cooperate.

as a software libre advocate, someone pointed out to me about 5 or so years ago that github is a non-free “Service as a Software Substitute”: https://www.gnu.org/philosophy/who-does … ve.en.html

given that i was – still am – targetting designs for use by the software libre community (FSF supporters, and aiming for RYF Certification), there was no way that i could continue to hold a github account… so i had to close it. i maintain my own server(s), i’ve run and managed gitolite on many occasions, typically these days i just upload to an HTTP server, and use rsync to push the git repo there with a Makefile.

then, also, as a long-time software libre developer, my experiences with KiCAD – and they have been several over many years – have been so bad that i now absolutely flatly refuse to use it. at the beginning of the project that i started, six years ago, i made another major effort to design PCBs and schematics with it (libre project, like OpenMoko if you’re familiar with it). the results were that it actually destroyed several weeks of work, corrupting the libraries so that i had to maintain the library files *by hand* (manually adding and moving pins) and it also permitted hours worth of complex tracks to be removed… with f***-all warning that they were going to be silently destroyed (just after exiting and saving), completely without my consent.

on speaking with the developers they fixed… some… of the errors, but the remainder, which were absolutely critical for useability, they refused, after many many months of discussion, including input from other people, to deal with them.

consequently despite the fact that it is software libre, and i am a software libre advocate, i have a rule which is that i will make the effort (far more than i really should), but if the tool is not just user-hostile but the development team is both user-hostile and bug-report hostile as well, and, *more than that* it actually corrupts data and wastes your time…. then i have to draw the line and say no, sorry, i am not going to use it until such time as things massively – and i mean drastically – improve.

i do appreciate the pointer though. i am not a huge fan of using proprietary tools for libre projects: not even “monetarily zero cost” ones such as eagle.

RogerClark Fri Sep 29, 2017 8:30 pm

[lkcl – Fri Sep 29, 2017 8:16 pm] –
http://hands.com/~lkcl/stl47o/

git clone http://hands.com/~lkcl/stl47o/.git/ will create some sort of html page and point at a wiki at some point….

Cool..

I’m currently battling with the problem of getting a decent F4 device onto the much smaller BluePill form factor..
Not easy…

ChrisMicro Sat Sep 30, 2017 3:46 am

Just throwing in another thought:
I found it quite useful to have an micro-sd-card-connector directly on the board ( like on the F407black or some discovery boards ).
This could be another benefit of the F4-Due.
But I don’t know how this would increase the cost or if even there is some space on the board for this.
Of course the most important of the project: maximum pin compatibility to the Due and minimum software setup problems.

RogerClark Sat Sep 30, 2017 6:03 am

@lkcl

FYI. I’ve abandoned trying to shoehorn a F4xx onto the Blue Pill form factor.

Its basically uneconomic and inpractical for a number of reasons.

Anyway. Good luck with your board. At least you have more space and won’t need to resorting to 4 layer boards and exotic device packages in attempt to squeeze them in a 0.5 inch (12.5mm) wide space

lkcl Sat Sep 30, 2017 7:06 am

[ChrisMicro – Sat Sep 30, 2017 3:46 am] –
Just throwing in another thought:
I found it quite useful to have an micro-sd-card-connector directly on the board ( like on the F407black or some discovery boards ).
This could be another benefit of the F4-Due.
But I don’t know how this would increase the cost or if even there is some space on the board for this.
Of course the most important of the project: maximum pin compatibility to the Due and minimum software setup problems.

yehyeh, i found there’s a library (board variant) which already exists, which is neat.

yehh i’ve been exploring the 2560 and the due, and it’s fascinating: the mega2560 is amazingly clean. tracks come out dead-straight, go directly to the pins. the whole arduino board layout – headers particularly – was definitely definitely designed specifically with the 2560 in mind.

consequently, the due layout is a mess. they had to go to 0402 components to get them all on (power, the extra management micro-controller) but even the routing has to criss-cross underneath the processor, whereas for the 2560 it just goes pretty much straight out directly to the pins.

the stl47no is looking the same way: i’ve done my best to get the pinouts as close as possible but it’s the variety of functions that make that really hard.

about the on-board micro-sd card idea: i really like it! except…. i used the 100-pin variant not the 144-pin one and it would be a complete from-scratch redesign! whoops… :)

so, thinking it through: they didn’t put a microsd card slot on the 2560 because pretty much every pin bar 5 is used, plus the idea of the product is that you buy shields… therefore it has to stay as generic as possible. the due, they simply… ran out of space. i’m kiinda wavering in a nebulous way to sticking with the original principle: keep the board generic. that way, if someone wants to connect an eMMC chip or a full-sized SDCard “shield”, they can. really nice idea though.

lkcl Sat Sep 30, 2017 7:08 am

[RogerClark – Fri Sep 29, 2017 8:30 pm] –
[lkcl – Fri Sep 29, 2017 8:16 pm] –
http://hands.com/~lkcl/stl47o/

git clone http://hands.com/~lkcl/stl47o/.git/ will create some sort of html page and point at a wiki at some point….

Cool..

I’m currently battling with the problem of getting a decent F4 device onto the much smaller BluePill form factor..
Not easy…

i saw… :) keeping an eye on that thread too. care to post the occasional screenshot? [edit: oh! _that_ kind of battle! aww shaame… ]

lkcl Sat Sep 30, 2017 6:46 pm

okaaaay it’s official: possibly the untidiest board i’ve ever done. i’ve not done such large ICs on small 2-layer boards before: it’s definitely… an acquired skill, i get that distinct impression now :)

i’m going to try for a day or so to get GND into those void areas at the middle-bottom: that’s primarily the ADC tracks along the bottom. there’s space to fit three 0.1uF capacitors around the 417, but that’s down to good design by ST (the power and GND being on the corners).

Untitled1.jpg
Untitled1.jpg (193.31 KiB) Viewed 414 times

RogerClark Sat Sep 30, 2017 8:18 pm

Wow, that was quick…

Which CAD system did you use?

lkcl Sun Oct 01, 2017 3:38 am

[RogerClark – Sat Sep 30, 2017 8:18 pm] –
Wow, that was quick…

yyeahh…. i tend to just… not stop. in this case that meant working overnight. again. also, i made a deliberate decision to use the MEGA2560 reference design pretty much as-is: not even move the components that aren’t necessary to move, don’t add anything that isn’t unnecessary – i didn’t even touch the tracks as they came out of the original pin-headers unless it was absolutely necessary.

yesterday (was it yesterday? i lose track of time when focussing this hard…) i did the MCU pinouts by literally dropping the 417 as a “shadow” on top of the 2560, as a way to check what pins would best suit.

… the irony is: after connecting 25% of the pins i realised that actually the layout would be much much better if i rotated the 417 through 90 degrees… :)


Which CAD system did you use?

eagle. not my favourite. biiig climb-down from PADS. messes up my automated keyboard-and-mouse-don’t-have-to-think reflexes too :) even my ability to correctly and instinctively use zoom-in and zoom-out goes out the window! with PADS it’s very senslble: the mouse automatically jumps to the centre of the screen on every click. that’s *incredibly* handy and highly intuitive. eagle and other f***-wit programs: you have to think, “oh f*** where the f*** should i put the f*****g mouse to get the f*****g zoom to move what i want into the centre of the f*****g picture. f***!” :) [ha! might have beaten rusty russell for “most number of swearwords on one linux kernel commit line” there….]

lkcl Sun Oct 01, 2017 3:43 am

[lkcl – Sat Sep 30, 2017 7:06 am] –
[ChrisMicro – Sat Sep 30, 2017 3:46 am] –
Just throwing in another thought:
I found it quite useful to have an micro-sd-card-connector directly on the board ( like on the F407black or some discovery boards ).
This could be another benefit of the F4-Due.

about the on-board micro-sd card idea: i really like it! except…. i used the 100-pin variant not the 144-pin one and it would be a complete from-scratch redesign! whoops… :)

ok so i thought it through, chris… and i think it might actually be doable, because there’s 2 spare pins that i *MIGHT* be able to route without too much disruption: one can be used for CS, the other for CD.

with the fact that the CS line could be permanently disabled (off in software), functionality is not disrupted i.e. it doesn’t stop the board from being “arduino-mega-compatible” because… SPI is a shared bus with individual CS lines.

the MicroSD card can sit right next to the ICSP header… which coincidentally is right where SPI is… there also happens to be a 3.3v supply… so we’re good!

also… i checked: the entire left side of the board between the processor and the right-most pinheader (2×18) is entirely free of components with the exception of the RESET switch and that 6-pin ICSP (SPI) header. so… there’s actually room for a MicroSD card slot, yay.

also they’re only around $USD 0.30 in shenzhen so it’s not going to be costly: i have another project i’m ordering 1,500 for…

… so… good call man. will let you know how it goes.

lkcl Sun Oct 01, 2017 12:47 pm

hmmm… still struggling to find a schematic for the 471 with recommendations on how to do the XTAL. am i right in thinking that the 471 has auto-synchronisation from the 32.768kHz XTAL? that would be a nice feature.

lkcl Sun Oct 01, 2017 2:36 pm

https://list.tmall.com/search_product.htm?q=ch340g+IC

https://list.tmall.com/search_product.htm?q=FT232RL+IC

yowser what a massive price-difference. $USD 0.30 for the CH340G vs nearly TWO for the FT232RL. i’m staring at a china arduino 2560 clone wondering why they use the CH340G… not any more. hmmm i wonder where i could get a full board / schematic design which contains the CH340G… oh look! https://learn.sparkfun.com/tutorials/se … okup-guide ta-daaa, eagle files ‘n’all…

lkcl Mon Oct 02, 2017 9:15 am

hiya roger i wanted to create a wiki page for the stl47o, to document the pinouts – would that be ok? (reason i ask is, there’s no way to create an account named lkcl on the wiki. i assume you got fed up of harvesting spam….)

Sign in to reply