Show Posts
Pages: [1] 2 3 ... 23
1  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: September 07, 2014, 07:14:16 pm
Yes, all of that should work fine. There is an array for bit timing but it isn't directly tied to the actual canbus speed. In theory you should be able to set any canbus speed. But, some speeds will not be possible to exactly reach. I'd imagine that 100k baud wouldn't be a problem. But, if you try to set it to 46,247 baud you'll probably have trouble.
2  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: August 25, 2014, 09:00:47 am
1. I want to isolate each node on the bus.  This is because the bus length will be up to 100m and each node will have it's own power supply (230VAC at each node).  So far my testing has been using the SN65HVD234 transceivers and they work very well.  But to isolate each node I'm thinking that I'd need to either us some optocouplers between the transceiver and micro controller or change to a different transceiver.  I quick Google turns up the ISO1050 which is available locally.  Here's the datasheet:
http://www.ti.com/lit/ds/symlink/iso1050.pdf
 Am I on the right track?  Has anyone else done something similar?

Good thinking. The ISO1050 works fine with the Due and with the due_can library. I do have experience with this. The GEVCU project has several (> 50) boards out in the field with that exact transceiver. We haven't blown up the transceiver or board yet.

Quote
2. Can the due_can library be used with the AT90CAN series of micro controllers?

No. The AT90CAN series of processors are 8 bit AVR processors and this library is meant specifically for the 32 bit ARM Cortex M3 processor in the Due.
3  Products / Arduino Due / Re: Is the Due fast enough for BLDC commutation? on: August 22, 2014, 03:30:43 pm
Well, the Due is 84MHz and executes one instruction per clock so you get 84 instructions per uS and thus 525 instructions in the span of 6.25us. But, you really have 125uS if you can calculate and anticipate the next operation directly after doing the current one. That gives you upwards of 10,500 instructions. I'm fairly sure that the hardware pins can be toggled at least at 1MHz and maybe faster so that gives you plenty of leeway. But, if you plan to do this why wouldn't you use a chip with built-in three phase hardware outputs? This is much safer because they tend to support hardware based dead time and all sorts of other pleasantries. You might not need to do as much PWM with a BLDC but my understanding is that you still want trapezoidal waveforms so that means you are going to be doing PWM up the ramp and down.

BTW, you can always do digitalRead even if the pin has interrupts. Reading the pin state will still tell you whether it is high or low. But, if you hope to do fast I/O you really might want to use faster routines than digitalWrite/digitalRead. I seem to remember people commenting on ways to make those two functions faster but I'm not sure of the current state of either one. If you need speed it might be better to be sure you've got the fastest routines possible.
4  Products / Arduino Due / Re: i made a prototipe, now i want to make mi own circuit board, what should i do? on: August 07, 2014, 07:40:35 am
Hi!
My name is Erick, im from Chile.
i'm new in Arduino, and for my tesis i have to make a prototipe using the Arduino DUE.
let's say i have make what i want, and now i design mi own PCB using the AT91SAM3X8E. my question is
how can i programm the AT91SAM3X8E (if i buy from RS- components o something like that) to make it run?
in pic i can buy a programmer, or even i can build one myself, so in the PCB i place 5 pins and i programm it, is something similar on this?

thanks

You're in luck! The SAM3X8E chip has a built-in bootloader that allows you to flash it! There aren't any specific outside parts that you need for this. The Arduino Due has it's schematic posted at their website. Download EagleCAD and take a peek. The most important aspects would probably be the reset and erase buttons and the USB hook up. After that you can connect via USB and use the Arduino IDE to flash. Just pretend your new board is an Arduino Due. I'm involved with a project that has done this very thing. We designed a new board and program it by just telling the IDE that it's still a Due.

To reiterate: The chip has all the programming firmware it needs already on board and all you have to do is be able to connect to it via serial or USB and you can program it.
5  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: August 06, 2014, 01:36:37 pm
Manewc,

The first two use the SN65HVD23X transceiver (where X is 0,3,4, etc). That transceiver will work fine. I really wouldn't recommend using the MCP2551 as it assumes a 5V tolerant MCU which the Due is not. If you are building a one-off prototype then the second link with a breakout board would probably be ideal. But, if you're going to use another board like an ethernet shield, then you might be able to add the bare SN65HVD chip on a prototyping section. All the ethernet shields I found don't have such an area though.
6  Products / Arduino Due / Re: Due for very low power applications? on: July 23, 2014, 11:48:21 am
As others have said, the Due is not meant to be used for very low power applications.

I've done some really low power devices before and it can be tough. Any tiny little detail can throw you off. Two big things that will kill your idle current are voltage regulators and pull up resistors. The due has both types of problem. I'm sure that they didn't pick the lowest quiescence current regulator possible. Voltage regulators can even leak current if you bypass them and feed the board directly from a different power supply. Additionally, I believe that the Due has pull ups on the first I2C hardware pins.  Another issue is that it probably leaves all sorts of peripheral hardware in an active state. Even if it doesn't, processors tend to leave their I/O pins in the state they were left in. Pins pulled high will continue to be pulled high, etc. This means you have to fix this before sleeping. It's all a large amount of work to make sure it works properly. The Cortex M3 isn't the most power efficient processor out there but one bonus is that running faster means you can do more work more quickly and go to sleep faster. Still, for super low power applications an 8 bit processor is probably the way to go.
7  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: July 21, 2014, 01:20:11 pm
To help narrow it down you should try two things:

1. Compile and run one of the example sketches that sends data. The pingpong sketch should be fine for this. It should immediately saturate the bus with attempts to deliver frames.
2. You don't happen to have another Due do you? (I'm doctor Suess now)
8  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: July 18, 2014, 07:47:41 am
Oops, I did miss that bug in your code. The data line should be:

myFrame.data.bytes[0] = 0xFF;

The data member of the structure is a union full of different types of access patterns so you can access it by byte, by 16 bit int, by 32 bit int, or by 64 bits all at once.
9  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: July 17, 2014, 10:31:42 am
Sorry, I wanted to help but but I've been unable to log into this forum for the past few days. It seems to be fixed now.

Anyway, your code looked right except that you were missing a semi-colon and a hexadecimal prefix. The below two lines are what would have to change:

myFrame.id = 0x7E0;
myFrame.length = 1;

Those are the correct lines.
10  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: July 11, 2014, 10:21:13 pm
Hello guys,
i have a so many mcp2551 transceiver chip. and i dont want to wait for work (china ship time 15 days  smiley-roll )
so they are 5v level, due is 3.3v level
after the level harmonize (5v>3.3v)
can i use them together with this can api?
Thank you so much
Tufan.

Sure, I don't see why not. We had standardized on a different chip just because it is 3.3v, reasonably respected, and easy to obtain. But, within reason you can use any canbus transceiver chip you want. The transceiver is almost completely transparent as far as the library goes. The only reason we even have code for the transceiver at all is because the SN65HVD chip we're using has an enable pin so you can turn the transceiver on and off. If you don't care about this you can just hard wire it to on or use a chip that doesn't have an enable pin.

As you mentioned, using a 5V chip will necessitate a level shift. You will, at the least, need to turn the 5V CAN_RX output from the MCP2551 into 3.3V for the Due. I'll bet the 3.3V CAN_TX signal from the Due will trigger the MCP just fine but you'll have to try it.
11  Products / Arduino Due / Re: IS Microsoft Visual studio 2008 compatible with arduino due on: July 05, 2014, 05:27:24 pm
It sure should be but if you hope to compile Due sketches in Visual Studio you need VisualMicro (use the power of google). I'm really not sure about VS2008 but VS2010 works fine.
12  Products / Arduino Due / Re: what's the suggested maximum potentiometer resistance to use with due? on: July 03, 2014, 09:12:27 am
Unfortunately there probably isn't an easy answer here. Do you have the Cortex M3 documentation for the processor? In section 46.7 you'll find a discussion of ADC performance. Table 46-35 seems to suggest that 10K ohms is at the high end of what is possible if the ADC clock is running full blast with 12 bit resolution. I've had jitter troubles with this processor in another design I'm working on so I feel your pain. You can make it work better by slowing down the ADC readings but that can be complicated. You could also take several samples and average them. Search the forums for DMA driven ADC if you want to roll your own ADC code to fix this up.
13  Products / Arduino Due / Re: EEPROM (beginners question) on: June 30, 2014, 09:27:00 am
Bad news... The ArduinoDue has no EEPROM. Thus, you can't store values permanently. It is possible to write persistent values to FLASH memory just like your program but such values will be erased the next time you flash a program to the Due. Most of us just add an I2C connected EEPROM to our designs somewhere.
14  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: June 20, 2014, 02:41:46 pm
Try to make sure that you really are compiling for the Arduino Due, using the 1.5.4 IDE or newer, and that you don't have any older copies of the library around. I've had people accidentally have two copies with an older one in the first place Arduino looks.
15  Products / Arduino Due / Re: Building a CAN API for Arduino DUE on: May 18, 2014, 02:50:31 pm
It actually isn't that good of an idea to try to use the MCP2551. That chip requires 5V while the Due is 3.3V. This difference will make using the chip difficult. You really do want the proper transceiver or another 3.3V compatible transceiver. There are lots of choices out there. The transceiver you use isn't really that important but you do need to match it to the proper voltage level.
Pages: [1] 2 3 ... 23