Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 14
61  Forum 2005-2010 (read only) / Interfacing / Re: Getting rid of noise on analogue input? on: September 25, 2008, 04:28:17 am
Quote
Thinking it was noise through the 1 metre sensor cable, I tried it using a pair of resistors as a voltage divider without the sensor connected.

Having read Mike's reply, I see I have mis-read this line.

You could try moving the resistors so they are connected direct on the board and see what variation you get. This will confirm Mike's diagnosis.

My other points are still relevant, though.

Mike
62  Forum 2005-2010 (read only) / Interfacing / Re: Getting rid of noise on analogue input? on: September 25, 2008, 04:14:36 am
Its good that they provide a separate supply for the ADC, but would be better if they also provided a separate ground.

I haven't used the AVR ADC on anything that requires any precision, but I would have expected better than that would be achievable.


Where is your ARef derived from?  If this is going up and down, so will your ADC value.

There is an ADC Noice Reduction mode:

Quote
The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions.

From: http://www.atmel.com/dyn/resources/prod_documents/2545S.pdf

Have you tried this?  It may not be suitable for your application and the Arduino OS may not continue to work properly, but it might be worth a try.

Regards,

Mike


63  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and BT Modem on: September 22, 2008, 11:54:12 am
You can attach a BT modem to your Nano - they just use a serial port from the Arduino.

The BT module on the Arduino BT is from bluegiga. There are others around ... I believe sparkfun sell them.

Regards,

Mike
64  Forum 2005-2010 (read only) / Interfacing / Re: Max value range for sharp IR rangefinder? on: September 18, 2008, 08:19:22 am
Elir,

I had a look at the datasheet, and can't see anything you're missing.

You could try using an external reference voltage for the ADC. This will give you greater resolution in your conversion.

I have heard that the ADC is noisy. Given environment it is hardly surprising. Care taken with power supplies and grounds may improve it.

An external RC filter is worth a try.

Regards,

Mike


65  Forum 2005-2010 (read only) / Interfacing / Re: Max value range for sharp IR rangefinder? on: September 18, 2008, 04:44:13 am
Elir,

Are you using the same range finder as mentioned in the thread you pointed to?

Have you measured the voltage on the analogue input pin with a multimeter to check what value the Arduino should be reading?

The graphs on page 5 of the datasheet for the rangefinder mentioned in the other thread:

http://document.sharpsma.com/files/GP2Y0A710K0F_DS.pdf

indicates a maximum output of about 3.1V and a minimum of 1.4 volts.

There are 1024 different levels on the ADC with an input range of 5V.

So, a 3.1V input should give a reading of (1024 / 5) * 3.1 = 635.

1.4 -> (1024 / 5) * 1.4 = 287.

Measuring the voltage on the input pin will enable you to confirm the ADC values you are getting.

If you're not using the same rangefinder, can you post a link to the data sheet of the range finder you are using.

Regards,

Mike


66  Forum 2005-2010 (read only) / Interfacing / Re: 12v car batery and sms by eeprom on: September 11, 2008, 09:03:37 am
You can run an Arduino in a car situation - one thing to watchout for is that the voltage isn't 12V. When the engine is running, the alternator charges the battery with typically 13.6V and it may exceed 14V.

That said, a decent regulator on a decent heatsink bringing the voltage down to 7V or so before supplying the Arduino will work.

Have you decided how you will send the sms? I ask as I'd like to be able to do that myself, and wonder what you have come up with.

Regards,

Mike
67  Forum 2005-2010 (read only) / Interfacing / Re: Decimilia w/ Sharp IR sensor on: September 11, 2008, 08:41:55 am
Here is a link to the wiki page on op-amps:

http://en.wikipedia.org/wiki/Operational_amplifier

at the bottom of the page is a bunch of links to op-amp circuit collections. You can probably do what you need to do with a basic inverting or non-inverting op-amp circuit. You should be able to find one in the linked articles or someone here may be able to jump in and help out.

Your range is within range of the device, but it is right at one end of the range.  3- 4ft when the maximum is about 18ft. This will limit the increment you can measure. If you adjust the gain of the op-amp so that it amplifies the sensor output to, say, 5V for a 5ft (roughly 1.5 metres) measurement that may help things. With that set up, at best, the Arduino ADC will be able to measure to about 1.5 mm.   (1.5 m / 1024 ). This is in ideal conditions. Noise and the inadequacies of the sensor will all play a part in limiting

As for the power supply unit - the sensor needs a regulated 5V supply rated at at least 350mA. I'm not sure if you can draw this from the USB connector. I would want to get a separate power supply for it. You may be able to track down a wall wart or some similar supply.

Is this a one off experimental thing? Will it be a permanent device? Are you going into production with it. This affects what you get as a power supply.

Sorry I can't help with more specific information.

Regards,

Mike


68  Forum 2005-2010 (read only) / Interfacing / Re: Decimilia w/ Sharp IR sensor on: September 04, 2008, 09:42:11 am
The sensor you mention has been discontinued and replaced by the GP2Y0A710K0F. The sharp website says they are comptible except for mechanical issues.

So, the datasheet for the GP2Y0A710K0F will be useful and can be seen here:

http://document.sharpsma.com/files/GP2Y0A710K0F_DS.pdf .

There are a few things to note:

1) The output is a straightforward analogue output, so reading a distance measurement is as simple as connecting the output to one of the ADC pins on the Arduino and reading the value.

2) The output is non-linear.  If you look at Figure 2 on page 5 of that datasheet you will see the output voltage for measured distances. If accurate distances are required you will need a way to compensate for this non-linearity. The second graph shows the output for 1/distance is pretty straight, so this may be ok.

3) The output doesn't cover the whole 0 to 5V input range of the ADCs meaning that you won't get much resolution. This may be ok, it depends on your application, but the best way to solve this is with an op-amp or two to provide offset and gain.

4) The sensor can't differentiate between distances less than about 80cm and those more than that. What distances are you looking to measure?

5) Although the typical supply current is spec'd at 30mA, the "Advice for the power supply" section it recommends a fairly high power supply requirment of 350mA.

From the graphs, the gradient of the straight(ish) line is (0.01 - 0.003) / (2.5 - 1.5) --> 0.007.

Extending the line to the output voltage axis gives an offset of 1.15.

So a simple equation can be used to go from voltage to 1/distance . . . 1/d = (V - 1.15) * 0.007.

The reciprical of that gives the distance.  A few numbers plugged in shows it is close-ish.

  Vo       D
  1.5      408
  2.0      168
  2.5      105

So the code without external op amps would be to

1) read the ADC  (several times and smooth if necessary)
2) Do the sum.

I hope this helps a bit.

Mike
  

69  Forum 2005-2010 (read only) / Interfacing / Re: Pitch Detection: Guitar to MIDI on: September 05, 2008, 05:15:54 am
As you are only doing one note at a time, you could try measuring the time between zero crossings.

You would probably need to have some low pass filtering to cut down the risk of a harmonic causing false zero crossings.

As a slight aside - do the commercial guitar to midi converters handle bent notes?

Regards,

Mike
70  Forum 2005-2010 (read only) / Interfacing / Re: Creating sine waves with an Arduino on: September 02, 2008, 11:52:35 am
Quote
Ultimately, I would like to be able to have two variable frequencies under 4 kHz
but to start,  I would like to be able to rpocude two sinewaves in the 100 Hz to 500 Hz range
with some pretty good accuracy ( +1 Hz)

OK - I was just musing on ways it could be done with more analog circuitry.

If it were fixed frequencies a 1 or 2 bit dac and a decent bandpass filter may have been suitable.

Regards,

Mike
71  Forum 2005-2010 (read only) / Interfacing / Re: Creating sine waves with an Arduino on: September 02, 2008, 03:54:32 am
I have a few questions:

What frequencies are you looking to create?  
How accurate do they have to be, frequency wise?
Will the AVR being doing anything else other than the sine waves?

Regards,

Mike



72  Forum 2005-2010 (read only) / Interfacing / Re: help: need to read current voltage value on: August 26, 2008, 09:53:09 am
Quote
edit:  I think the Arduino BT uses 3.3v for vcc.  Simply use the formulas above and scale everything back so that you don't exceed Vcc at the analog pin.  

The Arduino BT uses both 5V and 3.3V on the board. As I mentioned earlier inthe thread, there is a swithcing regulator that takes the input voltage and generates 5V. This is used for the AVR processor chip.

There is then a linear regulator which takes the 5V and produces 3.3V which is used by the WT-11 Bluetooth radio.

You can see the circuit here:

http://www.arduino.cc/en/uploads/Main/arduino_bt06.pdf

Mike


73  Forum 2005-2010 (read only) / Interfacing / Re: help: need to read current voltage value on: August 21, 2008, 06:11:11 am
Quote
This could be a fun game.  One person names a random part and the other says how it can be used to read a voltage over Vcc on an ATmega168.

OK - I'll go first - - - a nixie tube

http://en.wikipedia.org/wiki/Nixie_tube

Mike
74  Forum 2005-2010 (read only) / Interfacing / Re: help: need to read current voltage value on: August 18, 2008, 04:20:49 am
The designers of the Arduino BT used a switching regulator (the max1676). this has a low-battery output which actually drives an LED on the board.

You can see the circuit diagram here:

http://www.arduino.cc/en/uploads/Main/arduino_bt06.pdf

You could link LBO/ (pin 3) of the max1676 to one of the input pins on the AVR to test for low battery and switch off or sleep accordingly.

Mike

75  Forum 2005-2010 (read only) / Interfacing / Re: Light Dependent Resistor sensitivity on: July 18, 2008, 05:27:55 am
Quote
Just do NOT apply 9V as in the drawing above this could be bad for your analog pin.

Apply 5V from Arduino and Ground from Arduino.

MikMo, I think it will be ok as long as the LDR is ok (ie not short-circuit).

The minimum resistances of the LDR are about equal to Rbottom, so Vout wiil be about half of 9V - easily handled by the Arduino.

However, as you say connecting to the Arduino supply will work, but only give half scale.

Regards,

Mike
Pages: 1 ... 3 4 [5] 6 7 ... 14