Show Posts
Pages: [1] 2 3 ... 175
1  Using Arduino / Sensors / Re: HC-SR04 and Ultrasonic target direction sensor on: October 01, 2014, 12:04:16 pm
Quote
his brings me to my last question for the moment, how do I get more range ? Is it just by making a more powerful emitter or will I need to arrange the receivers to ?
You may get more distance, x10 times or so, by changing the concept of the receiver . All units, AFAIK, including HC-SR04, register an echo by comparator.  If you ditch the comparator and process analog signal with FFT, you 'll get at least 10x increase in distance, and 300x better accuracy. It's all in reply #8.
2  Using Arduino / Sensors / Re: HC-SR04 and Ultrasonic target direction sensor on: October 01, 2014, 12:31:25 am
Quote
Am I understanding this right ?
He connects the arduino directly to the analogue output of the HC-SR04 transducer to then process it.
So he skips the part where the HC-SR04 transform the data into a pulse of a certain length.
Thanks
Correct.   

Read more how HC-SR04 works,  on-board uCPU,  that generates a pulse with a length proportional to distance, starts the sequence only after you trigger "send" pin. So , it sends a pulse and wait a response.  In your model with 3 units, one as a transmitter and two as  receivers, you would need some way to synchronize 3 units, because receivers also needs  "start" events (even it doesn't send anything - transmitting piezo removed) in order to switch in "listening" mode. You may use cheep 315 - 434 MHz radio for this.
 It would be still possible to build an "asynchronous " system, when two receivers get same "trigger" events periodically,  not necessarily the same time with transmitter. For example, transmitter pings each 1 sec a pulse. You trigger receivers also every second, but doing so signal may arrive immediately or at the end of period. It's not important, if you don't need to know a distance, just an angle. Than you get just a difference in between arriving
 Now, this guy in a link you posted, build two receivers on himself, most likely he is also did just analog part w/o special uCPU for each receiver. Your options - modify cheep HC-SR04 or solder your own.  This uCPU, that build-into HC-SR04,  does some noise measurements and keep adjustment of the comparator , so if you are not really into analog design, better to modify cheep unit.
 I'd suggest, start to experiment, have a scope?
 
3  Using Arduino / Sensors / Re: HC-SR04 and Ultrasonic target direction sensor on: September 30, 2014, 10:31:26 pm
Check it out:
http://coolarduino.wordpress.com/2014/08/10/virtual-touch-screen-3d-ultrasonic-radar/
Basically, this is "passive" target tracker. For "active" everything much easier, and more accurate, +-1 degree error in direction at least.
4  Products / Arduino Due / Re: Arduino Due DAC0 don't work on: September 29, 2014, 08:15:23 pm
You may check the content of registers, see if anything out of order, and compare channels 1 & 2.
Code:
       unsigned long reg;
       reg = REG_DACC_MR;
       Serial.print("\n\tREG_DACC_MR = ");
       Serial.println(reg, HEX);   
   
       reg = REG_DACC_CHSR;
       Serial.print("\n\tREG_DACC_CHSR = ");
       Serial.println(reg, HEX);     

       reg = REG_DACC_ACR;
       Serial.print("\n\tREG_DACC_ACR = ");
       Serial.println(reg, HEX);     
There are some more, less important, look in the sketch.
5  Using Arduino / Programming Questions / Re: Doubt in codes - fix_fft.h - color organ - audio processing - spectrum analyzer on: September 28, 2014, 07:23:24 pm
data = sqrt(data[] * data[] + im[] * im[]);
Data is an array, where "real" part of the complex (output fft is always complex numbers M = re + j * im), and im is an array with imaginary part. Position in this array 0-63 represent a freq. band, 0 to Fsampling/2. Bandwidth = Fsampl. / 2*64
So , if you are sampling input with let say 20 kHz sampling rate, Bandwidth = 156.25 Hz./bin
 than your data[63] + j * im[63]) is the magnitude in bands:
 data[1] = 156,
 data[2] = 312
 data[3] = ....
 data[63] = 9843.75 Hz
6  Products / Arduino Due / Re: DueTimer question - can callback calls overlap? on: September 26, 2014, 01:34:50 pm
Put a volatile uint32_t counter++ in your handler, than read and print out a number every 1 sec. Reset counter.
7  Products / Arduino Due / Re: compile .cpp.elf section '.bss' is not within region 'ram' on: September 26, 2014, 01:29:51 pm
Last time I had this error , I assign an array too big in size. You are out of RAM.
8  Products / Arduino Due / Re: Arduino Due UART with 500kbps on: September 25, 2014, 12:51:00 pm
No, software serial has no 500 k option:
Code:
  //  baud    rxcenter   rxintra    rxstop    tx
  { 115200,   1,         17,        17,       12,    },
  { 57600,    10,        37,        37,       33,    },
  { 38400,    25,        57,        57,       54,    },
  { 31250,    31,        70,        70,       68,    },
  { 28800,    34,        77,        77,       74,    },
  { 19200,    54,        117,       117,      114,   },
  { 14400,    74,        156,       156,      153,   },
  { 9600,     114,       236,       236,      233,   },
  { 4800,     233,       474,       474,      471,   },
  { 2400,     471,       950,       950,      947,   },
  { 1200,     947,       1902,      1902,     1899,  },
  { 600,      1902,      3804,      3804,     3800,  },
  { 300,      3804,      7617,      7617,     7614,  },
9  Products / Arduino Due / Re: Arduino Due UART with 500kbps on: September 24, 2014, 09:30:45 pm
Can you switch to USART? There is an extract from DS:
Quote
36.7.1.2
Fractional Baud Rate in Asynchronous Mode
The Baud Rate generator previously defined is subject to the following limitation: the output fre-
quency changes by only integer multiples of the reference frequency. An approach to this
problem is to integrate a fractional N clock generator that has a high resolution. The generator
architecture is modified to obtain Baud Rate changes by a fraction of the reference source clock.
This fractional part is programmed with the FP field in the Baud Rate Generator Register
(US_BRGR). If FP is not 0, the fractional part is activated. The resolution is one eighth of the
clock divider. This feature is only available when using USART normal mode. The fractional
Baud Rate is calculated using the following formula:
SelectedClock
Baudrate = ----------------------------------------------------------------
-
⎛ 8 ( 2 – Over ) ⎛ CD + FP
------- ⎞ ⎞


8 ⎠ ⎠
Looks like 16 x 10.5 (FP =  4/8) is what you need
10  Products / Arduino Due / USART with PDC (DMA). on: September 15, 2014, 11:49:36 pm
I have a project, where  I need an array of bytes send repeatedly over BT. For now I'm using Serial_1 , and it takes ~10 milliseconds to transmit 500 bytes at 460.800 ksps. 
 So, idea to switch serial in  PDC mode  looks only an option if I need send more in less time.
I couldn't find a library, probably it doesn't exist yet,  so I tried to do some experiments, and all works well except one things, USART0_Hanler().  Compiler reports dublicate in variant.cpp
 
Here is a question:
Code:
/*
void USART0_Handler(void)
{
  Serial1.IrqHandler();
}
*/
I commented out this function, is there a better, clean way to "loose" one of the serial in arduino environment?
11  Using Arduino / Project Guidance / Re: Need suggestion for camera shield on: September 15, 2014, 11:13:43 pm
Or may be like this:
https://www.sparkfun.com/search/results?term=camera
Google 'd provide more links
12  Community / Exhibition / Gallery / Re: Sound Localization on: September 12, 2014, 06:30:20 pm
Published, DUE version of the sound localization project. As there is visual display, I called it Sound Camera.
http://coolarduino.wordpress.com/2014/09/12/sound-camera/

13  Using Arduino / Microcontrollers / Re: arduino ADC and FFT on: September 11, 2014, 11:25:41 pm
Unlikely you can get 50 k on UNO (you haven't say what board).
Here is math: UNO doesn't have DMA, it's max sampling rate 140-150 kHz, with 100 % load CPU.
You may get 100 k. sampling for your 50k input, but whatever cpu time left wouldn't be enough to do FFT or serial transfer.
14  Using Arduino / Audio / Re: FFT with DUE and TFT on: September 08, 2014, 06:12:22 pm
DUE has 12-bits ADC, so dc_offset should be 2047 if you biased inputs to Vcc/2.
There is one more,
Code:
#define    LOG2_FFT           X                     /* log2 FFT_SIZE */
Should I tell you what is correct value fot fft = 256?
15  Community / Exhibition / Gallery / Re: Sound Localization on: September 06, 2014, 11:03:29 pm
Hi,

I attached a sketch to first post. If there are bugs, please, report back.

Currently working on DUE version, same concept but w/o servo, visualization on android tablet, like in the last blog post
- ultrasonic 3D radar. 

Not sure, if you can watch video posted over youtube for this last project - ultrasonic radar, counters show dead activity in the last 2 weeks, probably Z-government of the world block the channel.
 Keep visiting.
Pages: [1] 2 3 ... 175