Pages: 1 2 [3]   Go Down
Author Topic: Small server/logger/gateway based on ATMEGA1284  (Read 10096 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

A couple of exciting things today smiley
My Goldilocks reward board turned up. Its a work of art, but I'm exercising great restraint, I'll play with it later...
First board built of my second version of Mega1284P mini-web PCB, here is some pictures...
Fractionally wider than the 1st one and with two regulators. One for 5V, one for 3.3V.
A link is available to run both voltages for max speed processing or just run 3.3V for everything in a low power environment.
A reset button, power led and user led are added in this version. Also solder bridges to bring the 2nd serial port out if the RS485 chip is not fitted.
When using both 5V & 3.3V rails and running Ethernet, some quick measurements of current draw gives a max of about 220mA. Thats before using the SD card.
Feeding the input with 7.5V, the regulators get pretty warm. I figure that with the SD card as well, some kind of heat-sinking will be required for continuous running.
However when using the power-down feature on the Wiz820, the current drops to about 45mA (16Mhz xtal). I have yet to experiment with the different sleep modes to see how low I can get it.
Using the ethernet power-down feature, I can wake up the Wiznet module, post some data to thingspeak and then shut it down again. When using it in this manner, the regulators get barely warm.
I'll experiment over the coming week, use the SD card as well and make some more measurements and see how it goes.
The radio is mounted at the rear but this time with the cheap mass produced nRF module footprint, a fraction of the cost of the sparkfun part.
Almost all the pin locations are on a 0.1" grid so it can be plugged onto stripboard if required.



* ver2-1.jpg (52.1 KB, 800x600 - viewed 52 times.)

* ver2-2.jpg (183.26 KB, 1000x838 - viewed 66 times.)

* ver2-3.jpg (76.1 KB, 800x487 - viewed 54 times.)

* ver2-4.jpg (90.32 KB, 800x780 - viewed 52 times.)
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A couple of exciting things today smiley
My Goldilocks reward board turned up. Its a work of art, but I'm exercising great restraint, I'll play with it later...
First board built of my second version of Mega1284P mini-web PCB, here is some pictures...

Nice. I saw them turn up in the Freetronics shop. A bit pricy, but probably ok wrt the board quality and features!
And your v2 board looks good. You are good at handsoldering small parts  smiley-grin

Quote
When using both 5V & 3.3V rails and running Ethernet, some quick measurements of current draw gives a max of about 220mA. Thats before using the SD card.
Feeding the input with 7.5V, the regulators get pretty warm. I figure that with the SD card as well, some kind of heat-sinking will be required for continuous running.
However when using the power-down feature on the Wiz820, the current drops to about 45mA (16Mhz xtal). I have yet to experiment with the different sleep modes to see how low I can get it.
Using the ethernet power-down feature, I can wake up the Wiznet module, post some data to thingspeak and then shut it down again. When using it in this manner, the regulators get barely warm.
I'll experiment over the coming week, use the SD card as well and make some more measurements and see how it goes.
That 220mA sounds like a lot. The datasheet mentions 100-120mA for the WIZ820, so are you losing some mAmps anywhere else? If you powerdown the WIZ820 and still get 45mA, I wonder where that quiescent current is coming from (or going to).

Regarding the hot running regulators: I have seen other designs where a diode (1N5400, 3A) was inserted in between the 5V output and the 3.3V regulators input to drop the input voltage to 4.3V. That should bring the power dissipation in the 3.3V LDO down from about 1.7V*0.35A = 0.6W to 1.0*0.35A = 0.35W.
Of course that heat is now handled by the diode  smiley-red, but it still might help preventing the 3.3V LDO getting to hot.

You will probably need some room, as the SD card can take up to 100mA also, depending on the manufacturer.
Logged

Melbourne
Offline Offline
Newbie
*
Karma: 1
Posts: 15
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
On digging into the Arduino code for the problem with the delay() times, from what I can see (and I'm not really a software person), it looks like the delay code is only going to produce valid results for 8 or 16Mhz. Anything else will give wrong results. This is a bit of a pain. Its probably fixable but this will involve modifying some core files and I'm not too keen to go down that path, and not really sure how to.

Stewie, Jon noticed that the millis() timing was wrong, when he was final testing the Goldilocks boards. But it wasn't exactly obvious, and he'd thought it was just his imagination (too little sleep). I haven't looked into it as I tend to use other timing mechanisms out of avr-libc delay_ms(), freeRTOS, or otherwise.

Quote
22.1184Mhz is good for accurate baud-rates and loading at 115K, but a non-friendly number for deriving a 1ms counter.

You're probably also aware that Timer2 on the 1284p can be used as a RTC, by adding a 32,768Hz crystal? I use the Goldilocks clocked off the Timer2 which gives me "RTC accurate" millisecond timing, and also 22.1184MHz serial perfection. Best of both worlds. The 1284p is pretty wonderful, actually.

Quote
I got a batch of 1284P's from Mouser, + assorted other support components. This will let me make up the basic boards without the extras and have some available if people want one.

I bought some of the easy solder TQFP package 1284p (bag of 25 I think), when I had delusions of making my own Goldilocks board, before I convinced Jon to help. If you need them for a good home, let me know.
Logged

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

Hi, sorry about the late response, I have been a bit busy lately and not checked the forum for a while.

I'm not too worried about the delay() item as I just used a 16Mhz xtal to make life easy for myself. I did try at 20Mhz and 22.1184Mhz, which both worked in all other aspects, just not the delay().
I did wonder about using the timer for the RTC but eventually decided on using the DS1338 (the 3.3V version of the DS1307 RTC), with battery backup. I wanted to be able to set the clock and then not have to worry about it.
I used the Goldilocks bootloader compiled for 16Mhz (and a different LED pin) to test serial loading, but I use the 6-pin header for programming so it was a bit of an afterthought.

I logged in to post a link to the design files for my board. It all seems to be working so whoever is interested can get the files and if your up to it, make your own.
The surface mount  stuff is not too bad, except for the xtal and xtal caps (0805). All the other SM stuff is 'big' SM (1206 r/c's) and manageable chips.
The PCB is smaller than the 50x50mm size from Seedstudio (and others) so its cheap to get the boards made but fiddly to assemble.

If someone wants a built board (the surface mount stuff) then leave a message and I'm sure we can come to some arrangement.

PCB files are at:
http://www.pokewithastick.com
Enjoy....

Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanx for that, also for providing the Arduino / Atmega bootloader files!
Logged

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

I hope it works for you smiley
When I released the Arduino integration files (board profile etc) I did not realise that an Arduino-developers pin mapping existed so I'm creating another set of Arduino files which will:
Use the 'official' pin mapping (and produce schematic/artwork with the different pinout numbering)
Upgrade the core files to the current version (1.05)
Tweak the pin-change interrupts in the pins_arduino file which are mentioned at..http://forum.arduino.cc/index.php?topic=157297.msg1178217#msg1178217 .I expect to keep to the 'official' pin mapping from here on and to post the updated files in the coming week.
Enjoy....

  My latest batch of boards just came back so its soldering time again. This lot has a breakout boards for the RFM12 and RFM70/73 which allows plugging in to the same place a nRF24L01 board would. Same 8-pin footprint.
  A tiny 23mm square board for a 32U4 (you gave me the idea for that one smiley from your mention of the funky, http://harizanov.com/wiki/wiki-home/funky-sensor-v2/ ) My variant has a RF board connector so I can use either the RFM12 breakout (above) or the nRF24 one. I've tried the Teensy and Leonardo bootloaders, both work OK. It has a micro-USB connector, a 6-pin programming header and 10 pins broken out. 0805 R/C's so not nice to build.


Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hope it works for you smiley
When I released the Arduino integration files (board profile etc) I did not realise that an Arduino-developers pin mapping existed so I'm creating another set of Arduino files which will:
Use the 'official' pin mapping (and produce schematic/artwork with the different pinout numbering)
Upgrade the core files to the current version (1.05)
Tweak the pin-change interrupts in the pins_arduino file which are mentioned at..http://forum.arduino.cc/index.php?topic=157297.msg1178217#msg1178217 .I expect to keep to the 'official' pin mapping from here on and to post the updated files in the coming week.
Enjoy....

Great to hear from you, and that you're still busy tinkering with the boards!
I'm about to send some stuff too (I think to elecrow because of experimenting with the $20  laser cut stencils they offer), and will send your design files along with mine.

The part of the pin change interrupts is not very clear to me though. Is it important to get something working, or not??

Quote
  My latest batch of boards just came back so its soldering time again. This lot has a breakout boards for the RFM12 and RFM70/73 which allows plugging in to the same place a nRF24L01 board would. Same 8-pin footprint.
That's a lot of boards you're using. But nice to here you are indeed using your own designed stuff!

Quote
  A tiny 23mm square board for a 32U4 (you gave me the idea for that one smiley from your mention of the funky, http://harizanov.com/wiki/wiki-home/funky-sensor-v2/ ) My variant has a RF board connector so I can use either the RFM12 breakout (above) or the nRF24 one. I've tried the Teensy and Leonardo bootloaders, both work OK. It has a micro-USB connector, a 6-pin programming header and 10 pins broken out. 0805 R/C's so not nice to build.
Sorry to hear I keep you busy  smiley-twist

Martin designs very nice and small boards. I hope they work for you too. Any special purpose for them?
I never soldered 0805 stuff, only 1206, and my boards also contain 0805 stuff, but I'm planning to dive into reflow soldering, as my soldering skills are really bad! Currently waiting for the OsPID to arrive from Malaysia!
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look what the cat brought in  smiley-lol



The components got delayed, so building them is out of the question right now smiley-evil
Logged

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