Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Configuring Xbees? on: January 19, 2013, 01:37:52 pm
Thank you all. It now seems to be working. Since I am a total newbie, when I tried to read the manual, I got lost. Your help was valuable. I only have one question left. When I use Serial.print(sensor_reading), and sensor_input=Serial.read() on the transmitting and receiving Arduinos respectively, I only get some values roughly between 40 and 60. Is there a problem with the communication of the two Xbees, or is it that I'm just not reading the data correctly (as I said earlier, I am using Serial.print, not Serial.write). Also, can I just use Serial.read(), and store its value in a variable, or do I need some other kind of processing after that?
2  Using Arduino / Networking, Protocols, and Devices / Re: Configuring Xbees? on: January 18, 2013, 04:12:38 pm
Oh, ok. But if one is a coordinator, it will still be able to exchange other kinds of information with the other Xbee (such as sensor readings). I won't need a third Xbee, right?

Correct, a coordinator can do anything that a router can do. There really is almost no difference in using the two, from an application standpoint, default destination addresses are different and that's about it. There are six different firmware options for S2 modules: Coordinator, Router, and End Device, each in AT (transparent) mode or API mode. End Devices are the only ones that can sleep. Get your feet wet with routers first before attempting end devices.

Thank you very much. I followed the instructions in your blog post and supposedly have set the Xbees up correctly. However, when I try a range test, it always fails miserably. For the moment, I have merely connected the coordinator to my computer with this http://imall.iteadstudio.com/im120525005.html board. The router is connected to an Arduino via an Xbee explorer https://www.sparkfun.com/products/9132. At the moment, I am merely powering the Xbee, and the DIN and DOUT are essentially floating. I don't know wether I should ground them or connect them to pins 0, 1 and re-upload the program with the Serial communication test.
3  Using Arduino / Networking, Protocols, and Devices / Re: Configuring Xbees? on: January 18, 2013, 02:29:26 pm
Every XBee S2 network needs exactly one coordinator. Use Digi's X-CTU program to load the coordinator firmware on one of the modules. See my blog post for an explanation of the simplest way to make two S2 modules talk. Best not to mess with channels or any other settings; as draythomp says, there are many things that can go wrong. XBees have lots of settings. Resist the temptation to fiddle with the knobs until you know what you are doing. The default settings will be fine almost always. While you're using X-CTU, reset both modules to factory default status and start again at square one.

Oh, ok. But if one is a coordinator, it will still be able to exchange other kinds of information with the other Xbee (such as sensor readings). I won't need a third Xbee, right?
4  Using Arduino / Networking, Protocols, and Devices / Re: Configuring Xbees? on: January 18, 2013, 12:11:52 pm
There's about a zillion things that could be wrong.  Different channels, one of them isn't a coordinator.  While we're at it, are these series 1 or 2.  Have you followed any particular tutorial on setting them up and getting them to work?  etc, a little more information is needed.

I basically followed Tom Igoe's tutorial from "Making Things Talk" (an excerpt I found a while ago) and another one that I cannot find at the moment that just had some up-to-date details the first one is missing. Also, they are both series 2 (they have an "S2" printed on them). I have no idea how to make one a coordinator or why this is important (they are just two, but I suppose you know better; I'm totally new to this stuff). I THINK I have set the channels up correctly (they have the same ID (1111). Is there any other important detail you might need? Thanks in advance.
5  Using Arduino / Networking, Protocols, and Devices / Configuring Xbees? on: January 17, 2013, 05:12:47 pm
Hi. I'm trying to make an Arduino UNO and a Pro Mini communicate wirelessly via Xbee. I think I have configured the Xbees correctly using X-CTU. I am using an Xbee Explorer to connect the transmitter to the UNO. More specifically, I have connected the GNDs and 5Vs and the Explorer's DOUT to pin 0 and DIN to pin 1. In the code I just used Serial.print(i++); where i is simply an integer that is increments every time the loop is run with a 1-second delay. The UNO is not connected to a computer while this is running, but running off a 9V battery. I haven't used the Mini yet, but have connected the other Xbee to a funky board (X-CTU communicates with it, so that's not the problem). However, nothing shows up on X-CTU's terminal. Has anyone any ideas as to what's going on?
6  Using Arduino / Microcontrollers / Re: Programming Arduino Pro Mini on: December 18, 2012, 11:06:25 am
Thank you all very much for your answers. I fixed it. I don't know what exactly went wrong but I checked all connections again but then removed the reset cable, reset the board manually, re-plugged the reset cable and somehow it worked. In case it was related to electrical connections (I'm posting this for future reference) if you ever need to mount a through-hole device such a Pro Mini to a breadboard without soldering, don't use regular hook-up wire or pin headers, but rather fold single-core wire in two and stick it in the holes. This way it will fit tightly and ensure a good connection. Thanks again to all.
7  Using Arduino / Microcontrollers / Re: Programming Arduino Pro Mini on: December 16, 2012, 04:39:44 pm
Often the Transmit and Receive pins are labeled relative to the board they are on.  The Transmit of one board should go to the Receive of the other board and vice-versa.

You should be able to determine which processor you have (168 vs 328) by looking at the chip markings.

You should be able to measure the CPU voltage(3.3V vs 5V) with a multimeter or look at the markings on the voltage regulator.

Hi, and thanks for your reply. Well, I measured the voltage and it was 5V, so I didn't break anything. However, even though I connected the TX to RX on each board (silly me), I still get the same error message. I tried both the 168 and 328 selections in the Arduino IDE ('cause I'm too lazy to check the model), but it still is not working. Any other suggestions?
8  Using Arduino / Microcontrollers / Programming Arduino Pro Mini on: December 16, 2012, 11:44:41 am
Hi. I'm trying to program the Arduino Pro Mini. I am using this board http://imall.iteadstudio.com/im120525005.html. I have connected the DTR pin to GRN, GND to GND, VCCIO to VCC, RXD to RXI and TXD to TX0 (the first pin of each connection is on the FOCA and the second on the Arduino). I have also downloaded the FTDI drivers to interface the arduino with my Mac (OSX 10.7.5). The Pro Mini shows up in the serial ports in the IDE as "dev/tty.usbserial-A100P6QO" and "dev/cu.usbserial-A100P6QO". However, (1) I don't know what arduino Pro Mini this is (5V, or 3.3V and whether it has an ATmega 328 or ATmega 168) and (2) when I try to upload the blink sketch to the arduino (after first having connected the FOCA board  to my Mac with a USB cable), it just says "avrdude: stk500_recv(): programmer is not responding." Does anyone know what I'm doing wrong? Thanks in advance.
9  Using Arduino / Sensors / Re: Electret Microphone on: July 14, 2012, 12:42:50 pm
Up to a massive -0.5V.

Oops. I hope I didn't burn anything out. Thanks by the way.
10  Using Arduino / Sensors / Re: Electret Microphone on: July 14, 2012, 12:42:03 pm
For more information on how your electret is likely to be configured, see the Wikipedia article, with schematic: http://en.wikipedia.org/wiki/Electret_microphone

It sounds as though you're using your op-amp incorrectly:
  • You're putting the electret across the inputs.  In normal operation, there's a DC voltage across the electret, so, when it's across the inputs, the op-amp's output will be either at the positive rail or at the negative rail.  The op-amp isn't in its operating range unless the voltage between the input pins is very, very close to zero.
  • It's certainly unusual to use a voltage divider as a power supply.  It's usually ineffective, and it didn't really help, since the op-amp is rated for +/- 15V power supplies.
  • You don't say how you connected the grounds of the battery system and the Arduino, and it matters.  Depending on where it's connected, the input voltage to the Arduino could be ground, 9V, or somewhere around 12V.  Two of those voltages can damage the Arduino.
Op-amps are great.  A well-chose circuit may be the answer for you.  But, if you try to use one without understanding how it works, or what you're circuit does, you're likely to be frustrated at best, and surrounded by thin blue smoke if you're less lucky.

I think that the best course is to start with the electret circuit, and verify that it's working.  I'd try connecting it just the way that you did in the first place: 8k resistor to 5V, positive end of the electret to the 8k, negative end of the electret to ground.  Then, measure the voltage across the electret.  If the electret is going to work, that voltage needs to be somewhere between, say, 1.5 and 3.5 volts.  It'll work best if the voltage is right at 2.5V DC - right in the middle of the power supply voltage.  You can adjust that voltage by changing the resitor between the electret and 5V. A smaller resistor will raise the voltage, a bigger one will lower it.  It would be great if we could calculate the resistor, but, in my experience, documentation on electrets is notoriously lacking in hard information.  After that, we'll try to detect a response from the electret.

Give it a try, and tell us what you got.  If you can't get the electret voltage into that range, it might be connected backwards, or it might have failed during its earlier adventures.




  • So, does that mean that I can't use an op amp to amplify the already pre-amplified electret microphone?
  • Oh, that +/-15V means that it need to be supplied with an AC of +/-15V. I though it meant that either will do.
  • I connected the negative terminal of the first battery to the arduino's ground pin, its positive terminal to the other battery's negative terminal, and the second battery's positive terminal to the voltage divider.

I tested the electret circuit and I'm getting a reading of approximately 3.1V. However, as I suspected, I cannot see the voltage spike generated by sudden noise as my voltmeter is not fast enough (at least I think that's why). So, I guess the electret circuit is working. Since the voltage is high enough to be measured by the arduino though, is there a way to "slow it down" for the arduino to read?
11  Using Arduino / Sensors / Re: Electret Microphone on: July 14, 2012, 12:21:43 pm
Thank you all for your quick replies.

Make sure that you don't supply a negative voltage to the Arduino. It will cause damage.

I see. Well, I haven't caused any damage yet, I hope, but how much negative voltage can the arduino handle?
12  Using Arduino / Sensors / Electret Microphone on: July 13, 2012, 11:07:45 am
Hi. I'm new to the arduino and have no formal knowledge on electronics. I just got an electret microphone and, for starters, would like to use it to monitor sound volume in a room. I looked at the data sheet and realized the mic has some kind of amplifier in it, so I supplied it with 5V from the arduino using an 8ΚΩ resistor. However, I guess the signal was still not strong enough. So, I tried using a TL082CP op amp http://www.datasheetcatalog.org/datasheet2/1/02rs8oykg9u7xo6h1lrftr6jx6ky.pdf. I connected 2 9V batteries in series and brought the voltage down to 15V using a voltage divider. I connected the 15V to pin 8 of the op amp. Then, I connected pin 4 to ground, the positive terminal of the 5V-supplied microphone to pin 3, and its negative terminal to pin 2. I then connected pin 1 to A0 of the arduino. However, the microphone does not seem to be responding and I think it has something to do with the op amp, rather than the mic itself. Can anyone help me?
Pages: [1]