Pages: [1] 2 3   Go Down
Author Topic: Small server/logger/gateway based on ATMEGA1284  (Read 8126 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I never managed to find a board that had all the bits I commonly use so in the end I am having a go at making one.
The attached PDF has the essential details. Layout is done. I'm just procrastinating before sending it to get a batch made from Seedstudio... Its hard to stop tweaking...
The board uses a 6-pin Atmel programming header, not a Arduino programming type.
If there is interest, I'll make it available. If it all tests out OK smiley

It has:
ATMEGA1284P
RS485
WIZ820
RTC with battery backup
Micro-SD card
Radio (nRF24L01 or RFM12 or RFM70/73)

I'd be interested in comments before I get it produced for testing.

StewieTee

- PDF updated 4-Jul-13

* Mini_web.pdf (100.65 KB - downloaded 68 times.)
« Last Edit: July 04, 2013, 12:07:43 am by Stewie » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First build is looking reasonable.
So far tested SD card, RTC, Ethernet, Serial comms.
Still to try radio system.
Some small tweaks needed to the PCB but nothing major has shown up so far. Plenty of time for that smiley
You have to log-in to see the board photos.


* hand2.jpg (87.12 KB, 750x532 - viewed 107 times.)

* top-2.jpg (110.49 KB, 750x503 - viewed 118 times.)

* bottom-1.jpg (105.46 KB, 750x499 - viewed 102 times.)

* hand3.jpg (55.34 KB, 750x509 - viewed 108 times.)
« Last Edit: July 04, 2013, 06:51:33 am by Stewie » Logged

Melbourne, Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 567
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Inspirational. Thanks for sharing!
Logged

Windows serial port monitor: Tellurium | Arduino serial port debugging library: DBG | Cusom LCD char generator | Technical questions will only be answered in forum threads

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very nice build.

From what I understand of your design it is possible to make a Wiz820 compatible adapterboard and put the more commonly used nRF24L01 with its 8pin plug on it, and still have a very compact design, but with a lower price than the Sparkfun part...

And you use SPI to program this board yes?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
The board is programmed by SPI.
Just before manufacture I added a DTR pin with the required resistor and cap so it should be possible to use a FDTI basic serial adapter for downloading. This is not tested yet. Arduino bootloaders are available for the Mega1284 but I just have not had time to actually try it.

The strip of holes on the end of the PCB has a footprint for a Sparkfun radio https://www.sparkfun.com/products/691
I used this pinout because the Sparkfun units are available from distributors all over the world.
So I could use other radio options, I also made up breakout boards for other radios. The RFM12 and RFM73 can be used in the same place.
The breakouts are in the style shown at http://www.byremote.blogspot.com.au/.

At home I currently use a Freetronics Ethermega which runs logging to Thingspeak, a webserver to view/control some stuff and RS485 to talk to a RF gateway (the RF sensor interface). With very minor tweaking to add the reset/power-down additions for the Wiz820 it ran fine on the new board. It was a bit of a surprise smiley
I'll run it for a few weeks and see how it behaves.






Logged

Melbourne, Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 567
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Made me smile reading you found C a bit hard going at first as your preferred language is assembler...
Logged

Windows serial port monitor: Tellurium | Arduino serial port debugging library: DBG | Cusom LCD char generator | Technical questions will only be answered in forum threads

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I still find C hard. I can get by with basic stuff but my C is probably 'bad' C.
I have tried (unsuccessfully) to figure out whats going on in the Ethernet libraries but its just beyond me. Arduino ethernet has always given me problems with long term reliability but I find C difficult (C++ is harder smiley-sad ).
I have had some valuable help with ethernet from members of this forum which has improved things for me but reliability issues persist. At the end of the day, Its probably my programming.
I have started to write assembly drivers for the W5100 and its going OK. They are not as generally comprehensive as the C ones but in my embedded application thats not an issue as I can see everything thats going on and insert diagnostics into the code wherever I want. I cant do this in C libraries because I dont know how.
One of the items I implemented in the mega1284 board is the reset and power-down pins of the Wiz820 are connected so I can fully reset the module and re-initialise on the fly. It may not make it more reliable but recovering from ethernet lockups will be more friendly. Not the best solution but for now its what I can manage.
Its a looooong learning curve... smiley
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project,
I have done similar work, but using Atmga328+ENC28j60+RFM12B; I was always running short on resources, but then had no compatibility issues
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you handsolder both sides?
If yes, I always wonder how ppl do that with QF44 packages...

As for the Sparkfun RF24 breakout board: I understand your choises to create a standard, easy to get breakout, but the tenfold price of a normal RF24 board is ridicolous.

A breakout board to hold the standard RF24 8-pin boards would solve this though!

Nonetheless a ver nice build! Any idea when you will release the design files?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Did you handsolder both sides?
If yes, I always wonder how ppl do that with QF44 packages...
I do the 'big' sm parts 1st. First, I go over the pads with a flux-pen, I hold the PCB in place with Blu-Tack so its raised and does not rock when trying to solder, then just flip it over and do the other side. I got lucky and found a cheap stereo microscope in a second-hand shop so that has been a great help. If no microscope then I use a pair of cheap magnifying reading glasses that you can get in the supermarket or chemists (+3.5), they work surprisingly well.

Quote
As for the Sparkfun RF24 breakout board: I understand your choises to create a standard, easy to get breakout, but the tenfold price of a normal RF24 board is ridicolous.
I understand, I thought the same. I have wondered about an adaptor for the cheap ebay boards, or just using its footprint.
I figured that this would not be the only version of this I produced. So far I have not found any actual mistakes in the build but there is things I would change after making the 1st one.
There is too much ground plane around the edges of the RTC battery holder, the RTC xtal footprint is not quite right, or perhaps a different package would be better and the drill size for the edge holes was a bit big so not much land left on the pads. more may come to light in time.
This 1st PCB is a 'tester' so I can see how (if)  it all works.
When I do the changes I mentioned, I'll try the ebay version footprint.
I want to keep the board length under 50mm so it fits in the cheapest 5cm x 5cm PCB service from seedstudio (currently 49.5mm)
I'll test for few weeks and then make the files available (this version). The PCB's are done in Kicad, not eagle.

So far, so good smiley Everything has now been tested and works.





Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanx sofar for the info.

Nice that you want to limit boardsize, but what is the current size?

Furthermore, I see you are using 5V on the radio breakout board. All radios are 3.3V, so are the sparkfun boards using a 3.3V regulator by any chance?

Last but not least: is it possible to use (switchable maybe?) 3.3V for the complete board? About all the sensors I use require 3.3V or less! Board should still be able to run on 16MHz, as JeeNodes also run on 16MHz without any problems on a 3.3V power supply.

Happy testing!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

current board size is 49.5 x 32mm. No particular reason at the start, it just had to be wide enough for the ethernet module, the pins on the outside edge and a little bit more.
Initially I did not expect it to all fit but after a few iterations it did. I was struggling a bit towards the end.
If I do another version, I'll make it an extra 0.1" wider to maintain the breadboard pluggability and just give me a bit more room to play with.
The Sparkfun radio has a 3.3V reg on board, as do my RF breakout boards so 5V was fine for that. I needed 5V at that end of the PCB for the RS485 and the RTC so it was just convenient.
I get what your saying about running it all on 3.3V, even at 16Mhz, but I want it to be able to run at 20Mhz, or 22.1184MHz (as per the soon to arrive Goldilocks board). I dont think I'd get that at 3.3V.
I could fit more on in the way of power options if I use more of the whole 17.5mm I still have available smiley as I'd like to keep within the 50mm x 50mm size. I'll see how things work out with this one first.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want the 20MHz or more, you have no choice than to run it at 5V. I was to late for the Goldilocks board, any idea when you will receive it?

But for a max of 16MHz there is hardly any reason not to use 3.3V. Running it on batteries makes it even more important to use 3.3V or even 3.0V.

Your board is small and still easy to extend with the SD, LAN and radio 'shields'. I hope testing is going strong and that we can welcome the final design soon smiley-roll-sweat
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Testing is going well smiley
I'm currently running a test sketch that is a server, client, logs to SD card with time/date from RTC. I'll let it run for a couple of weeks and just see how it goes.
The radio system was tested with Maniacbug's RF24 library and after assigning the pins it worked straight-away, reading the key-presses from a Nordic keyfob.
Running from just 3.3V is a good idea. I thought about it early on and figured that I could just feed it with 3.3V externally and link out the 3.3V reg.
It makes more sense to keep the reg and put some kind of link/jumper on the PCB so that the on-board regulator is always used.
Its a linear reg so pulling too much current will make it hot quick, and the one I used (MCP1826) has a absolute max input voltage of 6.5V. While running my test sketch, it is slightly warm to the touch, no heatsink and a 5V i/p.
Running everything from a 5V plugpack through the reg should be fine, but only testing will tell.
The regulator has a very low quiescent current and pretty low dropout so its reasonable for battery use if the micro is in power-down mode to conserve energy. The Wiz820 power-down is connected so it can be shut down in power critical situations that require ethernet.
There is a drop-in replacement RTC that runs on 3.3v (DS1338) and also RS485 chips for 3.3V so the whole board functionality will still be available, which is a requirement for my intended uses.
So far I'm happy with the results.
I need to make up another couple, one at 22.11Mhz and one running at 3.3V, 16Mhz so I can try things.
And, where does all the time go.... ?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Testing is going well smiley
I'm currently running a test sketch that is a server, client, logs to SD card with time/date from RTC. I'll let it run for a couple of weeks and just see how it goes.
The radio system was tested with Maniacbug's RF24 library and after assigning the pins it worked straight-away, reading the key-presses from a Nordic keyfob.

That is very nice to hear...  smiley-cool

Quote
Running from just 3.3V is a good idea.
[...]

That is even better!
It seems this board is applicable for the full range of my applications with the standard RTC, and optional SD, LAN en RF cards. Even more than the Goldilocks board (shipping in August??) now that I compare the two smiley-eek
Most of the apps will only need the RF card (RFM12B or NRF24), and only a few the SD/LAN/RF combination. And because of this flexibility, I for instance don't need the Arduino shield compatibility and really like these kind of boards!

Quote
I need to make up another couple, one at 22.11Mhz and one running at 3.3V, 16Mhz so I can try things.
And, where does all the time go.... ?

A well, so many possibilities and options to make the ultimate and easy to extend Arduino compatible board!

BTW: Could the RS485 chip be left out if not needed?
Logged

Pages: [1] 2 3   Go Up
Jump to: