Show Posts
Pages: [1] 2 3
1  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: November 04, 2013, 08:18:49 pm
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.. .I expect to keep to the 'official' pin mapping from here on and to post the updated files in the coming week.

  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, ) 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.

2  Using Arduino / Programming Questions / Re: SoftwareSerial problem , but only on 1284p on: October 09, 2013, 08:38:51 am
Hi Skyjumper,
you mentioned....
I'll have som time this weekend to write a detailed explanation. I also need to compare these macros to ManiacBug's standard 1284P distribution and see if these are a bug or if there is something going on I am missing.
Did you get any further with that? or the explanation?
I have been trying to figure out whats going on with the modification you suggested for the pin-change interrupts but cant figure it out.
I'm definitely a novice at this so any simplification you can pass along would be much appreciated.
3  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: October 01, 2013, 03:23:32 pm
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:

4  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: August 28, 2013, 11:51:03 am
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.

5  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: August 13, 2013, 06:39:54 am
2nd build boards are on the way, should arrive in about a week so fingers crossed. Hopefully the tweaks are all OK so more soldering to do soon smiley
First build has been fine, no dramas with internet using the Wiz820 module, data logging to the SD card and everything else apparently OK.
2nd build has these few extras to make it a bit more versatile and user friendly.
6  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: August 01, 2013, 04:41:16 am
After a bit more digging in the forums, there is quite a bit of chat about different clock frequencies and because of the way that the millis and micro delays are generated, its basically 8M or 16M for them to be meaningful. If you use different xtal frequencies, you still get a delay, but it wont be what you are expecting. This seems to be pretty much hard coded into the core files with other functions and libraries making the assumption of 8M or 16M xtal

I used a ferrite bead because of some comments on the Goldilocks Google design docs page. I thought I'd give it a go. I have always used basic inductors so far but I'm willing to try and see. In my layout it may not make any difference as its hardly set out for optimum analog performance. On the plus side, it uses linear regulators so that will probably help.

As for the crystal, here is an example of the package
This is just to show the style. Its not the friendliest thing to hand solder. I'll have to get a toaster-oven reflow setup going.
Two pins are the xtal, the other 2 are Gnd.
I use the 10u caps because I have a stack of them. In the Wiznet forums, good decoupling on the wiznet module seems to be fairly critical. I also wanted to keep to a 1206 footprint and I did not want the package height to be too much, so multiple smaller devices.
The Wiznet module has a built-in pullup resistor. I put the others on because while using the ISP programming, the micro I/O pins float so the CS lines could become active and then random data may appear on the MISO line and cause the programming to fail. I'd just rather err on the safer side as I dont like having to tack bits on later.
7  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 30, 2013, 01:23:45 am
I did change the 'board type' for the different frequency builds. I loaded a basic sketch into the different frequency boards and then looked at the disassembly in AVRstudio.
There are assumtions made about the clock frequency (either 8 or 16M), which is fair enough I suppose as thats what Arduino's run at. I'm not too bothered about it for now and if it gets to the stage where its a problem then I'll look at (trying) to do something about it.

I do use the basic libraries for Kicad, but each time I make a new component, I add it to my own library so it has grown over time.
I looked at going the Eagle way some years back but did not want to get locked into a system that was limited in the 'free' release. Kicad has no restrictions in that sense.
Its not as 'seamless' as Eagle, but its quirks are not such a handicap that I cant live with it.
I have not experienced the problem that you describe, but the releases are regular so whatever it was may not be there any more.

I think I have arrived at a 2nd build version now.
It has more flexible power options. Positions for two regulators on board, a 5V and a 3.3V.
With the two power rails on the board, the micro (and RS485 if fitted) can be run at 5V for full speed. The other items all run a 3.3V. The 5V rail can be connected to the 3.3V rail (with no 5V reg fitted) and the whole board run at 3.3V. Also now fitted,
A power LED
A LED on one of the I/O pins
A reset button
The radio connector is now the cheap nRF version as per ebay (and many other sources)
Ground-plane beneath the battery (for the RTC) is fixed and the 32Khz xtal footprint fixed.

The PCB is done, I just need to check it over for a few days and see if I spot anything wrong then I'll get a batch made.

Its 5mm wider so still well within the 50x50mm PCB area at Seedstudio (and others)

Since I'm ordering boards, I'll do a RFM12 adapter that fits onto the radio connector, I use both.

If it all works OK then I think that will do for me. I'll release the files and anyone can do what they will with it smiley

Schematic now attached (you need to log-in to see it)

8  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet stability on: July 26, 2013, 09:24:47 pm
Several times I logged the memory usage, for about a week each time. By this stage I had removed or recoded parts of my program that had suspect memory leak problems (a lot of forum and google searching for that info).
Now that I am running essentially the same software on both boards (Ethermega and my 1284P variant), the Ethermega on the Telstra broadband internet (through the mobile phone network) is the one that looses data. The 1284 board does not have the same issue.
In a few weeks I'll swap the board locations just to confirm. If the problem goes with the location, not the board then at least I know where I stand and I can stop chasing a 'fault' that may not exist with my hardware.
9  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 25, 2013, 07:58:58 pm
I've built up a few boards now for testing purposes, The 22M version is one of them.
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. 22.1184Mhz is good for accurate baud-rates and loading at 115K, but a non-friendly number for deriving a 1ms counter.
I'll live with it for now as its not a show-stopper and everything else seems to be good. 16Mhz is fine and Arduino delays work as expected.

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 tried codeblocks but it seems to have issues running on my XP virtual machine. Took ages to load and each time I tried to do anything, there was a 20~30 sec delay before anything happened. I'll stick with AvrStudio for now.
10  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet stability on: July 25, 2013, 07:38:05 pm
At last I have found some answers to my reliability issues. It seems to be in my service provider end, not in my software after all.
I did a test with my new Mega1284 board using a Wiz820 module, running side by side with my original system. My original system (an Ethermega) logs the assorted sensor data, the new board a test sinewave.
Looking at the two lots of logged data on Thingspeak, the breaks in the data match up.
Then I put my 1284 board at a friends place logging the test sine-wave and the breaks go away.
At home I use wireless broadband with Telstra (phone line internet is not available), my friends place uses ADSL2 down the phone line.
Using the ADSL internet, the large gaps and dropout of data are no longer present. There is still occasions when one or two posts have been missed but these are rare. It happens from both locations but they do not synchronize, they seem to be random. The 30min, 1hr gaps have gone with the wired internet. On the home front, the large drops are still present.
This gives me some hope that I'm not perhaps doing something fundamentally wrong after all smiley
11  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 22, 2013, 02:18:27 am
Tested with an Arduino bootloader, seems OK. Not tested with a HUGE sketch yet, I'll have to embed a large table and try that so it is across the 64K boundary.
The bootloader is a slight tweak of the Goldilocks one, built for 16Mhz and a different LED pin.
I also tried 22.11Mhz but the oscillator was not rock stable. Waiting for some different XTAL cap values to turn up and also for different xtal manufacturer version.
On 22.11Mhz, delay() was out by up to 25% (running too slow), but the serial bootloader loaded at 115K with no errors.
I enabled CLK-OUT and checked it on my scope. It certainly seems like the right frequency (counted 10 cycles on the screen and did the sums) and if the bootloader is happy at 115K, it cant be too far out.
I wonder if something is overflowing in the timer chain that derives the delay. More investigation required.
At least the 16Mhz tryout seems all good. Its been serving/posting and logging for some time now and no issues. A goodie-bag from mouser arrives tomorrow so more building to do smiley
I just upgraded to  AVRstudio-6.1 and the Arduino plugin from . Its looking very promising! A real editor/IDE with debugging features, and all the Arduino functionality available.

12  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 15, 2013, 01:02:32 pm
It probably will be OK.
One of my boards is a ATtiny861 with a RFM12, at , is quite similar but slightly larger, its never been a problem for me. The RFM12 works at 433Mhz. I wondered if 2.4Ghz might be more of a problem. It comes down to try and see I suppose.
If your interested, the design files for the atTiny board are on AVRfreaks..
13  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 12, 2013, 11:26:22 pm
for enclosure sizes, dont forget that the radio either sticks up, or behind.
I'm looking at both options, I'm tending towards a footprint that allows a right-angle connector on the rear of the PCB so the radio sticks-up. This allows a vertical radio, or if no Wiznet module fitted then a vertical connector so the radio is above and parallel to the main PCB.
Not sure if some kind of screening would be required between the micro and the transmitter but with such close proximity its certainly worth considering.
-The above is with the cheap ebay nRF module footprint (2x4 pin)
I'm experimenting with other PCB options. Solder bridges if no RS485 fitted seems OK, reset button is OK, LED should be fine but not done yet and still considering power options.
14  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 11, 2013, 12:04:54 am
If you get your own PCB's made when the design files are available, you can just fit the components you want, bridging out the RS485 driver will let you still use the serial channel, but at logic-levels.

When I release the files, the PCB artwork will be in a zipfile, just email it to seedstudio, pay the low fee and a few weeks later your very own batch of 10 boards will arrive.

There are refinements I want to make for a next version, perhaps a LED on the board and a reset button. I really want to keep to 1206 resistor/cap packages as for home assembly they are quite manageable, and to keep away from the tiny sm footprints as I just cant work with them. I did have to resort to three 0803 components, the xtal caps and a ferrite bead.
Perhaps some solder bridges for power and 2nd serial options. I'm trying things to see what I can fit.
At this point, I dont have any way to sell these, or even have an idea if people would want them. I made these with my requirements in mind, ie the RS485 port is not a common requirement. I can probably make it optional (bypass the chip) so in that regard its more generally useable.
So I'll just keep on with the testing and trying to fit any modifications I can think of (or are suggested)

I was lucky enough to be one of the Goldilocks backers, I cant wait to get mine.
Its in a completely different class from my effort. It is a very well engineered board and a huge amount of effort and thought has gone into it to make it one of the most 'serious' Arduino's I have come across, suitable for complex and diverse applications, even using the two CPU's for independent programs and communicating between them.

I just thought of the bits I wanted, crammed them into a small space and figured its worth a try... If its a dud then its not the end of the world. If it all works then happy me.
I just like making stuff  smiley
15  Community / Exhibition / Gallery / Re: Small server/logger/gateway based on ATMEGA1284 on: July 09, 2013, 03:32:58 am
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.... ?
Pages: [1] 2 3