Show Posts
Pages: [1] 2 3 ... 17
1  Using Arduino / Sensors / Re: Strange oscillation on electret mic circuit clone on: February 18, 2014, 11:54:35 am
Interesting. I turned the electret around and am getting a nearly identical graph. If it was truly a polar device I would expect it behave very differently.  Attached is an image of what the new graph looks like.

While the oscillation is still there, it does seem like the signal is less noisy. I am beginning to think that the RC circuit on the artificial ground of the op-amp is causing the oscillation, but not sure what to do about it.

Edit:: Thought it might be helpful to list the mic and op-amp I sourced for my design, perhaps I overlooked something in the specs that could be causing this.

Elecret mic: http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&KeyWords=102-1721-ND
Op-amp (OPA344): http://www.digikey.com/product-detail/en/OPA344NA%2F250/OPA344NATR-ND/362264
2  Using Arduino / Sensors / Re: Strange oscillation on electret mic circuit clone on: February 15, 2014, 10:07:00 pm
Quote
Have you checked the values of the resistors you fitted around the IC, it looks like you have way too much gain and that is causing  the oscillations.

Two of the 10ks actually measure as being around 5.76k, but I get the exact same result on the Sparkfun breakout board.

I find it hard to believe that the gain is too high. As I said, this is the exact schematic from the Sparkfun breakout board, which I've tested and found to work perfectly.

Quote
I see that you have added extra circuits to your board, have  you tried the board with just the microphone circuit

Haven't tried that, will need to order all new parts to try that.

Quote
is the microphone in the correct way

I had no idea that elecrets had polarity - are you sure about that? The mic can only be connected in one way for the silkscreen to match the actual part, so I had been going off that.

Quote
add a cap, 1 to 10uF across the supply at the amp chip, along with a 0.1uF cap

I will if the problem can't be resolved in some other way. I'm getting really tired of the time and money it takes to produce PCBs and assemble prototypes.
3  Using Arduino / Sensors / Re: Strange oscillation on electret mic circuit clone on: February 15, 2014, 07:50:09 pm
On second thought, adding the 10pF capacitor in parallel may not have caused a DC offset - it may have lessened the peaks and troughs of the oscillation. Can you confirm that as what I'm seeing? If so, maybe I need to order a replacement cap.
4  Using Arduino / Sensors / Re: Strange oscillation on electret mic circuit clone on: February 15, 2014, 07:46:24 pm
Adding a 10pF cap in parallel to the 12pf one seems to make it a little worse. The voltage shifts upward, but the oscillation is unchanged. Attached is a pic of a graph with it in place.

I've also attached a picture of the board design for the Sparkfun breakout board. I modified the layout slightly to fit my board, but don't understand what could be so different to break the functionality.

I've also attached the Eagle files for the Sparkfun breakout board so you can check more thoroughly.
5  Using Arduino / Sensors / Re: Strange oscillation on electret mic circuit clone on: February 15, 2014, 10:32:54 am
There are ground planes on the top and bottom of the board.

Attached the schematic. I want to stress that this is an exact copy of Sparkfun's electret mic board, which I have tested alongside my own sensor module and found to work perfectly. I am very confident that the problem is not with the schematic, but with the board design.
6  Using Arduino / Sensors / Re: angle sensor on: February 14, 2014, 04:34:19 pm
I believe this is often done using a quadrature encoder. Essentially a photosensor that doesn't move (on the frame of your bot) and a spinning wheel with alternating black and white swatches on it. The voltage of the photosensr will indicate whether it is looking at black or white, and you can keep track of that information in the code to extrapolate position.
7  Using Arduino / Sensors / Re: Arduino and a video camera on: February 14, 2014, 04:31:49 pm
The Arduino is not capable of computer vision problems like this - they are just too computationally intense. Try the RasPi or Beaglebone - the RasPi has several camera modules that connect directly to it.
8  Using Arduino / Sensors / Strange oscillation on electret mic circuit clone on: February 14, 2014, 04:30:49 pm
I bought an electret mic breakout board (https://www.sparkfun.com/products/9964) and was able to get it to work quite well, so I decided to use the circuit in an open-source sensor module that I am working on. I received the PCBs from OSHPark yesterday and assembled the first prototype, but am getting some strange readings.

Without doing any sort of buffering or averaging, I'm just outputting the direct results of an analogRead to the serial port and monitoring it in the Arduino IDE. Without making any noise, I'm seeing a very regular oscillation occurring in the signal that is making it impossible to use. When I tap the electret I am able to make the signal top out, but the oscillating noise is still there.

I put together a Processing sketch that just graphs the analog data being received straight from my Arduino. I've attached a screenshot of the sketch running (purple graph on black background image).

've never designed an audio circuit before, so I'm not sure what is happening. I don't own an oscilloscope, nor do I know how to use one to troubleshoot a problem like this. Does anyone have some ideas about what is going on, and what I can do to solve the oscillation?

I've attached the Eagle files (schematic and PCB file) for my board, as well as an image of the PCB if that helps.

I noticed that when I measure two of the 10k resistors with a multimeter I see ~5.76k instead of 10k. However, I see the same thing when I measure the same resistors on the Sparkfun BoB. Odd.

I also reviewed my BOM and found that I used some capacitors that had a tolerance of "-20%, +80%". I am wondering if the problems I am seeing are due these parts, or somehow general PCB design.

9  Using Arduino / Networking, Protocols, and Devices / Re: Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 18, 2013, 09:15:29 pm
I found out that I had the pin number wrong this whole time. I realized that the Bluetooth's TX pin was actually connected to PB4 (MISO) on the ATMega328, which is digital pin 12, not 8. I updated my code and can send and receive messages between terminals now via Bluetooth.

After getting the TX pin right, everything else was pretty trivial. Getting into AT mode is as simple as booting the board up and not pairing the module with anything. I am able to change the name and pin code of the module very easily, which is all I wanted to do. The command set for my module matches up with the commands listed in this (even though the photos show a strange looking module): http://www.mikrokopter.de/ucwiki/en/HC-06
10  Using Arduino / Networking, Protocols, and Devices / Re: Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 18, 2013, 05:48:31 pm
Looks pretty much functionally identical to the sketch I am using, which I posted at the beginning of this topic.

As I said, my problem seems to be that I am able to receive messages coming from my Bluetooth module, but am unable to send messages to it. This would explain why I get no responses when I try to enter AT mode, because the Bluetooth module doesn't think it's receiving anything.

Any ideas why RX is working but not TX?
11  Using Arduino / Networking, Protocols, and Devices / Re: Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 18, 2013, 05:13:59 pm
I think I have pinned down part of the problem. It seems that my ATMega328 is having trouble sending messages to the BT module, but is able to receive messages just fine.

I connect to my board via FTDI and use the Arduino IDE Serial Monitor to send/receive messages. I then connect to the Bluetooth module with my Android tablet and use a Bluetooth terminal program (have tried three different ones so far) to send/receive messages to the board.

With every configuration I am able to send messages from the tablet to the Bluetooth module and view them via my FTDI connection, telling me that the Bluetooth RX pin is working fine).

However, when I try to send data from my FTDI connection over the Bluetooth connection to my Android module, no data is received. This tells me that the Bluetooth TX pin is not connected correctly, which could explain why I am having a hard time getting to AT mode.

I have the Bluetooth's TX pin connect to my ATMega328's PB0 pin (digital pin 8 ). Is there any "gotcha" about this pin that would prevent it from working with SoftwareSerial?

I am attaching the complete schematic and board design file, please let me know if anything pops out.
12  Using Arduino / Networking, Protocols, and Devices / Re: Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 15, 2013, 07:30:09 pm
Electrical connection to what? The KEY (PIN 34)?
13  Using Arduino / Networking, Protocols, and Devices / Re: Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 15, 2013, 11:37:38 am
Heeey, you're right, it must be a HC-06 module. There is so much conflicting information out there it's hard to find the truth sometimes.

All I really want to be able to do is let a user easily change the device name and pin code through the board, nothing else (just so they can more easily differentiate between multiple boards that are powered on at the same time).

However, given that I have an HC-06 module, it should enter AT mode automatically if nothing has paired with it. But when I connect the module to my ATMega328 and turn the board on, I don't get any response from the module when I type in "AT".
14  Using Arduino / Networking, Protocols, and Devices / Microcontroller-based switching of AT mode for HC-05 Bluetooth module? on: November 14, 2013, 12:43:59 pm
I'm trying to integrate a Bluetooth module from DealExtreme (this one: http://dx.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711) into a custom ATMega328-based board I am working on and would like to find a way to automatically switch to AT mode so the user can redefine the module's Bluetooth name anytime.

I believe that this module is the HC-05 one, based on the fact that it shows up as "linvor" when I search for Bluetooth devices on my PC or Android tablet.

I have found several instructions to get the module into AT mode manually, but not automatically. In other words, on my board I don't want to force the user to solder wires or fuss with the electronics every time they want to get into AT mode.

From what I understand, I need to tie the module's PIN 34 to HIGH (3.3V), then apply power to the module. When I send "AT" to the module, I should expect "OK" in return at 38400 baud, but so far I have not received anything.

I am able to connect to the module over Bluetooth, and send and receive data with no problems. It's just getting it into AT mode that seems to be the problem.

At first I thought that if I powered up the module and didn't pair it with anything it would automatically enter AT mode at 9600 baud, but I wonder if that may only apply to the HC-06 module, not the HC-05 one.

Here is the code I am using to test communication with the Bluetooth module (I am connecting to my custom board via FTDI):

Code:
#include <SoftwareSerial.h>

int BT_RX = 7;
int BT_TX = 8;

SoftwareSerial bluetooth(BT_TX, BT_RX);

void setup() {
  Serial.begin(57600);
  bluetooth.begin(38400);
 
  delay(2000);
 
  bluetooth.write("AT");
}

void loop() {
  if(Serial.available()) {
    byte in = Serial.read();
    bluetooth.write(in);
    Serial.write(in);
  }
 
  if(bluetooth.available()) {
    Serial.write(bluetooth.read());
    Serial.write("tesT");
  }
 
}
15  Using Arduino / Interfacing w/ Software on the Computer / Re: Communicating with Arduino via web app without using Firmata? on: October 03, 2013, 10:02:49 am
Your responses confused me more than helped me, as it didn't seem like you were trying to really help so much as tell me my approach was wrong.

I cloned a relevant repo on Github that accomplishes exactly what I'm trying to do, and learned a few things from it. I'm now using Python to communicate with a local web app through Bottle, as well as communicate with my board via pySerial.

I've looked into every non-web-based GUI that I felt capable of using and felt like they all were pretty severely lacking aesthetically, and wouldn't be something I'd be happy with distributing with a product. I tried several options in Processing (ControlP5, G4P, Guide) and openFrameworks (ofxUI), then checked out the more 'standard' options like Qt and GTK. The latter options were obviously super robust, but way more complicated and hard to work with than web interfaces. Web frameworks like Bootstrap and jQuery are so much easier to work with and better designed (and easier to animate and alter) that I knew I really wanted to find a way to work with them.
Pages: [1] 2 3 ... 17