Show Posts
Pages: 1 ... 4 5 [6] 7 8
76  Using Arduino / Project Guidance / Migrating from battery power to USB power, advice sought on: May 07, 2012, 08:51:35 pm
I currently produce a product which uses a 9v battery with 5v regulator like an Uno, I use bluetooth with this to send data to PC. I want to produce a version based on Nano that uses USB port for both data and Power.
Problem is the sensor is powered by 5v and its output is obviously dependant on the 5v. I use the internal 1.1v reference. The unit is calibrated for the specific sensor at assembly time.

My question is regarding USB power. I am concerned that the USB power on different computers may vary considerably as the spec is 4.5 to 5.45v I think. Does anyone have experience with this? If my calibration is done on my pc at 5.02v and the users pc only gives 4.8v, the result will be incorrect.

Maybe the USB power should be limited to 4.5v ? Could not use a regulator here, maybe just a zener?
Any advice would be appreciated.
77  Using Arduino / Microcontrollers / Re: Atmega 328 vs 328P Problem on: May 04, 2012, 11:35:06 pm
Thank you
Those settings worked with the ATmegaBOOT_168_atmega328.hex but not with the Optiboot file.
thank you, she now speaks English.
78  Using Arduino / Microcontrollers / Re: Atmega 328 vs 328P Problem on: May 04, 2012, 09:06:43 pm
I tried Optiloader earlier today and now again. Cannot get it to work. I cannot tell if it is programming the board or not as nothing is on the serial monitor. But when I use the programmed board and try to load a sketch, I get an Avrdude error. These problems led me to buy  the avrisp this morning and I am able to burn the bootloader with it. Do you know what the fuse bits should be set to?
79  Using Arduino / Microcontrollers / Re: Atmega 328 vs 328P Problem on: May 04, 2012, 06:06:11 pm
I used a ceramic resonator 16MHz. In the eagle files from Gravitech it says resonator. It looks identical to the one on the original board. Do you think it needs to be a crystal?
I did not change the fuse bits.
Sorry i am a hardware guy and this is a little new for me.
80  Using Arduino / Microcontrollers / Atmega 328 vs 328P Problem on: May 04, 2012, 05:37:18 pm
Does anyone know if there is some difference between the 328 and the 328p that will affect Serial.print?
I made my own Nano board and I guess I ordered 328 instead of 328P. I only found that out when bootloading with AVRISP and AVR Studio reports. I loaded the Optiboot Boot loader. It runs the Blink sketch no problem but when I add a Serial.Print command, it just prints garbage.
When I do the same with my original Nano, it prints fine.
Any help or input would be appreciated. Sorry I am a noob who may be doing something wrong.
81  Using Arduino / Project Guidance / Connections for bootloading a nano based board on: April 18, 2012, 10:26:40 am
I am laying out a pcb based on a Arduino Nano, so it has SMT Atmega328 and the FT323RL. I am a little confused as to what connections I need for bootloading the chips as they will be blank obviously.
Can they be bootloaded through the USB port or do I Have to have access to MOSI, MISO and SCK just for bootloading?
82  Community / Gigs and Collaborations / looking for a PC interface for my simple project on: March 13, 2012, 12:48:40 pm
I am lookingfor an estimate for someone to write  simple PC interfce for my project.
I am using a standalone board and will have to add wifi or USB port to transfer data to PC.
Basically the program should allow a JPG file to be uploaded and then store values read from a sensor on arduino at locations clicked on the JPG. This could be a picture of a machine, the user will click an area on the jpg and the program should insert the current value from the sensor at that location. There may be 20 - 50 locations. The usual font color choices and text size options should be available.
Its very simple but someone who understands arduino comms should do it fine.
Let me know if youre interested and a rough price.
 
83  Using Arduino / Programming Questions / Re: Sampling analogRead() highs and lows. on: March 03, 2012, 11:05:17 am
Ah now that is a good way, thank you. I was thinking of Min Max but was stuck with having to have 2 numbers. Reversing the maximun and minimum possible is a great idea.
Sorry for not being clear about the print and delay, those were only there for testing so that I can see the function is working, they will be removed after.

Thank you Rob
84  Using Arduino / Programming Questions / Re: help understanding multiMap function on: March 03, 2012, 01:43:44 am
Thank you very much. Appreciate your time.
85  Using Arduino / Programming Questions / Re: Sampling analogRead() highs and lows. on: March 03, 2012, 01:38:03 am
Yes it only needs to work once at startup
I can remove the delay but 5 samles over 5 seconds is enough.
It seems to store the low value ok but the high value doesnt hold. After 10 seconds it shows 1 correct reading and then drops to an arbitrary low value
86  Using Arduino / Programming Questions / Sampling analogRead() highs and lows. on: March 03, 2012, 01:08:01 am
I have a need to record the high and low points of a sensor during the first 10 seconds.
from startup to 5 seconds the sensor will be driven low and from 5 to 10 seconds it will be driven high.
I want to return these 2 values.
i tried the following code but it doesnt seem to work. Am I doing something wrong? probably....
Code:
while (millis() < 5000) {
    sampleLow = analogRead(0);
    // wait a second so as not to send massive amounts of data
  delay(1000);
 Serial.print(sampleLow);
  Serial.println("  ");

 }

while (millis() < 10000) {
 
 sampleHigh = analogRead(0);
       // wait a second so as not to send massive amounts of data
  delay(1000);
 
 
    Serial.print(sampleHigh);
  Serial.println("  ");
 
}
87  Using Arduino / Programming Questions / Re: help understanding multiMap function on: March 02, 2012, 05:16:44 pm
Helps a lot, thank you.
I have never come accross the uint_t size parameter before..

What does this mean? I have searched but am not clear on the meaning.
88  Using Arduino / Programming Questions / Re: help understanding multiMap function on: March 01, 2012, 09:59:47 pm
As an add to above, here is my code but I get a compilation error "undefined reference to multiMap(int, int*, int*, unsigned char)


Code:
int multiMap(int rawMM, int* _mils, int* _anlogin, uint8_t size);

 
 
  rawMM = analogRead(0); 
 
  int mils[] = { 1,25,50,75,100,125,150,175,200,225,250,300,350,400,475,550,600}; //output required
 
  int anlogin[] = { 338,381,420,456,492,518,544,571,592,614,640,670,696,719,743,765,779 }; //sampled anlogread
 
 

 
int mm = multiMap(rawMM, anlogin, mils, 17);
89  Using Arduino / Programming Questions / help understanding multiMap function on: March 01, 2012, 09:37:51 pm
I need assistane understanding the multiMap() function found in the playground.

I also have 2 arrays, one is a series of known analogRead points and the second is a list of corresponding output results that I want with interpolation between.

I do not understand the structure and meaning of the multiMap() declaration statement in line 1. Can someone please break down what each of the 4 items are?
thanks
The post is at http://arduino.cc/playground/Main/MultiMap


Code:
The code:

int multiMap(int val, int* _in, int* _out, uint8_t size)
{
  // take care the value is within range
  // val = constrain(val, _in[0], _in[size-1]);
  if (val <= _in[0]) return _out[0];
  if (val >= _in[size-1]) return _out[size-1];

  // search right interval
  uint8_t pos = 1;  // _in[0] allready tested
  while(val > _in[pos]) pos++;

  // this will handle all exact "points" in the _in array
  if (val == _in[pos]) return _out[pos];

  // interpolate in the right segment for the rest
  return map(val, _in[pos-1], _in[pos], _out[pos-1], _out[pos]);
}

Usage
Some snippets shows how multiMap() can be used:


  //My calibrated distance sensor - SHARP 2Y0A02 F 9Y
  // out[] holds the values wanted in cm
  int out[] = {150,140,130,120,110,100, 90, 80, 70, 60, 50, 40, 30, 20};
  // in[] holds the measured analogRead() values for defined distances
  int in[]  = { 90, 97,105,113,124,134,147,164,185,218,255,317,408,506};
  val = analogRead(A0);
  cm = multiMap(val, in, out, 14);



90  Using Arduino / Programming Questions / Re: Unused Analog Inputs Atmega328 - question on: February 28, 2012, 06:10:01 pm
Wow, that is a great article, thank you.
I am using my own board in my device si it has no USB,
Pages: 1 ... 4 5 [6] 7 8