Show Posts

Pages: 1 [2] 3 4 ... 8

16

Using Arduino / Programming Questions / Re: Finding a number in a large array

on: July 31, 2013, 11:38:21 am

So the timing of my application is as follows:
first of all there is a ISR that happens at 1kHz. then I have a serial data logger that sends a bunch of data to computer every 5 ms. The whole thing is being run by a state machine that controls the outputs. (Note: this system is driving a high power piece of equipment that timing is very critical.) Arduino is reading some sensors and in turn controls outputs which run this equipment.
So I need this whole table lookup and interpolation to happen in a very small fraction of a ms, such that if this table lookup and interpolation were to run continuously, it should happen at 10kHz or faster. There is the number 10kHz...
I dont need the table lookup to be reversible... its a one way street...
Thanks



17

Using Arduino / Programming Questions / Re: Finding a number in a large array

on: July 30, 2013, 03:31:19 pm

Thank you all for the replys
This project is like this: I have 3 data tables, 2 of them are 1D and 1 is 2D. The 1D tables have maximum of 50 rows...and the 2D tables have maximum of 50 rows and 20 columns. These tables act as special lookup tables, such that for a given input within the range of the table I have to find the closest upper and lower points in that table. Then I have to do linear interpolation for the 1D tables and Bilinear interpolation for the 2D table. So for 1D tables I have to find 1 upper and 1 lower values and perform 1 interpolation for 2D table I have to find 2 upper and 2 lower values and perform 3 interpolation (a bilinear interpolation consists of 3 linear interpolation)
Now the problem is that I have to do all this as fast as possible... hence my question at the beginning...
Just for improving speed, I have redone my lookup tables so they have fixed increments in the input axis... Now that the tables have fixed increments I dont think I have to do any type of search to find the upper and lower values... (correct me if I am wrong) for example, in one of my tables I have input axis: 100 to 600 in increments of 50 (10 by 2 tables... this will increase to 50 by 2 in the future) to get my indexes of upper and lower values I can do this: lower = (input/50) 2 upper = (input/50) 1
Thank you all... Your responses were some really good learning experience for me...



20

Using Arduino / Programming Questions / Finding a number in a large array

on: July 29, 2013, 11:34:31 am

Hi,
I want to find the index of 2 values A and B in a large array, from an input X, with the following conditions:  the array will have values in an increasing order, and the values are all ints.  the spacing of the values in the array is unknown  X will be an input in the range of coverage of the array.  A will be the closest number to X such that A < X  B will be the closest number to X such that B > X  if X is exactly equal to a number in the array, the index of that number will be returned.
I sort of know how to code this in arduino, but I was wondering what is the most efficient way and less clock cycles as possible way to do this...
Thanks



24

Using Arduino / General Electronics / Capacitor Part Sourcing

on: July 11, 2013, 05:55:05 pm

Hello,
I tried looking for a capacitor with the following specs and nothing so far:  100uF or bigger  less than 1 milli Ohm ESR  Something that can filter out 1 MHz (Mega Hertz) or more switching frequency...
Thanks



26

Using Arduino / General Electronics / LED bar Voltage visualiser

on: July 09, 2013, 12:01:25 pm

Hi I was interested in making a LED bar with 24 LEDs that would show a voltage output in 0.5 volts increments to a maximum of 12 Volts. I only want this to work with passive components... no microcontrollers...
any ideas? Circuit diagrams?
Thanks



27

Using Arduino / General Electronics / Re: Better and faster Microcontroller than the one on Mega 2560

on: June 24, 2013, 01:39:43 pm

Ok fair enough...
For what I need imagine this: I have close to 10 sensors, of which 8 are analogs. The "board" should be able to read all of these sensors, do some calculation, and send the calculated values of these sensors to computer using very fast serial communication. The "board" should be able to do these tasks every ms or less... This is the kind of processing I am doing. I have tested this kind of thing with Arduino, and it crashes all the time. Simply put, Arduino does not come close to the processing power I need.



29

Using Arduino / Project Guidance / PWM Frequency Possible Issue

on: June 12, 2013, 05:22:29 pm

Hello,
I have recently been playing with PWM frequency which is driving a gate driver. I have increased the frequency to 3.95 KHz. I have also increased the analogRead frequency to the fastest speed (~70 KHz). I wanted to know if this increase in frequency would cause internal noise to appear on the analog pins.
Thanks



