Show Posts
Pages: 1 ... 3 4 [5] 6
61  Using Arduino / Programming Questions / Re: Uploading .hex files created outside the Arduino IDE? on: February 02, 2011, 07:22:35 pm
I suggest that you get the project going in some fashion with the simplest method available and then move parts or all of it to assembly by embedding it in the C code when time critical parts are identified.  Do it in Arduino C++ and then fix as is necessary.
62  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 30, 2011, 03:31:20 pm
Bob Anderson, I feel for you.  I see this post may be redundant after we all tied the build path

Thank you for the build.path= line for the preferences.txt file.  For me there is an important change of action when the build path is changed.  Without the build the commentary at the bottom of the screen ends with something like:

C:\DOCUME~1\Owner\LOCALS~1\Temp\build6058277634917607854.tmp\meg09.cpp.hex

indicating that a build directory was generated.  On my XP machine the build directory is persistent.  I assume, without testing, this is the result of leaving the delete previous applet box in the preferences tap unchecked.  Whatever, it is okay with me.

When the build.path parameter was added the bottom line became something like this:

c:\___a_output\meg09.cpp.hex

Far more handy to look AND feel the output.   Easier to build batch files for objdump.exe.  EXCEPT, everything in the directory is erased when the Arduino application is closed.  This led to a near heart stopper when, on the first try, I discovered I had mistakenly typed in the directory name of my project files instead of the intended location of the Build files.  I poked around a bit and decided that I had to erase the build files and fix the parameter before it got me into trouble.  I shut down Arduino in order to edit the preferences.txt file.  The result was the complete erasure of the entire hierarchy of project files, and not to the recycle bin.

Although somewhat mentally challenged,I am capable of slowly learning, particularly if blood and pain are involved.  Just before trying this I had mashed the icon that incrementally backs up the arduino files to a compter "somewhere else".



63  Using Arduino / Programming Questions / Re: pressure vessel on: January 27, 2011, 11:40:25 pm
Hello,

Arduino outputs nicely drive the gates of 2N7000 field effect transistors.  These will make a good switch on the low side of the pump load.  Each transistor will be good for .3 amps or so.  Use two or three. They work in parallel.  Hook the source leads to ground, common or whatever you call it.  Connect all the drains together and to the negative lead of the motor.  Connect the other lead of the motor to the power.   If it turns backwards, reverse the motor leads.  Look up "flyback diode"  you will need one.  A 1N10003 is fine.  or 04  or 02.  You cannot go wrong.  Using an Arduino PWM output, you will even be able to run the pump motor at slower speeds..  Remember the "flyback' or 'freewheeling" diode.  Lots of other parts will work fine.  The parts I mentioned should cost less than a a dollar, total. 

There are lots of plastic pressure sensors.  Check Ebay to see a varity of them for sale.  Mount the pressure sensor to the board and bring a tube to the sensor.   You want one that puts out an amplified signal so that it will not be necessary to fool around with amplifying a millivolt signal.  It will be a trick to fine an amplified device that outputs a full 0 to 5 volt signal using a 4 volt supply, but give a cheap one a try, it certainly will not go to 5 volts but you may not need the full range and it might work fine. 

Look at the Arduino examples for PWM  Once you get it going, check out PID controls to enable the pump to run exactly as fast as is needed to maintain a pressure set point.  Plan on spending enough time to learn all this so your controller is a strong part, not a weak part of the system.

good luck

John Carroll

64  Using Arduino / Programming Questions / Re: Renameing a file with SdFat on: January 27, 2011, 11:02:42 pm
A buffer-full at a time works fine.  It took less time to do it than to complain about it

jac
65  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 27, 2011, 09:03:42 pm
stimmer,

Thank you.

John Carroll
66  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 27, 2011, 08:39:10 pm
Bob Anderson

I agree with the points you make.  When writing for a controller, I am always pleased to have an easy and quick to program system create the user and communication interfaces and then revert to assembly for the interrupt routines that actually do time sensitive controlling.  If you had access to the assembly code that Arduino system emits, you could see when and what resources it is using and stay clear of interference, or change the Arduino program to avoid problems.

John Carroll

Interesting how the spell checker hates Arduino
67  Using Arduino / Programming Questions / Re: Renameing a file with SdFat on: January 27, 2011, 08:24:47 pm
Can one have more than a single file open at a once, or is it an open-seek-read-close  ---- open/append-write-close dance?

Not a big deal really, just seems kind of grubby.  Everything else in SdFat works like a champ.

Thanks,

JAC
68  Using Arduino / Programming Questions / Renameing a file with SdFat on: January 27, 2011, 06:38:02 pm
I mistyped when I asked this question regarding RTClib.  That would be quite a trick

I need to rename a file on SD card after it is detected and used to configure the device.  I see no way to directly rename a file.  Perhaps copy to a new name and delete the old one, but I see nothing to use to copy either.  Two files open at once for a byte by byte copy seems like a bad idea.

Any suggestions?

Thanks,

JAC
69  Using Arduino / Programming Questions / Re: Problem with SD Library and long strings on: January 27, 2011, 04:19:53 pm
I fought almost this same problem for a long time.  Because the problem would come and go, and because  it seemed to respond to the order and when variables, and particularly char arrays were declared, It only dawned slowly that it was a memory problem.  Considering the time spent chasing the problem, the move to a megaArduino was a cheap fix.  I

I now declare the char array buffers globally so they don't impact ram in unexpected ways.

I use one of the RAM reporting functions and stick a Serial.print in here and there while debugging to see how RAM is coming.  I see lots of discussion about the relative merits of the RAM programs, but if it continues to report 3000 bytes available in the Mega implementation, who cares about precision.
70  Forum 2005-2010 (read only) / Troubleshooting / Re: How can I synchronize two milis in two separate on: December 17, 2010, 08:56:42 pm
You can pretty much count on a gps to work if it ever worked.  The trick is to write something that will grab the millisec at the same moment relative to a minute roll over or something noteable.  I have never attempted anything very precise because we are happy with 50 ms, which is only three sixty cycle waveforms.  Good enough for us.

Our gps s output a 1 second square wave.  I do not know if the signal is synchronized to real time.  If it is, great, you could watch the serial stream from the gps until a strategic roll over takes place, then watch the square wave for a programmed number of transitions and sync on a transition.  

sync_millis = millis();

After that:

elapsed_time = millis() - sync_millis

A button would notify the board to sync on the next five minute roll over, or what ever.  Sync both ends at say 9:00 and they should be good for a day.  A lamp will let you know that a good sync has taken place.
71  Forum 2005-2010 (read only) / Troubleshooting / Re: How can I synchronize two milis in two separate on: December 17, 2010, 02:00:29 pm
Could the time be resolved precisely enough with a GPS in each unit?  We start and stop remote loads attached to a single generator this way to avoid jolting the engine and generator with each start and stop
72  Forum 2005-2010 (read only) / Troubleshooting / Re: Correct mode of Parallel Port to burn bootloader on: November 27, 2010, 12:38:44 am
There are only four modes.  Let us know which one works
73  Forum 2005-2010 (read only) / Troubleshooting / Changes from 19 to 21 on: November 26, 2010, 09:26:21 pm
Are there subtle differences between ver. 19 and 21 that would cause the problems I will describe?

A program compiles to about 23k and has lots of variables, most are const.

windows, Duemilanove and Uno boards.  Of course the problem with the uno only occurs with 21

includes:

#include <SdFat.h>
#include <SdFatUtil.h>
#include <Wire.h>
#include <RTClib.h>
#include <EEPROM.h>

The program compiles and runs fine from 19, although I know there is very little variable space remaining.

The same program hangs when loaded from 21

I would post the code except that it hangs instantly if a logger shield with a lot of custom wiring is not attached.  I do not believe it is a code or library problem.

I know from experimenting that all of the pieces of code work if other pieces are commented out.  For instance, commenting out references to functions and removing the function allows it to run.

The SdFat utility freeRam() reports something like 32 when loaded from 19, and never executes when the program is loaded from 21.  Reducing the allocation to a buffer lets the program run further, but causes other variable to get stompped on.

It seems like 21 may grab more space for its self or there are conditionals somewhere that are sensitive to the version pf Arduino.  I would really like to see some of the files that used to be available after loading

Does this fit any known issues?

Thanks for any thoughts.

JC
74  Forum 2005-2010 (read only) / Troubleshooting / Re: usb not recognized (plaese help) on: November 26, 2010, 10:49:52 pm
Twice we have had computers lose track of the drivers for the FTDI usb chip and had a terrible time getting the proper drivers reinstalled.  This finally did the job:

http://www.ftdichip.com/Drivers/CDM/CDM20802_Setup.exe

THIS IS NOT THE SOLUTION FOR YOUR PROBLEM! It is the solution for other people's problem.

A similar solution probably is available from and for  Prolific parts

JC

75  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino RS-232 Translator. on: November 26, 2010, 10:35:22 pm
It looks like you are really motivated to find a solution, so you probably will eventually get there.

Windows or Linux based software?  If Linux, I suggest an attempt to create a process to intercept the communication each way, modify it and pass it along.  The same is possible in Windows, but no knowledge or skills here.

The first and most important step is to obtain some sort of serial port monitor software and use it to monitor the attempts to communicate, both query and response.  This will but you miles ahead and let you know what the challenges are, and how your attempts at a solution are working out.  It will let you know what handshaking procedures you must contend with.  It doesn't look like the channel is going to be overwhelmed with traffic, so you can probably side step the handshake issues with jumpers.

Eltima has some packages.  their freeby teaser my be enough for our needs.  It might be possible to create a virtual serial port for the software to connect to and process the data from the real serial port and pass it to the virtual  port and visa versa.

Ask them

JC
Pages: 1 ... 3 4 [5] 6