Show Posts
Pages: [1] 2
1  Products / Arduino Due / Re: Library Problem With IDE V1.5.1r2 And Due on: January 28, 2014, 06:08:47 am
My scheme shown above did not work entirely. It did prove that the Due board is named "__SAM3X8E__" as it looked for sam/pio.h. However, it did not find that file either so the solution will not work.

Hope this thread is not dead yet....

pio.h is located in this folder:
Code:
~/arduino-1.5.4/hardware/arduino/sam/system/libsam/include/

I am also facing mentioned issue, where IDE not compling due to "missing" header files.

I tried also linking pio.h > /avr/io.h but without success....
2  Using Arduino / General Electronics / Re: Voltage change at motor movement on: January 19, 2014, 03:00:07 pm
You should not use voltage divider for providin 7V to arduino. You will need 0,5W resistors, or better 1W ones. They will dissipate a lot of heat, not so much effective way in this case.
Since you are using a ATX supply, you have nice clear 5V line. Use it to power Ethernet module and sensors. Arduino itself could be connected to 12V to Vin pin. Arduino itself without powering external peripherials could handle 12V through onboard regulator without problem.

BTW.: I am still thinking if you arent drawing too much current with DC motors while they start to move. The first implulse could load over 10 or more Amps per motor. I would be very helpfull to measure it via memory oscilloscope. Maybe try to add a bigger capacitors for output lines to prevent pulse voltage drop.
3  Using Arduino / General Electronics / Re: Voltage change at servo movement on: January 19, 2014, 05:28:44 am
If you are using ATX PSU, you have a plenty of 5V lines availiable. Use 5V line to power ethernet, it might help.

But as your servos draws really high currents, do you have them on different supply branches? On all ATX there is a current limit per branch.

Also if you are using e.g. Eurocase or some noname china PSUs, they cant deliver power as they have market on its spec sheet.
4  Using Arduino / General Electronics / Re: Connecting stabilized voltage to 5V pin from DC-DC converter on: January 18, 2014, 07:16:49 pm
I remembered one solution about wich I heard with good ol LM317 in security systems. There was also often battery connected behind linear regulator.
Found it, because I knew there was just diode smiley-wink

It looks like this:


It should work, but never tried it. according to source:
"D1 is a general purpose 1N4001 diode, used as a feedback blocker. It steers any current that might be coming from the device under power around the regulator to prevent the regulator from being damaged. Such reverse currents usually occur when devices are powered down."

I will give it a try as this looks like the most effective solution smiley-wink

What do you guys think?
I also must hope that principe of operation of AMS1117 is similar like LM317 - didnt found its internal block schematics....
5  Using Arduino / General Electronics / Re: Mosfet power dissipation on: January 18, 2014, 06:06:13 pm
During the time when the FET turns on there will be more as the FET resistance goes from very high to very low.
...
This is much harder to calculate and you need to know things like the rise time of your driving signal under the capacitive load that is the gate.

Forgot to mention that smiley-wink

As Grumpy_Mike told really nicely. Its harder to calculate. You have to count percentage when FET is on and off. Not easy realy, as these components arent linear.

If you dont have good practise with calculating this, better to use common sense and start prototyping with DIP MOSFETS with huge heatsing. This is a way how I am doing it when douing PWM controls for 10W leds
Once circuit is on, watch temperature on heatsing and use smaller if cool enough smiley Then you can move to smaller packages.
6  Using Arduino / General Electronics / Re: Mosfet power dissipation on: January 18, 2014, 05:45:27 pm
I ma not good at maths like this, but i drove single 10W LED diode with one MOSFET in TO-220 package. It required heatsink about 10 x 10 x 3cm and never become hot.
BTW. what color of leds are you driving?

So i guess that this is possible. But be carefull, TO-263 package is quite dependent to good solede in order to properly cooling.
7  Using Arduino / General Electronics / Re: Connecting stabilized voltage to 5V pin from DC-DC converter on: January 18, 2014, 05:18:40 pm
In theory yes, but I think there is an issue with the linear regulator on some
boards not liking being reverse-powered and sinking lots of current.  Check it
out with a multimeter?

Thanks for note!
I didnt have multimeter at time of writing of first post. Now I am home and checked that Arduino 5V power pin is connected directly to the regulator output. Ground is shared also, of course.
So it mean, that it could be done, i will try it with regulated supply with double fuses and resistor, jus for double sure if something goes wrong....

Be aware that DC-DC converters will likely cause a few LSBs of noise in the
output of analogRead(). 

I am counting with it. As my project is super high precision measuring device, which measures precison analog voltages in milivolts. Several samples are taken during second and then processed with some funky mathemathics smiley-wink
Because interference immunity is hence very important, I have ferrite cores on all wires. Just for case.

You might be able to use the DC-DC converter for
the parts of your circuit that takes a lot of current and supply 12V to the barrel
jack of the Arduino so it runs off its regulator (takes about 35mA alone which
isn't much compared to your 500mA load).

Good idea, if everything elso goes bad smiley
Will checkif 5V output asi input works first... Hope it wont burn something...
8  Using Arduino / General Electronics / Connecting stabilized voltage to 5V pin from DC-DC converter on: January 18, 2014, 01:47:33 pm
Hi all,

looking for advice for power solution:
My current project uses relative huge current (up to 500mA) on 5 Volts. Because whole project will be powered from 12V lead-acid battery, powering arduino and connected periferials from onboard linear regulator (AMS1117) is almost impossible due to high overheating (could be destructive in summer days) and also huge power loss - this makes linear regulator unsuitable for battery powering in wide temperature range.

I dont like linear regulators at all, mostly using DC-DC step-up/down converters to enhance efficiency and lower the power dissipation & power losses.

Because I have several 12V to 5V stabilized step-down DC-DC converters. But they cant be connected to Vin pins, because these lead to linear regulator which makes big voltage drop.

So, my deduction is this - please correct me if I am wrong !!! :
Onboard linear regulator is 5V fixed and its output should be connected to 5V pins and CPU itself. All 5V pins are connected together.

Question is, if this above is true, could I connect stabilized 5 Volts from DC-DC converter to Arduino 5V and GND pins? No other power source will be connected of course.

Thanks for ideas.
9  Using Arduino / Storage / Re: SD card problem on Mega, can a card go faulty via SPI but still work in PC? on: December 22, 2013, 06:56:12 pm
My favorite SD shield is from ADAFRUIT that combines a SD socket with level shifters as well as the well supported 1307 RTC with battery backup socket. A good value for two features that are often used together.

http://www.adafruit.com/products/1141


Are you sure that this is compatible with Mega also? There is no mention about ICSP header, and in place of PCB where it should be is drilled array.... Also they dont show bottom of shield.

BTW i dont think that DS1307 is good solutin. Personally use only DS3231 module because DS1307 had big problems in long term accuracy.

nightcrawler218:

You can try ask seller if they will ship in your country with extra cash. Or look for other sellers, but hope you will find a good supplier, as I mention - only few shields/modules with level shifters are on market for reasonable price....
Also look at this shield:
http://www.ebay.com/itm/TFT-SD-Shield-for-Arduino-MEGA-2560-LCD-Module-SD-level-translation-2-8-3-2-DUE-/121161179201?
It also has level shifter. But it more proposed for usage with color tft modules (has STM32 compatible connectors). Thats why it is not so cheap, but shtill costs less than Adafruit smiley-wink

EDIT:
While searching for some components for my project, found this seller which ships worldwide - hope you are not from Hong Kong or China (these are exceptions):
http://www.ebay.com/itm/Arduino-SD-TF-card-expansion-board-Shield-module-Stackable-module-building-block-/310735773715?
10  Using Arduino / Storage / Re: SD card problem on Mega, can a card go faulty via SPI but still work in PC? on: December 22, 2013, 04:31:07 pm
Here you have it:

http://www.ebay.com/itm/Arduino-SD-TF-card-expansion-board-Shield-module-Stackable-module-building-block-/171183223678?pt=LH_DefaultDomain_0&hash=item27db50b37e

They are shipping almost woldwide. I have already purchased it from this seller.
11  Using Arduino / Storage / Re: SD card problem on Mega, can a card go faulty via SPI but still work in PC? on: December 21, 2013, 06:23:55 pm
Hi,

it definitely looks like mine problem which I tried to solve few weeks ago. Its good to know that version with level shifter is probably extremely (not "just") recommended (even these are really few % of market).

Thats why I have ordered shield from ebay which has level shifter IC. Also it has ICSP header, so it could be used on Mega an also on Uno. I am using Mega2560.
It will arrive in next days (I hope), and it costs under 10$ with shipping smiley-wink

I may post a link of that if you want...
12  Using Arduino / Storage / Re: Interfacing with PS1 Memory Card on: December 08, 2013, 03:22:23 pm
Or if you dont need memory to read from computer also, buy an EEPROM module. It has smaller storage - typically 32Kb, but they are not so much sensitive for wire lenght/precisous voltage-level translators/EMI interferrences.
Price is similar.

Interfacing PS1 card is on my wishlist also, but its really not for weekend job smiley
13  Using Arduino / Storage / Re: Interfacing with PS1 Memory Card on: December 08, 2013, 02:02:25 pm
Short answer: No smiley
Long answer: Yes, everything is possible smiley look in this topic and google for more:

http://www.assemblergames.com/forums/showthread.php?31195-PS1-Memory-Card-Mod-would-this-be-possible

There is usefull pdf which describes how ps1 works.
But remember, that most PS1 cards uses proprietary Sony microcontroller which has no specs on internet. So you should use logic analyser to digg more about interfacint it... Or bypass this chip and interface the flash memory directly.
Overall I dont think it is worth of it. Using SD is simple, with libraries and also cheap smiley-wink
14  Using Arduino / Storage / Re: [SD] Weird-Unable to write into files, reading works ! on: December 07, 2013, 10:41:47 am
OK, so did some tests and tweaks:

- Tried slow down SPI speed to HALF and QUARTER, no luck.
- Also checked all resistors onboard and they are 10k as marked.
- Twisted data wires and added a ferrite core filter.

- Finally checked SD with fdisk (on Kubuntu). Because after each write from arduino  card apperas in my notebook as read-only.  Fdisk reported to me there are clusters with out of range - doe to count of them, it seems that these are which arduino attempted to write into.

Here is output from fdisk:
Code:
helium@ThinkPad:~$ sudo fsck -a /dev/mmcblk0p1
fsck z util-linux 2.20.1
dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN
FATs differ but appear to be intact. Using first FAT.
Cluster 20 out of range (135323653 > 501545). Setting to EOF.
Cluster 22 out of range (6309504 > 501545). Setting to EOF.
Cluster 23 out of range (6947848 > 501545). Setting to EOF.
Cluster 24 out of range (267911169 > 501545). Setting to EOF.
Cluster 25 out of range (268212223 > 501545). Setting to EOF.
Cluster 26 out of range (268208127 > 501545). Setting to EOF.
Cluster 27 out of range (268208127 > 501545). Setting to EOF.
Cluster 28 out of range (268234751 > 501545). Setting to EOF.
Cluster 29 out of range (268216319 > 501545). Setting to EOF.
Cluster 30 out of range (268224511 > 501545). Setting to EOF.
Cluster 31 out of range (268210175 > 501545). Setting to EOF.
Cluster 32 out of range (268208127 > 501545). Setting to EOF.
Cluster 33 out of range (268208127 > 501545). Setting to EOF.
Cluster 34 out of range (268208127 > 501545). Setting to EOF.
Cluster 35 out of range (268208127 > 501545). Setting to EOF.
Cluster 36 out of range (268208127 > 501545). Setting to EOF.
Cluster 37 out of range (268238847 > 501545). Setting to EOF.
Cluster 38 out of range (268224511 > 501545). Setting to EOF.
Cluster 39 out of range (268238847 > 501545). Setting to EOF.
Cluster 40 out of range (268404735 > 501545). Setting to EOF.
Cluster 41 out of range (9865215 > 501545). Setting to EOF.
Cluster 42 out of range (135405632 > 501545). Setting to EOF.
Cluster 43 out of range (234947076 > 501545). Setting to EOF.
Cluster 44 out of range (184582144 > 501545). Setting to EOF.
Cluster 45 out of range (152051904 > 501545). Setting to EOF.
Cluster 50 out of range (8401921 > 501545). Setting to EOF.
Cluster 51 out of range (268377888 > 501545). Setting to EOF.
Cluster 52 out of range (33880304 > 501545). Setting to EOF.
Cluster 53 out of range (1). Setting to EOF.
Cluster 54 out of range (2097216 > 501545). Setting to EOF.
Cluster 57 out of range (2113664 > 501545). Setting to EOF.
Cluster 58 out of range (67110912 > 501545). Setting to EOF.
Cluster 60 out of range (2113664 > 501545). Setting to EOF.
Cluster 63 out of range (4194432 > 501545). Setting to EOF.
Cluster 64 out of range (67637248 > 501545). Setting to EOF.
Cluster 66 out of range (2113664 > 501545). Setting to EOF.
Cluster 67 out of range (33816584 > 501545). Setting to EOF.
Cluster 69 out of range (2113664 > 501545). Setting to EOF.
Cluster 70 out of range (33816584 > 501545). Setting to EOF.
Cluster 72 out of range (2097216 > 501545). Setting to EOF.
Cluster 75 out of range (2113664 > 501545). Setting to EOF.
Cluster 76 out of range (524288 > 501545). Setting to EOF.
Cluster 79 out of range (134221856 > 501545). Setting to EOF.
Cluster 81 out of range (1). Setting to EOF.
Cluster 82 out of range (2113536 > 501545). Setting to EOF.
Cluster 83 out of range (33816584 > 501545). Setting to EOF.
Cluster 84 out of range (8388609 > 501545). Setting to EOF.
Cluster 85 out of range (1056768 > 501545). Setting to EOF.
Cluster 87 out of range (1). Setting to EOF.
Cluster 88 out of range (4194304 > 501545). Setting to EOF.
Cluster 89 out of range (67633168 > 501545). Setting to EOF.
Cluster 90 out of range (16777728 > 501545). Setting to EOF.
Cluster 91 out of range (4227072 > 501545). Setting to EOF.
Cluster 92 out of range (135266336 > 501545). Setting to EOF.
Cluster 93 out of range (16908292 > 501545). Setting to EOF.
Cluster 94 out of range (8388608 > 501545). Setting to EOF.
Cluster 95 out of range (135274560 > 501545). Setting to EOF.
Cluster 96 out of range (16909312 > 501545). Setting to EOF.
Cluster 97 out of range (4227072 > 501545). Setting to EOF.
Cluster 98 out of range (33818640 > 501545). Setting to EOF.
Cluster 100 out of range (1056832 > 501545). Setting to EOF.
Cluster 101 out of range (33555464 > 501545). Setting to EOF.
Cluster 104 out of range (33818640 > 501545). Setting to EOF.
Cluster 106 out of range (2113664 > 501545). Setting to EOF.
Cluster 108 out of range (8388609 > 501545). Setting to EOF.
Cluster 109 out of range (134221856 > 501545). Setting to EOF.
Cluster 111 out of range (8388609 > 501545). Setting to EOF.
Cluster 112 out of range (67637280 > 501545). Setting to EOF.
Cluster 115 out of range (135266336 > 501545). Setting to EOF.
Cluster 117 out of range (4227072 > 501545). Setting to EOF.
Cluster 118 out of range (135266336 > 501545). Setting to EOF.
Cluster 120 out of range (8388609 > 501545). Setting to EOF.
Cluster 121 out of range (135266336 > 501545). Setting to EOF.
Cluster 123 out of range (2113664 > 501545). Setting to EOF.
Cluster 124 out of range (67633168 > 501545). Setting to EOF.
Cluster 125 out of range (16777728 > 501545). Setting to EOF.
/test
  File size is 12288 bytes, cluster chain length is 4096 bytes.
  Truncating file to 4096 bytes.
/FSCK0001.REC
  Contains a free cluster (32790). Assuming EOF.
/FSCK0001.REC
  File size is 49152 bytes, cluster chain length is 36864 bytes.
  Truncating file to 36864 bytes.
Reclaimed 90 unused clusters (368640 bytes) in 89 chains.
Performing changes.
/dev/mmcblk0p1: 109 files, 126/501544 clusters
15  Using Arduino / Storage / [SD] Weird-Unable to write into files, reading works ! on: December 06, 2013, 06:27:21 pm
Hi all!

I am having quite strange problem with my current project.

I am using Arduino Mega 2560r3 with RTC (I2C), SD (SPI) and B/W dot matrix lcd (UART).

Basic operation of my project - read 8 analog samples, create average and write it into SD with timestamp.

Finally connected SD module with compatible SD (worst experience ever - tried 8 cards and only the last one worked!!!). Checked it with "CardInfo" sketch.

THE PROBLEM: My program reads current date from RTC and creates string which is used as filename. But program only writes s file, but nothing into it! It is still 0 bytes... If I change filename, file is written, but again - empty.
Once I have done "something" and everything worked correctly - had data in files. Later againt "something" happened and now I have again empty files smiley-sad

I thought about some bad connections (something like WR - write protection), but SD doesnt have anything like this.

Could it be software related? I am suspicious about function "sprintf()" that caused some problems early...

Thanks for any ideas!



I may post full code, but dont want to paste all (over 300 lines and still growing - not finished), so here is part of code that writes into SD:


Code:
//filename
  sprintf (DateField, "20%02u%02u%02u.CSV",year,date,month); // http://forum.arduino.cc/index.php?PHPSESSID=go7j8f5fpvr23ooqtbr23lnmd0&topic=106697.msg800508#msg800508
  mydisp.setPrintPos(0, 5);
  mydisp.print("FILE: ");
  mydisp.print(DateField);
  mydisp.print("  ");
  //ukladani do souboru
  String dataString = "";
  File dataFile = SD.open(DateField, FILE_WRITE);
  dataString += String(mVvalueInt);
  // if the file is available, write to it:
  if (dataFile) {
    SDerror=false;
    if (FirstStart==true) {
      dataFile.println("SYSTEM ONLINE");
      //dataFile.println("FILENAME     - TIME     - DOSE (nSv/h)");
    }
    dataFile.print(DateField);
    dataFile.print(" - ");
    sprintf (TimeField, "%02u:%02u:%02u",hour,minute,second);
    dataFile.print(TimeField);
    dataFile.print(" - ");
    dataFile.print(dataString);
    dataFile.println("");
    dataFile.close();
  } 
  // if the file isn't open, pop up an error:
  else {
    SDerror=true;
  }

Pages: [1] 2