Show Posts
Pages: [1] 2 3 ... 174
1  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?
2  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
3  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/

4  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.
5  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?
6  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.
7  Using Arduino / General Electronics / Re: level shift DAC output on: September 05, 2014, 06:25:28 pm
Quote
ATmega328P does not support hardware PWM of 12-bits. 10-bits in the highest it goies on Timer1.
Not a problem , use any mode from 8 to 15, setting ICR1 (or OCR1A) you define the number of bits. For example, mode 8 , ICR1 = 4095, no preselector, than using ether OCR1A or OCR1B you setting PWM width writing value from 0 to 4095, and voale, 0- 100 % PWM.
Quote
How would he generate the -30V offset he's looking for without analog circuitry of some kind?
   I haven't say w/o any circuitry.   
1. Level shifting. (+1 transistor, two overall).
2. Bridge.
3. Audio PA
 
8  Using Arduino / General Electronics / Re: level shift DAC output on: September 05, 2014, 06:13:14 pm
Quote
ATmega328P does not support hardware PWM of 12-bits. 10-bits in the highest it goies on Timer1.
Not a problem , use any mode from 8 to 15, setting ICR1 (or OCR1A) you define the number of bits. For example, mode 8 , ICR1 = 4095, no preselector, than using ether OCR1A or OCR1B you setting PWM width writing value from 0 to 4095, and voale, 0- 100 % PWM.
Quote
A servo signal isn't a drive signal for the motor though, it's a control signal for the motor controller, which translates that into positional information and uses a more advanced algorithm to run the actual motor.
Motor controller? what is that?
I think servo comes to live long before than "controller" word was invented.
Quote
How would he generate the -30V offset he's looking for without analog circuitry of some kind?
1. Level shifting. (+1 transistor).
2. Bridge.
9  Using Arduino / General Electronics / Re: level shift DAC output on: September 05, 2014, 12:46:13 pm
Quote
Quote
If so, than why to get all this struggle with analog design, instead of using PWM? You 'd get better resolution - up to 16-bits, simple circuits, 1 transistors with a few caps and resistors .  Couple inductors 'd make nice 2-nd order LPF

I considered this before deciding to go with a DAC because I didnt think the filtered DC from PWM would be a very clean/stable/constant signal. do you disagree? With the PWM setup, I would keep the PWM frequency constant, and just vary the duty cycle to get a different DC voltage from the filter output?
Yes, I disagree. It's not relevant how clean signal you 'd have, all depends on filtering circuitry.
Considering DAC, you may have fast update rate, let's say 400 kHz I2C / 12 bits ~= 33 kHz or so, you can change settings from 0 to 4095 (full scale) in less than 30 usec.
PWM is slower, arduino UNO 16 MHz / 4096 (12-bits) ~= 3.906 kHz at the best, giving 5-10 times for simple filter design and update rate can't go faster than 390 - 780 Hz.
 But, I think in most circumstances it's more than necessary. Look at regular servo motor, having update rate only 50 Hz, it's moves 180 degree fast and easy. PWM is very low cost, you ' d drive 1 transistor from +5V output of the arduino and have what ever voltage you need (depends on transistor, of course ) +60 or +6000V  at the collector. All you need after - a filter, look on-line (wiki) for simple RC filters. Don't need DAC, OPA with low offset, precision, low drift etc. etc. .....
10  Using Arduino / General Electronics / Re: level shift DAC output on: September 04, 2014, 09:01:53 am
I was wander, what is required update rate? How often do you need to re-position your piezo? Probably, not too fast, as piezo 'd be bad choice with it's high capacitance.  
 If so, than why to get all this struggle with analog design, instead of using PWM? You 'd get better resolution - up to 16-bits, simple circuits, 1 transistors with a few caps and resistors .  Couple inductors 'd make nice 2-nd order LPF
11  Using Arduino / Motors, Mechanics, and Power / Re: Hopefully easy for the pros on: September 04, 2014, 08:05:56 am
Glad to hear the issue is solved. Yes, it's confusing when pin declared as input provides a voltage,  at least if it's not so , someone 'd "intuitively" look into software
12  Using Arduino / Motors, Mechanics, and Power / Re: Hopefully easy for the pros on: September 04, 2014, 07:18:27 am
To OP: Have you decided to ignore reply #2, or I'm "invisible ghost" on this forum?
13  Using Arduino / Motors, Mechanics, and Power / Re: Hopefully easy for the pros on: September 03, 2014, 10:04:05 pm
Common error is missing pinMode(x, OUTPUT) declaration in the setup. Voltmeter shows pull-up resistor at digital input
14  Using Arduino / Sensors / Re: Can I use Ultrasonic Range Finder as a speed radar? on: September 02, 2014, 08:57:49 pm
May be interesting project, have you estimate the variation in freq.? What is the medium, than flow speed / ultrasonic speed.
15  Products / Arduino Due / Re: Due DigitalRead() threshold voltage on: August 31, 2014, 05:03:59 pm
Quote
V IL Input Low-level Voltage PIOA/B/C/D/E/F[0-31]             -0.3                                  0.3 x V VDDIOV IH
 Input High-level Voltage PIOA/B/C/D/E/F[0-31]               0.7 x V VDDIO                   V VDDIO+0.3V
Hysteresis Voltage V       PIOA/B/C/D/E/F[0-31]
 except PA0, PA9, PA26, PA29, PA30, PA31, PB14, PB22, PC[2-9], PC[15-24], PD[10-30],
PE[0-4], PE15, PE17, PE19, PE21, PE23, PE25, PE29                 150 500 mV

Section 46.2
Pages: [1] 2 3 ... 174