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

RogerClark Thu Sep 28, 2017 6:31 am

Welcome…

I’m curious why you chose the STM32F072?

Is this based on the cost of the processor.

From the specs’ http://www.st.com/content/st_com/en/pro … 072c8.html

Its RAM is only 16K, which is less even than the $2 BluePill boards. (STM32F103C8)

And, as you have already pointed out its only running at 48Mhz – which is again lower than the 72Mhz of the $2 BluePill

I guess the main attraction is the number of ports, on a 100 pin package ??

Most people seem to like using the BluePill as its cheap and powerful.

Or if they want more CPU performance people are using the F407, as it also has more RAM more Flash and more GPIO
(Well more of everything really)
The cost of the “Black” F407 boards is around $12 from AliExpress.

edogaldo Thu Sep 28, 2017 7:23 am

I do agree with Roger, I don’t think I could be interested in a lower value board just because it has a Due form factor.
Tip: why not thinking of a Due adapter for the existing and cheap F103/407 V/Z development boards?
There are some which are pretty popular..

RogerClark Thu Sep 28, 2017 8:15 am

[edogaldo – Thu Sep 28, 2017 7:23 am] –
…
Tip: why not thinking of a Due adapter for the existing and cheap F103/407 V/Z development boards?
…

I had the same thought

Probably based on a F407, as you’d need a F103V or a F103Z to get enough pins and they are the same size as costs as the F407VET6 boards

(though I don’t personally have anything that needs the Due form factor)

e.g.
https://www.aliexpress.com/item/New-STM … 4de7935aae

Mini-version-STM32F407VET6-development-board-Cortex-M4-STM32-minimum-system-board.jpg
Mini-version-STM32F407VET6-development-board-Cortex-M4-STM32-minimum-system-board.jpg (221.05 KiB) Viewed 908 times

lkcl Thu Sep 28, 2017 8:25 am

[RogerClark – Thu Sep 28, 2017 6:31 am] –
Welcome…

thanks roger


I’m curious why you chose the STM32F072?

as i’ve used it before and found it to be really good. other than that… as you can see below i clearly haven’t done full research yet :)


Is this based on the cost of the processor.

yes pretty much! and that it is crystal-less [syncs the clock to the USB lines – love that trick]


From the specs’ http://www.st.com/content/st_com/en/pro … 072c8.html

Its RAM is only 16K, which is less even than the $2 BluePill boards. (STM32F103C8)

*deep breath*…. and that’s nowhere near enough :) rats. i knew i was missing something. let’s investigate a bit more… look up the 100pin variant of the 103… and make sure that there’s even enough NAND for the target application i want (!) which is to port the RepRapFirmware… aaaand that means the STM32F103VD which is 64k RAM and 384k flash…

http://www.st.com/content/st_com/en/pro … 103vd.html

…. aaaand that’s $3.80 in 10k volumes meaning it’ll be about $5 from digikey.

nuts :)


And, as you have already pointed out its only running at 48Mhz – which is again lower than the 72Mhz of the $2 BluePill

I guess the main attraction is the number of ports, on a 100 pin package ??

for full Arduino Due compatibility it has to be minimum 100 pins, yes. otherwise you simply can’t populate all the pin headers, which defeats the object of the exercise.


Most people seem to like using the BluePill as its cheap and powerful.

looks like a good compromise, i have a thing for the STM32F072 64-pin variant.

Or if they want more CPU performance people are using the F407, as it also has more RAM more Flash and more GPIO
(Well more of everything really)
The cost of the “Black” F407 boards is around $12 from AliExpress.

yyehhh…. you see… an Arduino ATMEGA 2560 is around half that from the Huaqiang Road markets in nearby Shenzhen (i’m staying in Taiwan at the moment). i kinda have… an… objection to paying double for something :) btw Aliexpress sellers typically charge a *lot* more… because they know you’re from the West…

the thing is, even Arduino Due (ATSAM3X8E) boards are $USD 16 from factories in Shenzhen, which is a huge jump up from the ATMEGA 2560.

something _has_ to be available in the ST range which has say 384k Flash, 64k RAM and 100 pins that isn’t close to $4 or above just for the processor.

will take a look at the F407. i suspect that there’s an extremely common STM32 processor that’s used in Shenzhen which is ridiculously-lower-priced. i found the STM32F103RBT6 was only about $1.20 in shenzhen, five years ago for example.

thank you roger for prompting me to investigate.

lkcl Thu Sep 28, 2017 8:47 am

[edogaldo – Thu Sep 28, 2017 7:23 am] –
I do agree with Roger, I don’t think I could be interested in a lower value board just because it has a Due form factor.
Tip: why not thinking of a Due adapter for the existing and cheap F103/407 V/Z development boards?
There are some which are pretty popular..

it’s a nice thought… except the Due has some quite beefy power provision (an 800mA 3.3v on-board regulator, DC power in from 7 to 12v, on-board 5V power regulator) which people will be relying on. if i have to make sure that’s available, then looking at the example aliexpress board which uses the STM32F407VET6 (which is over $5!!) i might as well put that on.

plus, there is the issue of space. the Due has an SPI header which comes out right smack in the middle of the PCB (which is only… i think… 3.5in x 2.5 or thereabouts). fitting that adapter-STM32F407VET6 onto a converter board… it would have to be on the back, in order for shields to fit. actually it’d probably have to be on the back anyway.

if i am to design a board, all-round i’d just prefer to design one that has the processor on it.

so. under $4. 100 pins. 384k flash. 64k RAM. USB, CAN, PWM, ADC, DAC, SPI, I2C, UART… STM32F103VDT6 looks good! 72mhz as well.

http://www.st.com/content/st_com/en/pro … 103vd.html

let’s just verify that against the ATSAM3X8E…

http://eu.mouser.com/Semiconductors/Emb … =ATSAM3X8E

*deep breath*…. and i’m an idiot. that’s a 144-pin not a 100-pin, face-palm moment :) it’s also $EUR 6.75 in 1k volumes…

soo start again. under $4. *144* pins…. and there’s the STM32F103ZDT6 which is $4.18 in 10k volumes. Mouser has it down at $EUR 5.37 in 1k volumes… which starts to push the limit a bit, and undermines the exercise… hmmm…

there must be *something* out there which fits…

lkcl Thu Sep 28, 2017 8:56 am

ah ha! ST32F302ZD. 144 pin, $3.80 in 10k, 384k NAND, 64k RAM, USB, SPI, I2C, CAN, PWM, ADC, DAC… looks perfect on an initial cursory examination of the specs…

http://www.st.com/content/st_com/en/pro … 302zd.html

very very curious, why is this processor less money than the same 144-pin variant of the 103 when it’s supposed to be “better” (higher performance)? that always made me puzzled….

edogaldo Thu Sep 28, 2017 9:19 am

What could be the target price for this board?
Consider that on ebay you can buy chinese Due clones (with original SAM3X8E, MEGA16U2, etc) for 13$ each which grants you real full compatibility if you really need a Due board.

david.prentice Thu Sep 28, 2017 9:26 am

The F103 is a fairly elderly M3 chip. Its only redeeming feature is that Chinese BluePills and MapleMinis are very cheap.
It has been succeeded by much better M3 and M4 chips

If you want a Due replacement, you would be looking at a Cortex-M3 or M4 chip with similar number of pins to the elderly SAM3X M3 chip that is used in the Due.

The STM32L4xx series would seem the obvious choice. They can run fast when required and consume low power if necessary. As well as having large memory and good peripherals.

The F072 is a M0 chip with performance not much better than an AVR. Hardly a design for the future.

Having selected a suitable MCU, you want to think about which pins to route to the Digital and Analog headers.
IMHO, the Mega2560 assignments were crazy. Not a single XCKn pin is accessible for any of the four USARTs.
And the Due assignments are not very compatible with legacy MEGA headers.

If you address these design issues, it could be a viable project. If successful, it will be cloned by Chinese manufacturers.
You will receive nothing for your time and effort. The world gets cheap hardware. Much like the enthusiasm for BluePill.

David.

ahull Thu Sep 28, 2017 11:57 am

[lkcl – Thu Sep 28, 2017 8:56 am] –
ah ha! ST32F302ZD. 144 pin, $3.80 in 10k, 384k NAND, 64k RAM, USB, SPI, I2C, CAN, PWM, ADC, DAC… looks perfect on an initial cursory examination of the specs…

http://www.st.com/content/st_com/en/pro … 302zd.html

very very curious, why is this processor less money than the same 144-pin variant of the 103 when it’s supposed to be “better” (higher performance)? that always made me puzzled….

Also


…
ARM Cortex-M4 core with DSP and FPU
…
12-channel DMA controller
Two ADCs 0.20 μs (up to 18 channels) with selectable resolution of 12/10/8/6 bits, 0 to 3.6 V conversion range, separate analog supply from 2.0 to 3.6 V
One 12-bit DAC channels with analog supply from 2.4 to 3.6 V
Four ultra-fast rail-to-rail analog comparators with analog supply from 2.0 to 3.6 V
Two operational amplifiers that can be used in PGA mode, all terminals accessible with analog supply from 2.4 to 3.6 V
Up to 24 capacitive sensing channels supporting touchkey, linear and rotary touch sensors
Up to 11 timers:
…
One 32-bit timer and two 16-bit timers with up to four IC/OC/PWM or pulse counter and quadrature (incremental) encoder input
One 16-bit 6-channel advanced-control timers, with up to six PWM channels, deadtime generation and emergency stop
One 16-bit timer with two IC/OCs, one OCN/PWM, deadtime generation and emergency stop
Two 16-bit timers with IC/OC/OCN/PWM, deadtime generation and emergency stop
Two watchdog timers (independent, window)
One SysTick timer: 24-bit downcounter
One 16-bit basic timers to drive the DAC
…
Calendar RTC with Alarm, periodic wakeup from Stop/Standby
…

.. so all the STM32F302ZD is all round, a much better faster, more capable chip with loads more potential.

lkcl Thu Sep 28, 2017 12:26 pm

[edogaldo – Thu Sep 28, 2017 9:19 am] –
What could be the target price for this board?
Consider that on ebay you can buy chinese Due clones (with original SAM3X8E, MEGA16U2, etc) for 13$ each which grants you real full compatibility if you really need a Due board.

hiya edogaldo, yes i’m here in Taiwan, my friend in HK is going over the border to SZ to speak to factories, the 2560 arduinos are a *lot* less than $13 in the Huaquiang Rd markets (around the $6 mark), but he’s finding it difficult to get Dues there so went to a factory: they quoted $16 to him. this is all for a 3D printer: RAMPS 1.4 plus 4x A4988 polulu drivers plus Mega2560… $16. incredible.

anyway yes: given that the Mega2560 Arduinos are around $6 i’m generally… objecting to prices of $USD 16 :) i’d be very very happy to meet a target of $9 to $10 for something with an STM32F.

lkcl Thu Sep 28, 2017 12:43 pm

[david.prentice – Thu Sep 28, 2017 9:26 am] –
The F103 is a fairly elderly M3 chip.

ahh that would explain why it’s lower-cost

Its only redeeming feature is that Chinese BluePills and MapleMinis are very cheap.

hmmm… then it sounds even more attractive, as it means that it’s popular. popular means mass-produced prices. mass-produced prices gooood :) also it means that the software support (i’ve been a fan of libopencm3 in the past) will be stable.


It has been succeeded by much better M3 and M4 chips

If you want a Due replacement, you would be looking at a Cortex-M3 or M4 chip with similar number of pins to the elderly SAM3X M3 chip that is used in the Due.

The STM32L4xx series would seem the obvious choice. They can run fast when required and consume low power if necessary. As well as having large memory and good peripherals.

and an on-board FPU, darn. i like them… but… argh, the STM32L496ZET6 is $5.48 in 10k (which means it would be around… nearly $6.50 in 1k volumes) and the other one which would fit the requirements is the STM32L471ZET6 which is $4.68 in 10k volumes.

with those kinds of pricing it doesn’t quite justify the time and effort spent to end up with something *more costly* than an existing Arduino Due! :)


The F072 is a M0 chip with performance not much better than an AVR. Hardly a design for the future.

aww i know that noooow :) i didn’t quite realise quite how stark the difference is between the STM32F072 range and the others that are available.


Having selected a suitable MCU, you want to think about which pins to route to the Digital and Analog headers.
IMHO, the Mega2560 assignments were crazy. Not a single XCKn pin is accessible for any of the four USARTs.
And the Due assignments are not very compatible with legacy MEGA headers.

that probably explains why the arduino company itself stopped making the Due (or did i get that wrong? read it somewhere… my memory’s vague sometimes)

i did notice though that the 302 only has one DAC… i caaan… probably live with that.


If you address these design issues, it could be a viable project.

well, i’d really appreciate some input on pin-assignments. obviously they have to be compatible with a Due’s *main* functions, but these MCUs have multi-function, so there really should be a way to get decent pin-outs that keep people happy.


If successful, it will be cloned by Chinese manufacturers.
You will receive nothing for your time and effort. The world gets cheap hardware. Much like the enthusiasm for BluePill.

and when there’s cheap cloned hardware… i get to buy it! win-win! :) maybe they even cloned it correctly and didn’t botch it, in which case i can buy 10 of them in the markets for the target application.

ChrisMicro Thu Sep 28, 2017 4:37 pm

I think the huge afford to make such a board only makes sense if it has more features than an Arduino DUE.
This could be more memory or a higher speed.

I used the DUE. The big disadvantage is that it doesn’t have floating point.
My recommendation: take a MCU with floating point for your design.

lkcl Thu Sep 28, 2017 4:49 pm

[ChrisMicro – Thu Sep 28, 2017 4:37 pm] –
I think the huge afford to make such a board only makes sense if it has more features than an Arduino DUE.
This could be more memory or a higher speed.

I used the DUE. The big disadvantage is that it doesn’t have floating point.
My recommendation: take a MCU with floating point for your design.

that’s a good point, chris. i was focussing on price, not features. going the opposite direction (less memory, less flash, not more). about the FPU, you make a really good point, for example one of the things about RepRapFirmware is: it deliberately uses floating-point calculations even though the ATSAM3XE doesn’t have a FPU (Marlin firmware certainly can’t even attempt that as it’s designed for 8-bit MCUs).

sooOoo…. that would actually favour david’s suggestion, to use the newer 417. even if it’s $5.50 as opposed to $4.18 (10k volumes). if i cut out the “management” feature of the Due (the 2nd microcontroller and 2nd USB port) and you flash the STM32 directly (i do that all the time anyway), that gets some of the cost back.

hmm…. ok will find the 417’s datasheet.

lkcl Thu Sep 28, 2017 5:11 pm

david, chris: the STm32F471ZE is niiice. $4.18 in 10k volumes. Cortex M4, FPU, 128k RAM, 512k FLASH (there’s a version that has 1M), two DACs, 3 12-bit ADCs, PWM, SPI, UART – it even has SDMMC (niiiice). strangely it doesn’t support USB which, given that so many others in this range do seems… odd, but hey. an FT230 will sort that.. :) section 3.7 of the datasheet: DFU mode is accessible using UART, I2C, SPI and CAN.

section 3.9…. ADC/DAC from 1.62/1.8 to 3.6v… looks good… all other VDDs go up to 3.6v as well… yeah i really like this one.

lkcl Thu Sep 28, 2017 6:34 pm

http://www.engtaobao.com/item/556523180276.html

i checked the arduino mega, strangely that uses an 100pin not a 144pin… i also checked the equivalent of ebay… um…. $1.42 plus $1.98 shipping… yes these people are for real. no i am not going to buy from them. i’ll ask a friend to check pricing properly. because of this sort of thing, see photos https://world.taobao.com/item/555750494028.htm

note description, says “USB”… sigh…

RogerClark Thu Sep 28, 2017 9:53 pm

@lkcl

Rather than putting your effort into making a board that is physically compatible with the Due, I think there is a much bigger market for a F4xx version of the BluePill

There have been a few discussions about this, and there used to be a board available called the STM32 Stamp, which is very similar to what I am suggesting.

But AFIK, its not currently in production and was very expensive as it was made in small quantities in the USA

We have plenty of people on the forum, who are totally able to do the CAD as far as PCB, but AFIK no one has contacts in China who could get a board manufacturer eg. populated with components at the sort of prices that the chinese companies seem to be able to do it.

We would need a Chinese partner company who would do all the manufacturing and make the boards available on AliExpress, probably through multiple third party companies.

This would not give anyone outside China any fiscal return on investment, but we would get a board that would be very popular and most likely sell in reasonable quantities

Edit

STM32 Stamp details including Eagle schematic and PCB files are here http://eleccelerator.com/stm32f4stamp-breakout-board/

I looked at the specs on the F405RGT and the main reason its used on the STM32 Stamp as its one of the few F4 processors in a small footprint, but has less IO’s because of this

There is also the F415RG which seems to also have crypto, but I suspect there would be very little call for this by most Makers.

I can see 405RG’s on AliExpress for

https://www.aliexpress.com/item/STM32F4 … a1f23bab1f

US $4.25 / piece in quantities of 20, which isnt that bad….

lkcl Fri Sep 29, 2017 12:06 am

[RogerClark – Thu Sep 28, 2017 9:53 pm] –
@lkcl

Rather than putting your effort into making a board that is physically compatible with the Due, I think there is a much bigger market for a F4xx version of the BluePill

that would be interesting… i should mention that i have a chain of requirements which means i (personally) would need to go via the due form-factor first: i’m doing an upgraded (open) version of the RAMPS 1.4, because RADDS 1.5 (the closest thing to it) is… proprietary. *sigh*. and sourced from EU/USA (digikey / mouser). eurocircuits is damn good but when the components are 4-5x the price because of tax, shipping and middle-man markups….

however i’m more than happy to help (and perhaps start a different thread?)


There have been a few discussions about this, and there used to be a board available called the STM32 Stamp, which is very similar to what I am suggesting.

But AFIK, its not currently in production and was very expensive as it was made in small quantities in the USA

https://world.taobao.com/item/415598160 … 0b62jQ1bU1

$0.81 on the china-version of ebay, selling for around double that with actual components. mad. absolutely mad.



We have plenty of people on the forum, who are totally able to do the CAD as far as PCB, but AFIK no one has contacts in China who could get a board manufacturer eg. populated with components at the sort of prices that the chinese companies seem to be able to do it.

… for now!! living costs in shenzhen now actually exceed london: most chinese people are moving progressively further out. i was able to stay at a hostel for $5 / night until the police dropped by (cameras on the street corners…) and found that they’d not registered for foreigners… whoops.


We would need a Chinese partner company who would do all the manufacturing and make the boards available on AliExpress, probably through multiple third party companies.

yeah i can help with that for sure. i have my regular contacts – a friend (mechanical engineer) who lives in HK, he does QA and Sourcing. does destruct-testing to make sure that factories have enough fire-retardant in the plastic, electrical safety checks, much more besides. the other main one is Vast Electronics, young guy, just taken over from his father about 3 years ago, very very conscientious… but also like everyone right now REALLY busy until after the main holidays beginning october. basically that’s the time that everyone in the West rushes things ready for Xmas. so, mid-october he’ll be back, and a hell of a lot less stressed out and able to help immediately. beyond that i have a couple others.



This would not give anyone outside China any fiscal return on investment, but we would get a board that would be very popular and most likely sell in reasonable quantities

sounds absolutely great. i’ll need gerbers and a BOM to get some quotes.


Edit

STM32 Stamp details including Eagle schematic and PCB files are here http://eleccelerator.com/stm32f4stamp-breakout-board/

…. which are probably here! :) or i can generate them. can i suggest starting another thread for this one, roger?


I looked at the specs on the F405RGT and the main reason its used on the STM32 Stamp as its one of the few F4 processors in a small footprint, but has less IO’s because of this

http://www.st.com/content/st_com/en/pro … 405rg.html

woww that’s a nice set of specs. *shocked*… $5 in 10k volumes, what the hell is going if it’s being sold – on an actual board – in china – for $2 for??? uhn??


There is also the F415RG which seems to also have crypto, but I suspect there would be very little call for this by most Makers.

I can see 405RG’s on AliExpress for

US $4.25 / piece in quantities of 20, which isnt that bad….

well, the main thing is, buying using someone you trust because if they screw you and it’s already outside of china, it’s A a 30% taxable return item due to customs duty (or it will just… “disappear” at customs… had that happen…) and B as you’re not a chinese national they don’t actually have to do jack. agents (engtaobao) are good for this because their reputation is critically dependent on you not shouting loudly and publicly “i got ripped off!”

also… it’s uuuusually a good idea to use someone in china who can actually inspect the goods… otherwise they tend to go “oh uh yeah we couldn’t get that part cheaply any more…. so we just decided without telling you to totally replace the product with something else. are you phoning to place a repeat order? we’ll take your money nooo problem”.

*face-palm*….

[my friend in HK had to help out a client that bought USB sticks for the OLPC XO-1 laptops… samples no problem, first batch no problem, 2nd batch of 1,000… totally different IC, way cheaper… and not properly USB-compliant so the XO-1’s BIOS refused to boot off of them because… yeah long story….]

anyway yes, great idea. will have to wait a bit though, my friend delayed his trip back to the UK because of helping out SZ clients before the holiday rush. he’ll be back in… a couple of weeks, we can get some quotes then.

RogerClark Fri Sep 29, 2017 1:05 am

I’ll export the files from Eagle to KiCad and stick them on GitHub, and start another thread

Re: Manufacturing in China

I know a trustworthy company in China, who I have used to get a nRF51822 Bluetooth “SmartBeacon” manufactured in small quantities (100 off) for a prototyping and field trials…
But the cost of boards made by them, are a lot higher than companies like Vcc-Gnd seem to manage (probably because of volume, but also I don’t think they are quality for the special economic discounts etc that some companies in China seem to take advantage of)

I but I’ll see if I can get a quote from them to manufacture (even though they are mainly a design house, and actually sub contract any volumes more than about 10 items – which they hand reflow solder)

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.

RogerClark Fri Sep 29, 2017 2:05 am

Eagle2Kicad seemed to do a reasonable job on the schematic, but at the moment the PCB looks like it didn’t convert :-(

RogerClark Fri Sep 29, 2017 4:56 am

[lkcl – Fri Sep 29, 2017 12:06 am] –


There is also the F415RG which seems to also have crypto, but I suspect there would be very little call for this by most Makers.

I can see 405RG’s on AliExpress for

US $4.25 / piece in quantities of 20, which isnt that bad….

anyway yes, great idea. will have to wait a bit though, my friend delayed his trip back to the UK because of helping out SZ clients before the holiday rush. he’ll be back in… a couple of weeks, we can get some quotes then.

See http://stm32duino.com/viewtopic.php?f=1 … 999#p34999

Sign in to reply