Go Down

Topic: upgrade from ProMini328? (Read 1 time) previous topic - next topic

wothke

I based my first project on a ProMini328/16mHz and the device that I constructed around it pretty much does what I'd like it to do (see my project here: https://jwothke.wordpress.com/2016/05/08/and-now-to-something-completely-different/).

But unfortunately I am running out of FLASH mem (200 bytes left..) and there still are additional software features that I would have liked to implement. Ideally I would like to just replace the ProMini328 with something that has the same form factor/pin layout but just more FLASH mem - so that I don't have to rewrite my existing software and minimize the changes on the HW side.. (also I don't want to spend a fortune where the ProMini could be had for $1.50 - I've already fried my share of ProMinis and that's why I like inexpensive ones..).

I am wondering if it might make sense to get one of those inexpensive surface mount ATMEGA1284P ($2.50) and manually patch up some replacement for the ProMini328. Is that a bad idea (compatibility?) or has someone tried this already?

I have no prior experience with SMD stuff or with using AMTEL chips directly.. any hints that might be helpful are highly appreciated (wiring schematics, required/useful parts, etc).

raschemmel

I think Crossroads can help you with that question.

dmjlambert

Check out what john1993 says about making a small SMD board for cheap (extremely cheap), I thought it was interesting:  
https://forum.arduino.cc/index.php?topic=390148.msg2690277#msg2690277

CrossRoads

I offer '1284P cards in several form factors, such as
http://www.crossroadsfencing.com/BobuinoRev17/


Would be a lot cleaner than trying to glom a 1284 onto a 328 board and it also gives you access to the extra IO for future use. 
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

wothke

I offer '1284P cards in several form factors, such as...

Would be a lot cleaner than trying to glom a 1284 onto a 328 board and it also gives you access to the extra IO for future use.
Very nice and clean looking products!

Since I want to use the thing for a specific project I don't actually need any extra IO - and if it provides at least what the 328 did then I am already quite happy (Is there anything that does not work as compared to a 328? can I use my existing CP2102  based USBtoUART converter to program this or would I need something else?).

From what I see your bare board "1284Mini" would make my life a whole lot easier and make for a much tidier assembly (as compared to using some generic breakout board) and I would love to have one of those. The question is just how much would it cost to send me a respective PCB to Europe?  (So far I had given up ordering any stuff from the US due to the riddiculous shipping costs..)

wothke

#5
May 14, 2016, 12:40 pm Last Edit: May 16, 2016, 01:23 pm by wothke
Check out what john1993 says about making a small SMD board for cheap (extremely cheap), I thought it was interesting: 
https://forum.arduino.cc/index.php?topic=390148.msg2690277#msg2690277

very interesting.. actually I think I could also go for that even cheaper m128... (since the only thing I really need is more FLASH..) or is there some feature that an m128 does not not provide as compared to a 328 (I'm not very familiar with the detailed differences between the various ATMEL chips.. - but all I need is a "328+" with at least 64kb FLASH mem)?

unfortunately the only clear assembly instruction that I found in the above post is about the placement of the oscillator.. I doubt that I'll manage to get a working "ProMini328 replacement" on that sketchy info alone.. an additional .1mfd capacitor also seems to be needed (but what specific type: ceramic, smd 0805, 0402, 0603, etc?, and where to put it exactly?) on the photos there is some additional wire/led/resistor.. (is there anything else that needs to be added?)

see
...also a .1mfd similarly tacked between power pins but too bad no photos..
actually I don't even need a complete "ProMini328 replacement" since I already do have a separate 5V regulator and I am not interested in analog pins or any LEDs or tactile reset switch either - I am using SPI and I2C though.

dmjlambert

unfortunately the only clear assembly instruction that I found in the above post is about the placement of the oscillator.. I doubt that I'll manage to get a working "ProMini328 replacement" on that sketchy info alone.. an additional .1mfd capacitor also seems to be needed (but what specific type: ceramic, smd 0805, 0402, 0603, etc?, and where to put it exactly?) on the photos there is some additional wire/led/resistor.. (is there anything else that needs to be added?)
Yes, that is why I asked john1993 to make us a video, but he is not one for giving all the details. 

I believe uF for microfarad and mF for millifarad is the more common way people refer to capacitors, perhaps mfd is how some people refer to microfarad but I'm not sure.   

0.1uF capacitors from VCC to GND and from AVCC to GND and from AREF to GND is what you need.   They are called decoupling capacitors.   You can use through hole disc capacitors and wrap the leads around the header pins and solder, or use an 0805 size and solder it between the header pin leads.  It looks like the micro controller pinouts are arranged with the VCC next to GND and RESET next to VCC so you can also put 0805 10K resistor pullup on it.   It looks like it would be pretty easy, but I admit I have not tried it yet. 

It has been discussed on the forum before it is a good idea to connect all the GND pins together and apply power to all of the VCC pins.   Do not connect power to AREF. 

Advantage of going with ATmega2560 instead of ATmega128 is the ATmega2560 is more mainstream and will  work with the Arduino IDE without adding anything.   From a software perspective you can treat the board as a Mega2560.   Fewer people will know answers to questions about ATmega128 on this forum.  The price of the ATmega128 is cheaper, so that is something to consider.

wothke

Advantage of going with ATmega2560 instead of ATmega128 is the ATmega2560 is more mainstream and will  work with the Arduino IDE without adding anything.   From a software perspective you can treat the board as a Mega2560.   Fewer people will know answers to questions about ATmega128 on this forum.  The price of the ATmega128 is cheaper, so that is something to consider.
just found this: https://github.com/MCUdude/MegaCore .. the project seems to provide everything needed to use a m128 (including wiring schematics) with the Arduino IDE, so I guess that I'll just give it a try with the cheaper chip..

CrossRoads

Shipping to Europe from US has gotten ridiculous for sure.
Cheapest I can do for shipping is a padded envelope for $13.50 with shipping time that "varies by destination":

First-Class Package International Serviceā„¢**
Prices for Great  Britain and Northern Ireland for example, rest of Europe is pretty much the same.
https://ircalc.usps.com/MailServices.aspx?country=10143&m=6&p=0&o=3&dpb=0&mdt=2016/05/16%2008:00&dvi=50#



Meanwhile China has free shipping to the US to dump their products here.
'1284P is great chip with 16K SRAM, 128K flash, SPI, I2C, dual hardware serial ports, and the other stuff you'd find in a '328P.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

wothke

#9
May 15, 2016, 11:19 pm Last Edit: May 15, 2016, 11:42 pm by wothke
Shipping to Europe from US has gotten ridiculous for sure.
Cheapest I can do for shipping is a padded envelope for $13.50 with shipping time that "varies by destination":
....
Meanwhile China has free shipping to the US to dump their products here.
'1284P is great chip with 16K SRAM, 128K flash, SPI, I2C, dual hardware serial ports, and the other stuff you'd find in a '328P.
Thanks for the feedback, but I guess I'll get 5 generic breakout-boards for $1.60 with "free shipping" from HongKong. (Obviously the international postal treaties are completely insane.. sending a letter to the neighbouring village is an order of magnitude more expensive than shipping a small parcel around the world if it is shipped from one of those "city-states" like HongKong or Singapore - because they are allowed to benefit from their low local delivery costs whenever they ship to the rest of the world.. btw, it isn't China that has free shipping - the game only works when they manage to ship via HongKong..)

Do you see a reason why the m128 might not be an good-enough upgrade for my project? (I really just need a bit more FLASH mem and I would not be using additional serial ports or SRAM..)

MarkT

It has been discussed on the forum before it is a good idea to connect all the GND pins together and apply power to all of the VCC pins.   Do not connect power to AREF. 

That is not a good idea, that is mandatory.  Each power pin needs decoupling, if you don't connect it then
it has no decoupling.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

dmjlambert

Mandatory rules, ha ha.   We just can't get john1993 to follow the rules, he's a free spirit.

wothke

#12
May 18, 2016, 02:25 pm Last Edit: May 18, 2016, 02:35 pm by wothke
I found the following overview: http://www.mikrocontroller.net/articles/AVR_Typen

According to that page the below are the points where a 128 provides LESS than a 328 (ignoring irrelevant - for my project - stuff like: min voltage, max CPU MHz, and differences regarding PWM output):


Code: [Select]

                  extInterrupts    SPI
328:                 24              2
128:                  8              1


I wonder if the above points might be relevant to my project: I am using SPI for my transceiver but 1 SPI should still be enough, is it? And I have no idea which of the devices/libs I am using (ASK receiver, RF22 transceiver, LCD via I2C, RTC via I2C, EEPROM via I2C) might be relying on extInterrupts - if any.. Ideas?

wothke

#13
Jun 27, 2016, 02:01 pm Last Edit: Jun 30, 2016, 08:28 pm by wothke
For those of you interested in
Quote from: raschemmel
"results"
below my preliminary experience report.



As can be seen on the photo, as compared to a ProMini, some extra parts are required. I am using:

Code: [Select]

- ATMEGA 128A-AU (US $0.79)
- QFP TQFP SMD DIP Adaptor PCB Board (US $0.32)
- DC-DC Step Down Power Supply 3A (US $0.41)
- 16 MHz cristal oscillator (US $0.17)
- several pin headers, 2 resistors, 4 capacitors and a LED (some cents)


In total the parts will set you back about US $1.80 (when ordering from AliExpress).


In addition you might need to get yourself a "USBASP USBISP AVR Programmer" (US $1.34) in order to install the Boot Loader.

So far I successfully ran some of the Adruino examples but I have not adapted my original ProMini code yet. And from what I see, some hardware specific changes will be needed: This is due to the fact that things like I2C or SPI are mapped differently on the ATmega128 (at least when using https://github.com/MCUdude/MegaCore). But I guess that it shouldn't be a big deal (fingers crossed)..


raschemmel

#14
Jun 27, 2016, 04:35 pm Last Edit: Jun 27, 2016, 05:42 pm by raschemmel
Quote
below my preliminary experience report.  
Nice work My prototypes look about the same, except , for some, I use mostly wire wrap wire (28ga to 32 ga) soldered point to point. I'm guessing you used ribbon cable because it's flexible (by separating the colors). I concluded that from the variety of colors of your wires. I don't use ribbon cable because it's stranded. That's why I use wire wrap wire. It is very easy to wrap it about the pins of an IC socket.
I've done true wire wrap in school but never for my personal stuff or at work.

I sometimes do the same thing you did with most of the wiring on the bottom but a few on top.
Sometimes I put all of them on the bottom and sometimes I put almost all of them on top.
Off hand, I can't remember what criteria I used to choose which I would do. I'm sure I had my reasons but I don't recall what they were because each project is unique in it's own way. My most recent one was this.  

(the factory made modules are an ATtinyISP, and an FTDI )



As an aside, I suppose the schematics are proprietary ?

BTW, what are the two 8-pin ics in the photo on the right ? (ATtiny85s ?)



Go Up