Show Posts
Pages: 1 ... 45 46 [47] 48 49 50
691  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.
692  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.
693  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.
694  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!
695  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...
696  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!
697  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 http://www.atmel.com/dyn/resources/prod_documents/doc8025.pdf, 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!
698  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.
699  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. http://www.billporter.info/how-to-add-multiple-uart-connections/. 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.
700  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 http://www.l-com.com/productfamily.aspx?id=6310 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 http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=127 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.
701  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...
702  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
703  Using Arduino / Networking, Protocols, and Devices / Non-standard baud rates with Serial Monitor on Arduino IDE on: December 28, 2011, 12:42:10 pm
Is there a way to set serial speeds in the Arduino serial monitor other than the standard serial speeds that top out at 115,200 baud? I would like to try communications at 250,000 baud, a speed allegedly supported by the Atmel microprocessor...

I poked around the preferences.txt file but it and none of the other files I looked into seem to contain the 'legal' speeds that the IDE offers in the serial monitor window (Arduino 022).
704  Using Arduino / Sensors / Re: Ultrasonic sensor to determine water level? on: December 28, 2011, 11:09:04 am
I've experimented with this in the past - I tried using a long-distance Sharp IR distance sensor with a float inside a 3" diameter PVC tube. Despite painting the inside of the tube black and using a blue XPS float, I got basically random signals. Presumably, the tube did not help, but it seemed like a good idea to keep the reflector in one place and to prevent it from getting soiled by the water in our cistern (i.e. it would always float one side up).   

One way to limit electrolysis, etc. for exposed wires is to use a AC signal - and it doesn't have to be a sine wave, a alternating square wave will suffice. That way, there is no net gain on one electrode or the other and no bubbles will form on the surface of the sensors (thanks Grumpy_MIke) - he suggests using an inverting H-bridge. Limiting the current would obviously also work by slowing the rate of decay. However, over time the effects of decay and/or surface coatings should become noticeable on the signal.

That said, a long capacitance sensor consisting of a thin PVC pipe with Copper tape mounted on it seems like a fairly inexpensive way to get things done without resorting to expensive sensors and you can use the capsense library to interpret the results. See the following link, as the christmas tree water level sensor is nifty http://hacks.ayars.org/2011/12/christmas-tree-water-level-alert.html

E-Tape is expensive but easy to use if your application requires less than 12" of travel see http://www.adafruit.com/products/464

Here is an example of the inverting H-bridge in action: http://gardenbot.org/howTo/soilMoisture/

A nichrome wire / H bridge has been discussed here before also: http://arduino.cc/forum/index.php?topic=71628.0

A resistive approach is shown here: http://lifeboat.co.nz/arduino-water-level-gauge/
705  Using Arduino / Sensors / Re: How to test actual adc resolution? on: December 27, 2011, 09:40:03 pm
Thanks for the reply!

I based my statement on some forum posts from others. But looking through the ADC section inside the big datasheet, I come to the same conclusion as you did. I will try my hand at oversampling and decimating to increase accuracy, but there are limits to that too.

BTW, your products are great!
Pages: 1 ... 45 46 [47] 48 49 50