Show Posts
Pages: 1 [2] 3 4 ... 14
16  Using Arduino / Microcontrollers / Re: LPC810 mini ARM Prozessor in 8 pin dip package on: September 16, 2014, 01:27:37 pm
There was only a precompilde C compiler

so I used C.

GCC includes a C++ compiler!

The LPC chips are good, I have done a few projects with them. I've mostly used free tools, though I did pay for a license for a vendor neutral tool to get JTAG debugging, but TBH it was not great value for money.

The ARM vendors seem to be competing by offering free IDEs, which is a great for us. Arduino everywhere!
17  Community / Gigs and Collaborations / Re: New tool for Arduino IDE on: September 15, 2014, 01:10:35 pm
If compiler can "assemble " the used / working stuff, why it could not be modified to delete  unused function?

The linker produces a list of discarded things, including function names , so this could be used to edit source files for specific cases. A completely general solution is impossible because of the macro preprocessor - the source code seen by the compiler may not correspond at all to the original input file.

If I want to keep old code for a bit I put it inside #ifdef OLD ... #endif. That guarantees it won't bloat the object code and is easy to tidy up later.
18  Using Arduino / Installation & Troubleshooting / Re: Arduino Due R3 with "No Device Connected" Error and no solution working so far on: September 13, 2014, 09:00:42 am
5) The USB-Cable I use seems to work fine, with my Galaxy S3 and during a Loopback Test (!!!), which is why I do not think the connection is the problem here

Rule #1 of troubleshooting : never assume anything.

The fact you have verify failures strongly suggests a hardware error. Therefore it's either the cable or the board. It's cheaper and easy to try a different cable. If it works with other devices that does not really help, because in those other cases you are not trying to program a chip.

19  Using Arduino / Installation & Troubleshooting / Re: Arduino Due R3 with "No Device Connected" Error and no solution working so far on: September 13, 2014, 06:16:58 am
You don't say how/where you got the USB drivers, it would be a good idea to install the latest. Sometimes it seems that Windows does not pick up later drivers if the device already has an earlier driver. What I do is uninstall the USB device, (and in extreme cases find the oemxxxx.ini file in Windows and delete it).

You may have found it already, but the correct sequence for erase is : press and hold erase, press and release reset, release erase.

After doing an erase, you should be able to program via the native port even if the 16u2 is faulty, as the native port goes straight to the bootloader running on the SAM3X.

it may seem unlikely, but sometimes it is worth trying a different/better USB cable. Some cables of poor quality sort of work but not properly.
20  Using Arduino / Project Guidance / Re: Emergency Shutoff for GRBL CNC with EasyDriver on: September 12, 2014, 02:09:39 pm
I don't know why people are referring to software (there is none involved), or "risk assessments", this is a hobby CNC we are talking about, and the OP never mentioned anything about safety. I think he is smart enough to avoid the whizzy parts or fondling live wires. There is something about the phrase "emergency stop" that gets people in quite a tizzy!

Anyway, I'll take back what I said about EveryCircuit. Despite requiring Chrome and being somewhat limited, it is quite useful and you can get some real numbers out of it, as well as being fun smiley

I did a little circuit to model the use of a NO switch to gate the Enable line from the Arduino. I found the logic called for a NOR gate. The Enable output of the Arduino is modelled as a toggle switch. A sample EasyDrive is modelled as an LED, note the Enable input is active low and the EasyDriver has a default pull-down, a loose wire here is a single point of failure.

For additional bling, a Green LED shows when the EasyDrivers are enabled, and a Red LED shows when the ESTOP is active. (Green = go, Red = stop).

estop-grbl by donotdespisethesnake, on Flickr

For those EveryCircuit ready, here is an online link

I don't think it is strictly necessary to also reset the Arduino, since the drivers won't do anything with Enable high, but I also did another version to put the Arduino into reset when the ESTOP is active. This requires an additional inverter, I used a NOT gate. I am sure there are many ways to create equivalent circuits with the same logic. The Arduino reset is modelled as a LED with an active low enable.

With either of these circuits, after ESTOP is activated the tool position will be lost and the machine needs re-homing.
21  Using Arduino / Programming Questions / Re: Can Arduino IDE compile files in sub directories? on: September 12, 2014, 01:34:45 pm
You can't usefully put anything in a subdirectory to a sketch. All files in the sketch folder are copied to a Temp folder for compiling, but nothing in sub-folders.

You *could* put an include file in another directory and use an absolute path, but I would really not recommend it.

I spent some time trying to find ways round the "flat" restriction in the Arduino IDE, but decided don't fight it, live with it smiley

An alternative is to use a different IDE , like Eclipse, if you don't mind losing Arduino IDE compatibility.
22  Using Arduino / Project Guidance / Re: Emergency Shutoff for GRBL CNC with EasyDriver on: September 12, 2014, 03:22:03 am
If what I have provided is not sufficient, please tell me what you mean by a "proper schematic". Do you mean a wiring diagram similar to that supplied in the image "Logic Test" and if so, what do you need it to cover? That image is the logic design I want to make sure it correct and operates the way I want it to. To my knowledge, all the information I have supplied should be sufficient to determine of the logic circuit will operate as intended.

A proper schematic is one drawn in Eagle or Kicad showing actual components used, with actual pin numbers etc. EveryCircuit is a fun toy, but not something you can actually use for design work.

E.g. Your output from the AND gate goes to an LED, which is noted as actually being a resistor. In that case, draw a resistor! However, it still doesn't make sense, as the output is pulled low but is not connected anywhere.

I can only conclude that on the information provided, EveryCircuit is not a suitable way to present the design,* and your circuit will not do what you want.

* ETA maybe not that bad
23  Using Arduino / Project Guidance / Re: Emergency Shutoff for GRBL CNC with EasyDriver on: September 11, 2014, 04:10:30 pm
I think your intent is good, I tried to implement a similar E-STOP feature in RAMPS-FD. In terms of safety, there are different levels of emergency stop, from stopping movement to isolating power. In many cases, isolating power can be achieved simply by mains switch.  Adding a hardware "stop" is a useful addition, rather than a substitute for electrical isolation. I find it very handy for testing new setups on 3D printers, where a software "stop" is unreliable.

However, I really don't understand your schematic or how it would work. I can't really tell anything from the wiring diagrams. For useful feedback, you really need a proper schematic.

I would also encourage you to use a NC switch as the stop switch, so that if the switch becomes disconnected it causes a safe shutdown. Also consider what happens if the 5V power fails, but the motor or spindle power is still present.

24  Products / Arduino Due / Re: Audio (yes, I know) on: September 10, 2014, 03:15:14 pm
I'm trying to build a one way ethernet radio, but I can't get the code to work at all...

It really is that simple, seems however, that using this processor for recording even small 10ms soundbites is impossible.

I feel fairly sure that this is possible. it may require some careful coding to get there though.

I have been intrigued by this project so I bought an ethernet shield. I haven't got it running on Due yet, but I get about 220KB/sec throughput using UDP and 500 byte packets on an Arduino Mega. I'm also using a W5200 shield, I think this is similar to W5100.

There is (or was) a bug in the Due ADC code which limited the speed of analogRead, figure quoted of 39us, which is not that slow but takes up 30% of the CPU time just waiting. There is some info here on ADC

So I think the raw performance must be there, we just need to streamline the data flows.
25  Using Arduino / LEDs and Multiplexing / Re: 300 LEDs controlled individually on: September 09, 2014, 03:35:37 pm
I would look at WS2812, really easy to use. Can be bought on a self-adhesive strip which makes installation easy, or on carrier boards for ad hoc layouts. Only need one IO pin.

Could work out same price or cheaper than multiple MAX7219 etc, and with individual RGB control a better solution.
26  Using Arduino / Programming Questions / Re: How do I get a class (hardware serial) to use an external buffer? on: September 08, 2014, 03:21:44 pm

It's interesting to hear that some people have no file called HardwareSerial0.cpp. I am using Arduino 1.5.6-r2

Yeah, seems to have been introduced in 1.5.6.

1.5.x is still under some development, so anything that works in other versions may not work in 1.5.6, or indeed future versions smiley
27  Using Arduino / Programming Questions / Re: How do I get a class (hardware serial) to use an external buffer? on: September 08, 2014, 02:00:05 pm
I don't understand why you think that there should be a HardwareSerial0 file, with any extension, anywhere.

Because it exists and it is the file that connects to the UART0_UDRE_vect interrupt vector.
It's simple enough to find out, just search your Arduino installation. On mine, there is no HardwareSerial0 of any sort. It's all handled by HardwareSerial.cpp and HardwareSerial.h. Possibly this depends on which version of IDE you have.

Following a bit more reading the problem may be my ignorance of the C/C++ compiling process.

I have always assumed that the code #include "myFile.h" is the thing that also brings into the project in the associated myFile.cpp. In other words, without that #include neither file would be part of the project.

But I'm beginning to think I am wrong about this and the .cpp files get compiled regardless of the existence (or not) of a similarly named .h file.
Indeed, in general there is no relation between header files and source files, as far as C/C++ is concerned, naming conventions are purely for the programmer. C/C++ compilers perform separate compilation of object files, there is no concept of modules.

However the Arduino IDE does a little extra stuff to include library code if you include the header file, but that is a quite non-standard feature.

I can get what I want to happen by making copies of the relevant HardwareSerial files and renaming them. I was just hoping there might be a simpler way. If I don't rename them I get duplicate definitions even after the #include <HardwareSerial.h> is commented out in Arduino.h. If I could prevent the Library copy of HardwareSerial0.cpp from being compiled I could use my own copy without needing to rename it.
I don't think you can get around renaming, unless you go in and change how the Arduino libs are built.

One way to provide your own defintions for HardwareSerial is to put the following line before including Arduino.h :
#define  HardwareSerial_h // trick to disable the standard HWserial

The Marlin firmware uses this to override the standard hardware serial implementation.
28  Using Arduino / LEDs and Multiplexing / Re: water screen-as do ? on: September 07, 2014, 04:45:39 am
AFAICT, it is just a back projection onto a water screen. Mostly just a question of plumbing smiley
29  Using Arduino / LEDs and Multiplexing / Re: "Group purchase" of LED on: September 07, 2014, 04:44:00 am
What sort of price could you get on WS2812B? Loose or on a strip.

I recently paid £37.50 for 300 on a strip, including shipping (ebay), which works out 12.5p per chip. I wouldn't use DHL/UPS, too expensive, they also like to add import duty, handling charge, and VAT which can double the price. I prefer the "gift" post smiley
30  Using Arduino / Microcontrollers / Re: Uploading code to multiple micro-controllers simultaniously on: September 07, 2014, 04:21:01 am
- I understand that the Atmega328p is quite average in regards to its functions.  I am wondering if there might be other devices designed specifically for this type of scenario. I am not expecting the perfect microcontroller, I realize that most of the heavy lifting will have to happen on the software side, I am just curious if someone might know of a microcontroller which is better suited for this type of task.

There are literally thousands of microcontroller types available, so in order to make a tailored selection it's important to understand exactly what the task is. But probably all types of micros on the general market are not designed for parallel or neural computing. Those are to be found in research labs.

- To answer your question explicitly:
 The topology of the nodes is arbitrary, which is the entire point of the exercise in the first place.

EDIT: However because the topology is arbitrary they could be reconfigured for programming, though I would prefer to avoid that. Also, even though the physical topology is arbitrary, I could still have them electrically be connected in parallel.

Surely the electrical connection is the physical topology? Unless you are using wireless, once you have wired the nodes, that determines the physical topology. You can't change that by downloading new firmware. You might change the logical topology with new firmware, but nodes will have to perform routing. If you have all nodes connected to the same bus (ethernet?), then bus contention becomes a dominant factor.

Tbh, I'm not sure about the general idea. If it is just to explore different algorithms and topologies, you can do all that in software on a PC, and much better. Using physical hardware like an Arduino doesn't make a lot of sense. Arduinos have a pretty limited comms and processor power available. I think what you would end up exploring is how slow the comms between nodes is.

I think if you had a fixed topology, the project would be doable, even if to demonstrate that loosely coupled simple nodes are highly inefficient. To use chips that are designed to be monolithic, and to create a re-configurable physical topology, you would really need to design some custom interconnect hardware.

The Transputer was designed for interconnection, but is no longer with us. Some of the concepts live on in the XMOS xCORE chips, and you can get eval kits for a reasonable price
Pages: 1 [2] 3 4 ... 14