UNO Upgrade using the STM32F103TBU6 as a 328P drop-in replacement

firebirduino
Sun Apr 10, 2016 1:45 am
Hi every one,

I am new to the STM32F, your site has offered a lot of info. for newbies and will shorten my learning curve.
I am very grateful to you guys’ work, especially Roger’s tremendous effort to carry on Maple’s legacy. Let’s cheer that Maple’s inspiration will never die.

Inspired by MarkM’s work with other members’ enthusiastic help, I made a UNO Upgrade using the STM32F103TBU6 as a 328P drop-in replacement, hope it can be one of our community boards that everyone is able to make or sell. For sure that it cannot compete with a $4 board in price, but the small size and 328P drop-in feature may be good for some applications that other boards cannot do.

The schematic is based on MarkM’s work and it can be downloaded on this site: http://www.firebirduino.com/mind/index.html,
The Gerber files are available at Oshpark: https://www.oshpark.com/profiles/Firebirduino

Hope knowledgeable members help me out if there are errors or offer suggestions. I have a question and hope to get the answer:
I added a 4-pin SWD header to follow the Blue Pill, but why the /RESET pin is not included on the header?

I tested it with my USBDM programmer and it worked OK, so I assume that the hardware is OK, but I have not installed a bootloader. I am taking a 2 week vacation this weekend and will try to do it when I am back on May 1. If someone could point out some links for programming the correct bootloader into this module I would appreciate it very much. I have a ST-link/v2. The D13 LED is on the PA5, like the Maple, not the Maple Mini.

Ray, nice to meet you here, we all know that Bob makes many great products, I was going to use his pinmap for my 1284P boards, it’s very easy to do since there are not much differences, but his products were not claimed as open source, my friends did not recommend it, I went along.

Hope I can contribute more hardware here in the future.

Wayne.


mrburnette
Sun Apr 10, 2016 2:14 am
Wayne,
Wow! I’m @airport awaiting return of the one who must be obeyed, but was browsing on my Samsung Android when I read your post. Pretty amazing… I will have to pull the schematic and review further … but dude, way cool.

I too thought Bob’s layouts were open hardware. Surely the pin map file is open source as his original was “fixed” by many hands. But when in doubt, avoidance is prudent, so you were advised well IMO.

Welcome.

I have some junk stuff I messed around with out on http://www.hackster.io/Rayburne/ a few are STM32 projects.

Ray


firebirduino
Sun Apr 10, 2016 4:18 am
Ray,

It’s great to be connected to you again. Very impressed with your HAD projects, so many of them. It will take a long time for me to check out every project. I am wondering how much time you had to spend on software. Hardware is a lot simpler nowadays. I think that the STM32 is a great family if not the greatest. Did not expect leaflabs would give up. Fortunately Roger took it over.

I hope that you and other knowledgeable members offer advices to make this a better product for our community, make it work with all libs better. We can use smaller SMD parts, like 0201 and micro USB and SMD crystal, make it more manufacturable, Roger can ask Baite or someone locally to make and sell it at $5-$6, so we may have a good platform like the Arduino ZERO using the existing UNO boards, but much faster and much cheaper.

Another question, should I leave the PB2 (BOOT1) open or add a pulldown resistor? Does the bootloader enable the internal pull down?

Wayne


RogerClark
Sun Apr 10, 2016 7:16 am
@wayne

The board looks fantastic.

I think what you need is a custom bootloader, which implements the same protocol as the Uno.

I know @jcw was working on a bootloader which used that protocol, but used USB Serial, rather than the data coming in from Hardware Serial / USART 1.

https://github.com/jeelabs/embello/tree … s/usbserup

So perhaps it would be possible, to modify it.


zmemw16
Sun Apr 10, 2016 2:08 pm
@wayne
+wow

shields ? ?
it might be a height reduction to use right angle header for the swd, maybe running a second line of
connections on the inside edge ( with rt angle hdr or even some 2 row rt hdr) for maybe spi2 i2c2

hobbytronics did a ‘similar’ thing using atmega1284 with a much bigger pcb :(

http://www.hobbytronics.co.uk/arduino-u … d=mega1284

it added a few other i/o lines istr
if i have a Uno/Nano/Micro etc with unpopulated 10,8,6 sockets i’ll use the stackable version and that allows sandwich type shield usage, 1 up, 1 down etc and allow connection using breadboards.

still wow++

stephen


mrburnette
Sun Apr 10, 2016 3:14 pm
[quote=”firebirduino”
<…>
I am wondering how much time you had to spend on software. <…>[/quote]

Wayne, I do not spend a lots of time on software “coding” at a keyboard. I do tend to day-dream a lots about problems and how they could be solved. Quality time spent in the family room is often spent with the wife on her Kindle, the big-screen on but really only watched as a “polling operation”, and me reading on my tablet. I also have a nice gift of Bluetooth full ear headphones that I wear sometimes when I watch YouTube technical channels. :lol:

But at the keyboard time coding? It depends on the project. I turned out the barometer project in no time, but I spent a good deal of time mapping the data to the ILI9341 GLCD and then to the Nokia GLCD. The algorithms were essentially the same, but the aesthetics are what take time. I simply have no personal idea of how much time I spend, maybe the term “more than a little” is the most appropriate answer.

Another question, should I leave the PB2 (BOOT1) open or add a pulldown resistor? Does the bootloader enable the internal pull down?

Good question. I only work with the Maple Mini, and PB2 is open ended on J1. Blue Pill / Red Pill members may have an opinion on this … If so, I hope they chime in!

Ray


martinayotte
Sun Apr 10, 2016 3:26 pm
About BOOT1, in the case of my STM32F405Stamp, it is directly connected to GND. In the case of Netduino2Plus, it is connected to a PullDown, since the pin is also used as a GPIO output to control power. In my own designs, I’ve also used a pulldown, and use the pin as GPIO to send reset signal to external peripherals such as ESP8266.

firebirduino
Sun Apr 10, 2016 6:59 pm
@Roger,
Thanks, hope jcw can finish it. I will contact him if he would like to manufacture it. One time I remember that I read something about someone would like to make a commercial offering for his board. Don’t remember who was. I could co-design some more boards with someone, like an RET6 module that you like, or a F415 module, in Teensy pinmap, but if no body makes and sells, it will only be my show and tell which is OK because it’s a hobby, but I really want more people to use them and don’t care about who will make.

The module also has a USB jack, can it work like the maple mini or pills? Is that bootload available somewhere?

@zmemw16
Thanks, the right angle header is a good idea. I will change the picture.
Adding another row of header pins may be a problem to implement due to the tight space. The 0.1 header is big.

@ray
You got be good in software. My software skill has diminished over years, only have a pulse in hardware. Software needs smarts, one bright young fellow can change the world from his basement. Hardware needs more in hand-on experience.

@martinayotte
Thanks for the valuable info. According to your info. I will add a weak pull down on the PB2, for the existing PCB, if needed the pull down can be added off module since the PB2 is available on the Arduino signal D7.

Wayne


RogerClark
Sun Apr 10, 2016 9:34 pm
wayne

I’m not sure if the bootloader will work with the F103T, but I think it should.

Try downloading the generic F103C version of the bootloader from my github account and flash the bin file onto your board.

The but I didnt check your schematic to see if you have the pullup resistor on the USB that is needed to perform the usb reset.

If the board does not have the pullup, you will only get the DFU device and it will not switch to the serial device when the sketch runs.


firebirduino
Mon Apr 11, 2016 6:13 am
Thanks Roger,
Yes, it has a pull up.
Wayne

RogerClark
Mon Apr 11, 2016 7:21 am
OK

Try https://raw.githubusercontent.com/roger … 0_pc13.bin

But, I may need to do a version of the bootloader for your board


mrburnette
Mon Apr 11, 2016 12:30 pm
If the board does not have the pullup, you will only get the DFU device and it will not switch to the serial device when the sketch runs.

firebirduino wrote:Thanks Roger,
Yes, it has a pull up.
Wayne


Slammer
Mon Apr 11, 2016 4:29 pm
Looking the circuit from V-USB, I remembered one more omission of Bluepill, there is no diode from USB 5V to VCC pin. It is very important when you apply external voltage to circuit as there is possibility to burn the USB port of computer.
In Bluepill the USB power is always connected with 5V (pin and regulator).

firebirduino
Tue Apr 12, 2016 1:31 am
Thanks Roger for what you have done.
It was lightning fast.

Thanks Ray,
Yes, the pull up is 1.5K.

Thanks slammer,
Yes, a reverse protection diode is added.

Wayne


ahull
Tue Apr 12, 2016 11:51 am
Looks good.

http://www.firebirduino.com/mind/index.html

Image

Image


mrburnette
Tue Apr 12, 2016 12:12 pm
It has been a long, long time since I have used a full-size UNO board… but I still have one in periodic use:
https://flic.kr/p/EbotHr
The ZIP socket Arduino ISP programmer.

But, back to Wayne’s design … I just think it is so cute :idea:
I so wish it were available 2 years ago.

Ray


firebirduino
Wed Apr 13, 2016 1:32 am
@andy,
Thanks Andy. I haven’t try to learn how to post sch and pictures.

@Ray, yes, it may be than 3 years late in term of timing. Now It’s just for anyone to try and do whatever he wishes. Open source, no permission is needed.
Thanks,

BTW, Does anyone know which 64 pin or 100 pin chip is most supported by the current software? I want to make a board using that chip, so Roger doesn’t have to change much software. It will be open source.
Thanks,

Wayne


RogerClark
Wed Apr 13, 2016 1:48 am
[quote=”firebirduino”BTW, Does anyone know which 64 pin or 100 pin chip is most supported by the current software?[/quote]

All STM32F103 devices are supported, i.e F103T to F103Z

Which device did you want to use ?


martinayotte
Wed Apr 13, 2016 1:57 am
firebirduino wrote:
BTW, Does anyone know which 64 pin or 100 pin chip is most supported by the current software? I want to make a board using that chip, so Roger doesn’t have to change much software.

RogerClark
Wed Apr 13, 2016 2:17 am
Martin

Interesting idea

A small package F4 chip would certainly be an interesting upgrade to a Uno board !

But the cost of the processor alone is around $10, so I’m not sure how many people would be willing to pay that price.


firebirduino
Wed Apr 13, 2016 4:00 am
@Roger, F103 may be 1-2 years too late, but still have many years of life left. Hey, some schools are still teaching by using the 8051. If that’s the one can save you software burden, I think I should do it. I don’t know which one part, that’s the reason I asked. Can you give me a full part number?

@martinyotta, I looked at the netduino, their UNO form factor boards are great and kept upgraded, but the DIP package is too old when I saw it last time, and has not been upgraded, I was thinking about making one for donating to their forum in the second half of this year, but if there is a demand on this forum I can do it here. A small F4Stamp is doable, but who would like to take charge of software to make it a complete product?

@Roger, if the chip is $10, there will be a reason, there must be applications that have to pay that price. The other parts in high volume are very cheap, main cost is the labor, so the manufacturability is the most important. The hardware is not a big problem, the software and sales are. I don’t like to sell low priced items, but like more people use my work. If you can assemble a team for a web company, you are the manager, plus some software engineers and hardware EEs and me as your board designer. We may be able to crack up some good products. If the products are good enough Seeedstudio can manufacturer and sell them. The profit can be put into a fund for prizes of the future STM32duino competitions and cover some expenses, you guys can be judges. Higher prize, more people may join this forum. How would you think? I have teamed up with Roger Schaefer. http://www.rasmicro.com who is an embedded control veteran and has a lot for experience in Arduino and NodeMCU, but our team is too small.

I have a stable small business in academic field, but it can keep me above water even I spend some money for prototypes and failed. It won’t kill me. I am doing this for fun, and for open source. I may help my business also, you never know.


firebirduino
Wed Apr 13, 2016 4:11 am
Sorry Roger,
I did not read your post carefully. The S10 device won’t go to a UNO board. It will go to a different form factor. I don’t think there will be much benefits for using on a UNO board.

Wayne


RogerClark
Wed Apr 13, 2016 4:23 am
Hi Wayne

No worries.

Its just I’ve noticed that approx 90% of the people on the forum use F103 and only around 10% use the F4

As cost seems to be a big issue for people. For most people the 72Mhz and 128k Flash 20k ram on the F103CB is a great leap up from the ATMega328 and generally does all they want it to do, and more ;-)


firebirduino
Wed Apr 13, 2016 5:33 am
Hi Roger,
Putting the 48 pin F103CB into the UU is doable if we can eliminate the digital ground pin and combine it into the analog ground pin. It will unblock the chip. At this moment if you see that the 44 pin 1284P on the UU-1284P is dead blocked up by two headers, cannot be rotated even a few angles.

If I post schematic and Gerber files on Oshpark, then what will happen after that?
I will only make 2 prototypes, that’s it, I will be done, can anyone volunteer to make 25 of them with reflows? and sell them to members?
To help reducing cost, I can offer all parts for free, except MCU, PCB, crystal and 1.27mm headers, because those parts cost me almost nothing. I have many SMD reels not wanted to be used because they only have a small number of components left.

After that, who is going to manufacture and sell? I don’t want to get involved, but don’t want to see it’s sitting and becomes one more show and tell item.


RogerClark
Wed Apr 13, 2016 5:56 am
Wayne

AFIK

Ideally the grounds would be separate, But…. a lot of boards just connect them together.

So as your board needs to fit into a small space, I think its a compromise worth making.


firebirduino
Wed Apr 13, 2016 6:29 am
Roger,
OK, if that compromise works for the F103, it’s doable if you can give me the Arduino pin assignment.
I will lock the D0-D1, D10-D13, and A4-A5, but I have freedom to change the pinmap among D2-D9 and A0-A3 if I need.

I assume that you will take care of software issues, and someone will make and sell 25 units. If nobody wants to make a sell? what you are going to do with it?

I made the UU-MIND because I thought that the chip comes with a factory installed bootloader that will talk via the UART, even saw someone used a FTDI, maybe that was not for the F103 chip.

Wayne


firebirduino
Wed Apr 13, 2016 6:37 am
Sorry, had errors,
A few angles meant “A few degrees”.
nobody wants to make a sell meant ” nobody wants to make and sell”

Wayne


RogerClark
Wed Apr 13, 2016 7:03 am
Hi Wayne

We could make a new board variant, e.g. “firebirduino” which maps the conventional Arduino pin numbers to the specific Port/Pin number you need to make the PCB design work


firebirduino
Wed Apr 13, 2016 7:50 am
Hi Roger,
OK, Please gave me the pinmap as soon as you can. Hope to decide the netlist this week. In the nest 2 weeks, I may not have internet access.
Don’t call the board firebirduino, firebirduino has many other boards in recent years, call it Maple Never Die.
Tomorrow hope other members can chime in about making and selling.

Hi martinayotte,
The Maple Never Die is a relatively quick job. After it’s done, let’s do a small F4stamp in the Summer while I will be doing a Arduino, pi-zero and NodeMCU trainer (The NodeMCU is one of Roger Schaefer’s favors). When I am bored with one board, I can switch to another.
The mini F4stamp will be easier in layout, because I will have freedom to assign pins, just put the chip in the middle and bring signals to the edges. But overall time may be longer because more pins and more labels to place. Documentation type work.
Would appreciate if you could prepare something to help, even it’s based on your project. If it works for you, it got be working for others.


RogerClark
Wed Apr 13, 2016 7:55 am
Hi Wayne

You need to choose the pin mapping

e.g. if you look at the Maple mini

https://github.com/rogerclarkmelbourne/ … /board.cpp

The pin numbers are mapped to the STM port and pin using the PIN_MAP array

So

Just let me know what pin map suits you best, and I will make new variant with that PIN Map


firebirduino
Wed Apr 13, 2016 8:18 am
Hi Roger,
That’s even better if you can change software to match my pinmap, then I will have more freedom to do the layout. I was thinking about that you may have already made the pinmap, so you don’t need to modify your software.
I will basically use the Maple Mini pins on the D0-D1, D10-D13 and A4 and A5.
For the prototype I may have to make the board a little larger, hopefully not, I will try my best, because I have to extend the QFN pads for hand soldering, but will be back to the normal for the 25 unit run with a reflow oven.

Good night
Wayne


RogerClark
Wed Apr 13, 2016 8:27 am
Hi Wayne

No worries

Change whatever you need to, so that the PCB works well.

As you can see, we can map any Arduino style pin number to any STM32 Port / Pin number

Goodnight ;-)


Kenjutsu
Wed Apr 13, 2016 9:11 am
firebirduino wrote:… let’s do a small F4stamp in the Summer while I will be doing a Arduino, pi-zero and NodeMCU trainer (The NodeMCU is one of Roger Schaefer’s favors)…

martinayotte
Wed Apr 13, 2016 12:37 pm
Hi Roger,
Hi Wayne,

For the STM32F405 cost issue, it is not so bad : I’ve purchased a lot of 5 few months ago on AliExpress and it cost me $30, about $6/chip, so not so bad …

Having the PCB fill out all available space around the 28 DIP (like the 1284P) make plenty of space to put the LQFP64.


firebirduino
Thu Apr 14, 2016 2:52 am
Hi Roger,
Just finished new layout, I have to change pin assignments. So sorry that you need to do some changes. The name can go back to firebirduino, The Maple Never Die was picked up on Arduino.cc forum, Someboard said it, I thought it was cool, but someone may already used it.
Maple mini pinmap will be more difficult and I won’t make it quickly, I have to use the pinmap for the TBU6, plus swap 1 or 2 pins. Tonight I will clean it up and make it look nicer.
I have to go 5mil/5mil, 10mil holes, so it exceeds Oshpark spec., too bad, otherwise it will only cost $4.
I will send out gerber files this week before I leave, when I come back on May 1, I can make 2 and test them out right away.
Thanks,

Hi Kenjutsu,
Thanks for your interest, sorry that we don’t make it, you can make it by yourself or If someone in Singapore is interested in making and selling, that’s OK.
Wayne

Hi martinayotte
Since there are not many people who are interested, as Roger said, only about 10%. So I will make a more standard mini F4stamp first, that’s the module I want to make for a while to see if there is any demand, we will go from there.
Could anyone kindly tell me What’s the difference between F405 and F415? I am a little lazy to go through the datasheet.
Thanks
Wayne


stevech
Thu Apr 14, 2016 3:46 am
I have 1+ years of long days on the STM32F415 and a mating host PC program. Know it well. I have some ‘405 dev boards too.
I presume you will us 64pin package? Capabilities all improve as the package size increases.
Differences are slight… ‘415 is somewhat more flexible and I prefer it.

On this page
http://www2.st.com/content/st_com/en/pr … tId=LN1035

click on the ‘405 and ‘415 in the x/y graph to go to the two data sheets or overview.

2016-04-13_204404.jpg
2016-04-13_204404.jpg (63.13 KiB) Viewed 543 times

firebirduino
Thu Apr 14, 2016 5:40 am
Hi Stevech,
Thanks for the info. It saves me time.
The price difference is only $0.5, so I will try the 415 first.
Most likely I will make it in May or June, it should not take very long.
If nobody wants to make it, I will, so there will be some modules available at the 2nd of year.
Wayne

Hi martinayotte, I will buy it from FEI, it’s a good deal. sleep well.
http://www.futureelectronics.com/en/tec … .aspx?IM=0
http://www.futureelectronics.com/en/Sea … e,Nea:True
Wayne


martinayotte
Thu Apr 14, 2016 2:01 pm
Hi Wayne,

Since there are not many people who are interested, as Roger said, only about 10%.
I think this 10% is mainly due to lack of cheap hardware, so if you can achieve a new cheap design, I’m pretty confident that this number will grow up almost instantaneously … :-)

For the difference between F405 and F415, this is mainly that the second one has an hardware AES encryption.


firebirduino
Thu Apr 14, 2016 3:52 pm
Hi martinayotte,
My first mini F4stamp should be simple and not expensive, the main cost are the chip and connectors, the only thing different than others is that I will play tricks in connectors.

So the 415 may not be exportable. Both 405 and 415 have the same pinouts, so either one should work for DIY. May be I do it in May since you and Stevech seems be interested, try to get a prototype done at the end of May. Hard to find people to make it, hopefully this time someone will make it if he feels it’s easy to make.
Thanks,
Wayne


RogerClark
Thu Apr 14, 2016 9:29 pm
Martin

Ahhh. The AES stuff explains why I cant get the 415 from companies in the USA ( as they wont export it)
But this a joke really, as they are made in China and I can get them from AliExpress.


mrburnette
Thu Apr 14, 2016 11:46 pm
RogerClark wrote:Martin

Ahhh. The AES stuff explains why I cant get the 415 from companies in the USA ( as they wont export it)
But this a joke really, as they are made in China and I can get them from AliExpress.


RogerClark
Thu Apr 14, 2016 11:50 pm
Ray,

I think the term for this is “Security theater”

https://en.wikipedia.org/wiki/Security_theater

The USA seems to be leading the world in this methodology (but most other “Western” countries are also doing similar things)


Pito
Fri Apr 15, 2016 6:35 am
Made in China = Taiwan
Made in PRC = China
Does the STM really produce STM32F415 in PRC?

firebirduino
Fri Apr 15, 2016 9:04 am
Hi Roger,
I finished the new UU -MIND with the F103CBU6 and sent the Gerber files to Oshpark, it only costs $3.95, so I decided to try it out and find out if they will do 5mil/5mil and 10mil holes for such low price. The machine took my order and did not complain, I should get 3 PCBs when I am back on May 1.
The schematic is available at http://www.firebirduino.com, sorry that I had to change more than I thought from the TBU6’s pinmap.

The F4 seems be one of the best chips for the highest performance-to-price ratio. So In June I will do a mini F4stamp.
All are open source and hope someone manufacture them.

Wayne


RogerClark
Fri Apr 15, 2016 10:06 am
Hi Wayne

Let me know the pin mapping and I will produce a new variant.

Do you have a name for these boards ?

e.g. firebirduino-UU-MIND ??


firebirduino
Fri Apr 15, 2016 6:18 pm
Hi Roger,
The pinmap is in the schematic. I have not tried to find out how to post a picture with my message.
The name may be too long. the first one is the UU-MIND, so make the second one UU-MIND+ if it’s OK.
I already saw a small problem, the chip is so close the pin D13 that the part of D13 header must be trimmed. For DIY, it may be OK. It passed the DRC, so the circuitry should be OK. Unless some one wants to manufacture it, I will leave the way it is.

Thanks,
Wayne


Leave a Reply

Your email address will not be published. Required fields are marked *