Show Posts
Pages: 1 ... 45 46 [47] 48 49 50
691  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 03, 2012, 12:11:56 pm
Skyjumper, I agree that careful programming could get me closer to doing it all on one CPU, but I am not a programmer by heart - this is just a hobby. And the 328P is pretty inexpensive and by dedicating a chip, I can be pretty sure I will not miss any transients, no matter how small. Another consideration was the number of interrupts the chips have to handle. One interrupt for the DS3231 is to signal that another second has elapsed, one for the NRF for communication, etc. I was afraid of getting into trouble with all the ISRs... so two chips makes it easier. The second serial port on the 1284p uses two of the available interrupt pins, IIRC, but the second hardware serial is a bigger benefit IMO.

The CAN bus is certainly a great tool... and robust. But I'd have to learn a lot more and breadboard the heck out of that before I'd attempt to use it. Plus, using SPI without standing on the shoulders of giants (i.e. SDFat, for example) is likely outside my realm of possibilities.

I was afraid that modifying the pins file would not be enough. But I really appreciate your and maniacbugs efforts to get the 1284p the support it needs to be used by the Arduino masses. To date, I have relied successfully on the 022 Brewtroller 'fork' of the Arduino IDE, which works great. I think I will stick to that until I get this project finished... if it works and all that.

Maniacbug, I will attempt to try out your add-ons to the IDE on a different CPU and see if it all works... thanks again for your efforts too!
692  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 02, 2012, 08:19:32 pm
Hi CrossRoads,

Many thanks! If I manage to get through writing two sets of recommendations, throwing out the trash, fixing a busted door frame, and so on, I'll try to attack it to tonight and I'll post whatever I have. The 1284P is such a great chip since not everyone needs a bazillion I/O's and the smaller size factor than its larger cousins makes it much easier to accomodate the chip on a PCB. Thanks again.
693  Using Arduino / Networking, Protocols, and Devices / Several questions re: softserial on: January 02, 2012, 08:11:41 pm
I'm in the process of developing a flexible data logger for power measurements, among other things. The main CPU is a 1284P, which has two hardware serial ports. One of the ports is currently used to communicate with an on-board 328P, which acts as the power measurement DAQ system. I'd also like to potentially add external sensor pods for things like temperature loggers, flow meters, etc. that are running on a smaller MCU like the 328p.

Based on previous feedback, the 1284p has yet to be supported in Arduino 1.0 and NewSoftSerial (the last time I tried it) did not work. However, I am thinking that a quasi-SPI approach to using SoftSerial would be neat - use one digital pin to alert the outlying board that its data is wanted, then use a serial connection to move the data. So assuming I manage to create a correct pins file for the 1284p and move it into the proper folder inside the Arduino 1.0 IDE, would softserial work? Or are there additional files that would need modification?

Also, has anyone run EasyTransfer across multiple serial ports? The examples suggest that only one data structure can be received, I am hoping that one can change the requested data structure on the fly?
694  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 02, 2012, 11:41:21 am
Hi CrossRoads!

Thanks for the reply. I will try to take a look at those files and see if I can decipher them. Are there any guides posted as to how to configure the pins file to reflect the wishes of the Arduino team? I'd rather not muck around and blow a fuse or two on the chip - unlike your DIP units, my TQFPs take a bit more time and effort to replace! Cheers and happy new year.
695  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 02, 2012, 09:23:57 am
One reason I am dedicating one of the Atmels solely to sampling (i.e. ADC) is that can sample and process exactly what I want how I want to and can then send it on to the second Atmel. It allows the Atmel to reach high sampling rates and hence good resolution. At 16MHz clock speed and a 128 ADC pre-scaler, the 328p is capturing about 4.5kSps per channel or 9kSps total. I plan on using a different ceramic resonator on that unit, up the main clock speed to 20MHz and then get about 6kSps for each channel yet stay safely below the maximum ADC sampling rate (158 vs 200kHz).

The other Atmel takes the data, adds other data (such as temperature and humidity, as well as external sensors) and then assembles a data string. The data string is prefaced by a excel-format time stamp that is based on the output of a DS3231 real time clock. Some additional work is done, then the whole enchilada is sent to the SD card as well as a NRF module. By putting the I/O on the second chip, I avoided all sorts of performance issues re: all things sampling, and the Atmel 328P is a lot easier to program and calibrate than standard-issue power measurement chips like the ADE7753, at least for me. It may not have the same performance but the price point is about the same and it is a lot easier to troubleshoot.

The 1284P that I am using to do all the other work has way more RAM to accomodate the data string (char operations are still a bit of challenge for me). The program on the 1284p is only 23k but I managed to hang a previously-used 328p consistently thanks to the use of string operations. The data string wasn't even that long... and some day I will figure out how to assemble the data properly using char array operations, which appear to use a lot less memory.

As for the IDE, I am currently using the brewtroller-version of the 022 IDE in order to get good support for the 1284p (thank you, BrewTroller project!). Has Arduino 1.0 added support for 1284s? I wouldn't think so based on my brief review of the change-log but I haven't tried it out yet.
696  Using Arduino / Sensors / Re: I2C or SMBus? on: January 02, 2012, 12:54:34 am
I suggest going the I2C bus route, as long as the sensor will remain close to the Arduino. I believe the rule of thumb is keeping I2C connections shorter than 1m... I have had good success with I2C and a variety of real time clocks such as the Chronodot, for example. That said, I would breadboard anything you dream up before trying to come up with a dedicated PCB. There are plenty of examples around this site to choose amongst.

SMB is not something I have ever used with an Arduino.
697  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 02, 2012, 12:47:53 am
FWIW, and that is probably purely academic, the Atmels are communicating fine via serial at 1Mbit/s.  smiley-lol

The resultant improvement is fairly marginal in impact (~60 additional samples/second, IIRC, for the 328P or about 1.5%) but I'll take the free additional samples... even if there is some impact on usability thanks to the IDE not supporting that speed. Cheers!
698  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 01, 2012, 06:53:31 pm
Thank you, Rob. That link contains good info and seems to confirm my interpretation of the Atmel 328P datasheet. I wonder if you would have any luck with a 1Mbit/s transfer rate since Atmel seems to indicate this as one of their 'legal' serial speeds. I plan on trying it out tonight...
699  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: January 01, 2012, 10:27:50 am
Hi Crossroads!

In my particular application, I have a 328P talking to a 1284P, hardware serial, sending short data packets (a couple of bytes) every second. Basically, the 328P acts as a DAQ, manipulating the results, and sending summaries to the 1284P which samples other data meanwhile before writing it to micro-SD and/or transmitting via NRF+. Speeding up the serial bus increases the number of samples/s the 328P is able to collect. Using a serial bus between the Atmels is convenient for debugging purposes and EasyTransfer makes getting the data from one Atmel to the other one almost trivial. I just found out that someone implemented EasyTransfer via I2C, that certainly sounds interesting!
700  Using Arduino / Networking, Protocols, and Devices / Re: Faster Serial on: December 31, 2011, 10:00:51 pm
Hi Paul,

I presume you are referring to the Arduino IDE, not the Atmel microprocessor, right?

Per the Atmel spec sheet, the 328P appears to support 1,000,000 baud connections in hardware with a 0% error rate while running at a 16MHz system clock.  (see page 201 in, the relevant datasheet). Is there a particular reason that the IDE does not offer more speeds for users to choose amongst? Consider that the error rate appears to be lower at 250,000 baud than at 56,700 baud...

Or is there a way to modify a preference somewhere within the Arduino IDE to expand the range of baud settings? I couldn't find any references to allowable baud speeds in the preferences.txt file... just the last one used.

I am sure there is a very good reason why some of the baud rates that Atmel lists as superior in performance to the ones used by the IDE are not used. I just don't know know enough about the subject... but if you happen to have that info handy, I'd appreciate being enlightened. Many thanks!
701  Using Arduino / Networking, Protocols, and Devices / Re: Is it possible to use a different pin for MISO? on: December 31, 2011, 09:51:56 am
Yeah, the Ruggeduino is one fantastic little unit that is a terrific value. All the benefits of a Uno plus voltage protection with minimal additional cost.
702  Using Arduino / Networking, Protocols, and Devices / Re: Serial communication between two Arduino Uno's on: December 31, 2011, 09:48:48 am
Yep, the included examples are great - the library comes with everything you need to get started. Also, look at Bills pages on how to share the serial bus with other devices - i.e. Very good info. The great thing about Bills library is not only that it simply works but that Bill is also extremely good about supporting it - post a question in his forum and it will get answered.
703  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth Baud rate on: December 30, 2011, 09:10:00 pm
I'd suggest going for a dedicated Yagi or similar directional antenna tuned specifically for 2.4GHz with the right connector for your transmitter. L-Com has gear that I have had good luck with. Hopefully, the high gain of the directional antenna can help 'burn through' the non-LOS component of the transmission.

A high-gain antenna will limit the area a bit where you can receive, but as long as it's not too high a gain, you will get a pretty wide 'cone' that you can receive within. For example, the 9dbi gain YAGI they offer offers a 60 degree-wide cone in the horizontal as well as the vertical axis. For $36 it's a pretty good deal and you may even be able to order one with your specific connector on it (not sure what the SMIRF uses).That would eliminate a connection (with the attendant 0.1db loss of signal) and a failure point.

Another option is using a 2.4GHz amplifier - expensive, needs power, etc. but you can put out up to a Watt of power...

Another option is to put in a long-distance system at the weather station to get to a fixed point within the house, then install a bluetooth re-transmitter there. For example, the allegedly features a 2km range. Your baud rates are sufficiently low that the whole thing may just work.

Last but not least, see if your transmission issues may be related to the use of Wifi in your home. Given the very low power output that Bluetooth transmitters typically operate with, your Wifi computer network, (or worse yet) wireless telephone transmissions may be 'stomping on' and disrupting your Bluetooth transmissions. It's one reason why I have 5.8GHz phones in my house - it keeps the Wifi system happy.
704  Using Arduino / Networking, Protocols, and Devices / Re: Is it possible to use a different pin for MISO? on: December 30, 2011, 08:25:33 pm
Another option is to unsolder the fried CPU and solder on a new one. Not too expensive when ordered from Digikey, et al and it'll teach you drag soldering in the process! It's something I'll be doing with my mini-pro after applying a bit of too much voltage to one of the analog pins...
705  Using Arduino / Networking, Protocols, and Devices / Re: Serial communication between two Arduino Uno's on: December 30, 2011, 08:18:53 pm
A simpler way to do it (IMO) is going with the EasyTransfer library from Bill Porter. All you have to do is define the variables that you want to send, set up the serial port(s) and bob is your uncle. I am using it right now to communicate between a 328P and a 1284P (Serial1). It just works, as long as you don't reverse the TX/RX leads, forget to add a resistor, or make any other number of mistakes like me!  smiley-cry
Pages: 1 ... 45 46 [47] 48 49 50