Show Posts
Pages: [1] 2 3 ... 5
1  Products / Arduino Due / Re: Due for very low power applications? on: July 21, 2014, 07:35:54 pm
I would try to start with a design that is designed for low power, but it might be simpler and almost as good to control the Due power with a small extra circuit. This type of thing is described here http://alanbmitchell.wordpress.com/2011/10/09/design-of-the-extended-battery-life-power-controller-for-the-arduino/

Atmel and Microchip do some low power 8 bitters which could act as power controller. If you have the electronics-fu you could probably get down to nA or something, but for 1-2uA having a micro is a lot more flexible to run timers, wake on int, shutdown request etc.

Of course the Due would need to store its state before powering off, there are a number of ways to do that.
2  Products / Arduino Due / Re: Problems programming the Due on: July 21, 2014, 04:41:30 pm
This is puzzling. I don't think that adc12_sam3u.c should even be in the build, because as the name suggests it is for SAM3U not SAM3X. adc.c is the file for the SAM3X.

Poking about in hardware\arduino\sam\system\libsam, it seems that the makefiles support SAM3U and SAM3X targets. I guess this stems from the time when they weren't sure to use SAM3U or SAM3X.

I can't see that the gcc make files would work at all, but the IAR project excludes adc12_sam3u. The implication is that Arduino must use IAR to build the due_x library?

tldr; just delete adc12_sam3u.c !

Edit: I think I was looking in the wrong place, the make files for libsam_sam3x8e_gcc_rel.a are in hardware/arduino/sam/variants/arduino_due_x. But, I still can't see how the library is built from there. I would like to figure this out, because I want to create a patch to enable the watchdog!
3  Products / Arduino Due / Re: Problems programming the Due on: July 21, 2014, 01:55:39 pm
From the date of the fiddling script, it was written sometime in 2013-09 and the Due library has certainly changed since then. It would be good to know which version of IDE Willy used at the time, but I can't see that written anywhere.

The file that make fails on is adc12_samu.c in libsam/source. The offending line is possibly "#if SAM3U_SERIES" if SAM3U_SERIES is not defined. (It's not good coding style).

Finding the source of the error might be rather difficult, but a workaround might be to define SAM3U_SERIES and see what happens. It would help to know what the previous IDE used was and compare the differences.

I've had similar problems with standalone Due projects that used to work with one IDE version then stop working on another, I don't think there is a way to avoid that until the IDE has stabilized.
4  General Category / General Discussion / Re: Compilation on: July 20, 2014, 07:03:23 am
If you want to have a go at building a computer from scratch, have a look at some of the home-built computers, like this one http://www.electronixandmore.com/projects/relaycomputertwo/index.html

Not a practical way to build a computer, but the result is almost like kinetic art.

5  General Category / General Discussion / Re: Good career options for arduino enthusiasts, and similar tech minded people? on: July 20, 2014, 06:45:21 am
In my experience, there are few opportunities for that sort of person. The type of stuff people generally do hobby-wise is really tip of the iceberg compared to industrial scale projects, and there must be a very small number of companies trying to produce "fun" type electronic gizmos.

Having a hobby interest is good because it demonstrates an interest in the subject, but for nearly all jobs you need the depth of expertise that college provides. In fact you usually need more, but college shows you have an ability to study stuff you may not be interested in. Unfortunately most jobs are 20% interesting and 80% boring stuff you have to do. Endless days in the lab testing...






6  Using Arduino / Motors, Mechanics, and Power / Re: Stepper motor jitter on: July 20, 2014, 02:23:26 am
The AF_Stepper class does not appear to implement acceleration profiles? If you are stopping without acceleration, then the moving mass will cause some oscillation about the final step point.  In the worst case it could lead to missed steps.

It appears that using this library microstepping doesn't work with single steps, the library starts and stops on a full step. You would need to perform a multiple of the microstep interval (16 may be the default) per call to get proper results.

Which version of the motor shield have you got? The V1 motor shield and library are pretty basic, you may struggle to get precise operation from it. The v2 board looks better, but a4988 driver or similar and accelstepper might be a better option.
7  Using Arduino / Motors, Mechanics, and Power / Re: Powering a stepper - questions on: July 17, 2014, 03:07:10 pm
You can disable the stepper driver with the Enable signal, that turns off the motor outputs. Of course that means the stepper can move freely, there is a small amount of detent so if the carriage is horizontal it is unlikely to move.

I am guessing the positioning is not critical (i.e. +/- 1mm).

I agree with MarkT, a DC motor with encoder is not that expensive and a lot less power.
8  General Category / General Discussion / Re: Is it possible dynamically create the name of a function? on: July 16, 2014, 02:05:28 pm
I'll say the answer is sort of yes. You can't create function names to call at run-time, but you can have a function pointer in a variable, and assign values at run time, which does something similar to what you are asking.

Here is a simple example

Code:
int j;

void func0(int arg)
{
   Serial.print("func 0: ");
   Serial.println (arg);
}

void func1(int arg)
{
   Serial.print("func 1: ");
   Serial.println (arg);
}

void setup()
{
  Serial.begin (115200);
}

void loop() {
   void (*fp)(int);

   fp = func0;
   fp(j++);

   fp = func1;     
   fp(j++);
}
9  General Category / General Discussion / Re: Compilation on: July 16, 2014, 01:43:48 pm
It's a good question.

Bootstrapping, it's called. Nowadays everything can be done with cross-compilation. You can also build emulators, so you can write and debug code in a virtual machine environment before any target hardware is built. We used to do this when I worked on mainframes.

So at the root, when you have no compiler, no assembler, no OS to drive keyboard/screen - how do you get the code running ?
You can write an OS or compiler in assembly language. Without an assembler, you have to translate the assembler to octal (or hex) machine code - there were programmers who could do this in their head, and didn't need to look up codes in the handbook.

Now you have code in octal or hex, how do you get that into the computer? The answer is a switch panel. You enter the address, the data, and press store, and the value is written to RAM (or core store smiley ) This is how we bootstrapped our mainframes. The bootloader was entered by hand, after power up. Some engineers memorized the whole sequence (it was not many instructions).

The bootloader would then read code from a paper tape say, to fill RAM with a longer bootloader or mini-OS to drive more peripherals. The paper tape can be created with a dumb electromechanical machine, or in the days of punched cards you could do it with a hand punch.

Other ways of getting code into memory were hand weaving - http://en.wikipedia.org/wiki/Core_rope_memory.

The same method was used for mini computers and early microcomputers e.g. http://www.pdp8.net/pdp8i/pics/pdp8i_frontpanel.shtml?large
10  Products / Arduino Due / Re: DUE Watchdog usage on: July 15, 2014, 02:10:00 pm
So I think, that the new weak function should be named WDT_Initialze(), to avoid confusion.

Are there any readers here, which work on the that layer of libraries? 

I don't, but I think that would be a very useful patch! I'd like to use the watchdog in some code I am doing.

I guess to get it included requires a git pull request and some polite badgering on the Arduino dev list. smiley
11  Products / Arduino Due / Re: aruino due board file on: July 15, 2014, 02:02:35 pm
i have attched the clear picture .please if you have latest board file .pplease send me

I found the same thing, but actually it is the other way round : the board file on the web is the latest version, you have an older version of the board.

The Due went through a number of minor changes, unfortunately these are not documented anywhere I have found, and there is no revision number on the board.

The reason I looked into this, is that on older boards the serial comms is faulty at baud rates higher than 115200, around the time that problem was fixed IC10 was moved.
12  Products / Arduino Due / Re: Arduino Due Memory Usage on: July 15, 2014, 01:46:15 pm
C is quite strict about types. it will perform calculations in the type of the arguments, depending on certain rules.

So if you use integer parameters it will do an integer divide, even if the result is going to be stored in a float. If you include an integer variable or constant in an expression which  you want to assign to a float, either cast or declare all the arguments as a float type, or a shortcut that often works is to make the first one a float, then the whole expression is done as a float.

To make an integer constant a float constant, add a "f", or ensure there is a decimal point.
The cast "(float)" works for variables.

The following should all produce 1.25 :
Code:
float Calibration = 5f/4f;
float Calibration = 5f/4;
float Calibration = 5.0/4.0;
float Calibration = 5.0/4;

And this should fix the first example:
Code:
int Temperature = 50;
int realTemperature = 60;
float Calibration;
Calibration = (float)Temperature / realTemperature

In general, best to stick to floats throughout, although some functions might return an integer for example which you may still need to cast to float.
13  Products / Arduino Due / Re: Code upload failing on: July 13, 2014, 04:58:20 am
I think that the SoftwareSerial library has not been ported to Due.

T|he Due has 3 more hardware serial ports, these are named Serial1, Serial2, Serial3. Physically they are mapped to pins 14-19, consult the pinout diagram to match up the ports. (TXD1/RXD1 is Serial1, and so on).

There is potentially one more hardware serial port available, but it is not supported by the Serial library. Beyond that would require software method.
14  Using Arduino / Programming Questions / Re: linear motion with two steppers (AccelStepper) on: July 13, 2014, 04:40:38 am
It's a pity that AccelStepper doesn't support coordinated moves, it would be useful. It would also be good if it used interrupts, but doing both of those would require quite a bit of hacking I think.

I'll echo what others have said, looking at printer/CNC firmware will give you a good idea of how to do coordinated stepper movement, most use Bresenham's algorithm.

As it happens I am working with the Marlin printer firmware right now, the two modules you would need are planner.cpp and stepper.cpp. Might take a bit of work to remove all the dependencies, but once done, would make a handy little library.

Marlin uses code derived from grbl (designed for CNC use), and the stepping algorithm is based on Bresenham. It also uses true acceleration calculation, although using a different method to AccelStepper.



15  Products / Arduino Due / Re: Due multiplexer shield on: July 12, 2014, 10:54:16 pm
It looks to me like the Centipede could run at 3.3V. Try sending them an email, they might be able to sell them ready configured.
Pages: [1] 2 3 ... 5