Show Posts
Pages: 1 ... 7 8 [9] 10 11 ... 18
121  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: August 29, 2013, 10:23:17 am
Awesome project! How much did it cost to build it?

Thanks bro =)..! Well, for the quadcopter parts without the main board (home made btw), around 150 USD. I bought all the parts (frame, ESC, motors, propellers...etc) from hobbyking.

//Basel
122  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: August 25, 2013, 06:22:39 pm
Tweeking takes time. Very good job I would say. Though the drawings are not clear to me at all.
Thats probably cause by my lack of knowledge
Jantje

Thx =).. By drawing I assume you mean the pinout? Well, it's simple.. I used the X-configuration (meaning the quad is flying in a X shape).. If you look at the pinout the motor pins should be,

Left upper motor: Pin 6
Left bottom motor: Pin 5
Right upper motor: Pin 10
Right bottom motor: Pin 9

For RX (receiver), PPM signal (Pulse-position modulation), The pins are as follows:
Roll: Pin 16
Pitch: Pin 14
Yaw: Pin 15
Throttle: Pin 7
AUX1: Pin 8
AUX2: Pin 0

I've also got a LED on pin 13, that indicates if the quad is in rate or level/angle mode..

And of course SDA/SCL for the sensors...

Currently the code only uses the accelerometer and gyrometer to make the quad stable during rate- and angle mode..

In the future I may implement heading hold (magnetometer) and altitude hold (barometer).. Not sure yet, cause I didn't have any need for them...
123  Community / Exhibition / Gallery / Re: BlueCopter - Arduino Quadcopter on: August 25, 2013, 04:20:52 pm
Very nice, but I think I'll move it to Exhibition / Gallery.

Thanks for sharing the video and the code.
Hey, thanks Nick =)..  Couldn't figure out where to start the topic..  Good thing you moved it..

//Basel
124  Community / Exhibition / Gallery / BlueCopter - Arduino Quadcopter on: August 25, 2013, 04:01:14 pm
Hey,

I spent the summer working with a new hobby of mine, Quadcopters =D! The quadcopter board is homemade (atmega32u4). Because my board has the same pinout as a leonardo, I decided to go with the multiwii firmware. So I etched a shield for my board containing headers for the receiver, motors and the IMU (cheap chinese found on ebay, ADXL345, L3G4200D, HMC5883 and BMP085).

I was happy with the quadcopter, it flew very nicely (after some PID changes of course).. But in the end I'm the type that likes to write my own code.. Trying to look at multiwii's code to see how they made it work (just to get a hunch), I directly noticed that the code isn't very, hmm how do I put it, reader friendly... So I trashed Multiwii, and there my summer began learning the dynamics and physics of quadcopters.

Three days later, I got a working code.. Three weeks after that I finally managed to find the optimal PID values for my quadcopter =P (yes it took three weeks of tweaking)..

Anyhow I'm not going to bore you out with my story. Instead I'm going to share my code with the arduino community and a video of the quadcopters first flight with my code..

If there is a big demand for a code explanation/theory about quadcopters and how everything works, shout out here, and I'll come up with something for you...

Here is the code: https://github.com/baselsw/BlueCopter

See attachment for pinout..

And here is the video:


Edit: I've updated the code.. Made the sketch run more efficiently and reduced code size.. With this change I managed to find better PID values and thus get better/faster stabilization.. For those interested I've added pictures of the main board and hardware setup..

//Basel
125  Products / Arduino Due / Re: Sam3x8e temperature on: August 13, 2013, 09:00:00 am
Hi Basel,

Just dug up this old thread - I've just burned your temp sensor code to my Due board with BOSSAC, and after about 5 minutes the chip is at ~36.4degrees, and it can't be more than 20 degrees inside here today!

What was ambient when you did the test?

Hey,

Well, can't exactly remember.. But not more than 15-17ºC... 36.4ºC is kinda normal.. The internal temp. sensor isn't that accurate either.. And I don't really know if it needs some kind of calibration.. As long as it's not hot to touch, you don't have to worry..

//Basel
126  Using Arduino / Microcontrollers / Re: SAM Datasheets - No 'soft erase' procedure. on: August 05, 2013, 08:57:49 am

I don't - per se, as BOSSAC works fine, and I can include BOSSAC in an application if I like to be able to program my devices. (Speaking of BOSSAC by the way, who makes it - and where can I find documentation etc?)

It simply frustrates me, that I cannot, or we cannot, get the official Atmel tool to even connect to the devices...

Well, you're not using an official Atmel board smiley-wink... Here is a link to the official website for bossa (bossac).. http://www.shumatech.com/web/products/bossa

Edit: Quote from the bossa website:
Quote
SAM-BA ships with support for all of Atmel's evaluation kits but does not provide generic configurations for other boards.  It is a complex task with little documentation to modify SAM-BA to support custom boards.  Sometimes, one can get away with using one of the evaluation kit configurations if it is similar to a custom board but other times not since custom external devices could cause a conflict.

//Basel
127  Using Arduino / Microcontrollers / Re: SAM Datasheets - No 'soft erase' procedure. on: August 05, 2013, 07:49:01 am
Yes, we had a similar discussion about the bootloader somewhere in this forum (or maybe another forum?).. The 1200bps trigger won't erase the flash.. it just simply send the sam chip to the bootloader... The bootloader makes the soft erase and programs your sketch..

Hard erasing and reseting the chip will send it to the bootloader (ROM, as you found in the datasheet.. No, this is not the problem that's preventing us from communicating with SAM-BA..

May I ask why you need to use sam-ba?
128  Using Arduino / Microcontrollers / Re: SAM Datasheets - No 'soft erase' procedure. on: August 04, 2013, 06:26:08 pm
No, it's not the bootloader.. But it's a part of your sketch.. When you compile your sketch there is a bunch of files/libraries getting compiled together with the sketch..

The 1200bps open and close routine is a part of the arduino USB code.. If you want to see it for yourself open the following file:

Quote
C:\arduino-1.5.2\hardware\arduino\sam\cores\arduino\USB\CDC.cpp
...

You'll find it somewhere between line 128 and 142... Here is a part from the code:

Code:
if (CDC_SET_CONTROL_LINE_STATE == r)
{
_usbLineInfo.lineState = setup.wValueL;
// auto-reset into the bootloader is triggered when the port, already
// open at 1200 bps, is closed.
if (1200 == _usbLineInfo.dwDTERate)
{
// We check DTR state to determine if host port is open (bit 0 of lineState).
if ((_usbLineInfo.lineState & 0x01) == 0)
initiateReset(250);
else
cancelReset();
}
return true;
}

//Basel
129  Using Arduino / Microcontrollers / Re: SAM-BA, BOSSA etc - no connection on: August 03, 2013, 07:23:29 am
Good work.. =D.. The pin mapping in ASF is kinda strange.. If you want, you can post your code and the board type you chose in atmel studio and I'll look into it.. But I'm sure that you can manage to figure it out on your own..

//Basel
130  Using Arduino / Microcontrollers / Re: SAM-BA, BOSSA etc - no connection on: August 03, 2013, 06:36:29 am
Quote
I see you couldn't wait for me to answer your question in the other thread..

I thought I was a little close to threadjacking - and that a new thread may help others in the future. smiley

I've just tried this, and all I get is 'bossac.exe is not recognised as an internal or external command, operable program or batch file.'

the YOUR_FILE bit? Is that just a file name, or does it have to be the file location and name, for example C:\Users etc?

The following error: 'bossac.exe is not recognised as an internal or external command, operable program or batch file.', means that you're not in the root directory of bossac when you call the command.. You'll have to "cd" into that directory before you call the command.. You'll find bossac somewhere in the sam folder (arduino ide folder)..

The YOUR_FILE.bin is just the compiled binary file for your sketch (Just like avr chips uses hex files)....

Edit: I just saw your edited post.. I'll have to get back with a proper solution, because I'm still at work.. I will look at my setup at home and report back..  Still if you know how to compile your sketch/project and manage to call bossac, my instructions above will work without any problems..

//Basel
131  Products / Arduino Due / Re: Arduino Serial Port in Matlab on: August 03, 2013, 02:54:05 am
Hey,

Well, I guess you used something like the following to open the serial port:

Code:
s = serial(.......);
fopen(s);

To close the serial connection just type the following before closing matlab:

Code:
fclose(s);

This works for me without any problem.. Which version of Matlab are you using??

//Basel
132  Using Arduino / Microcontrollers / Re: SAM-BA, BOSSA etc - no connection on: August 03, 2013, 02:41:50 am
I see you couldn't wait for me to answer your question in the other thread.. Anyway.. To answer your question about bossac.. If your programming the chip through the built-in USB interface use the following command:

Quote
bossac.exe --port=COM9 -U true -e -w -v -b YOUR_FILE.bin -R

Otherwise, if your programming through a FTDI (like the Due programming port), use this command instead:

Quote
bossac.exe --port=COM9 -U false -e -w -v -b YOUR_FILE.bin -R

//Basel
133  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: August 03, 2013, 02:24:35 am
I see - well done again!

EDIT - I've just been playing with Atmel Studio, my Due and SAM-BA trying to get some results. Maybe you can help.

When I open SAM-BA, under 'Select your board' - what did you select, no_board? As when I press connect SAM-BA just disappears but seems to be running in the background according to Windows Task Manager.

Well, I remember I had a lot of trouble with SAM-BA.. I tried no_board and also atmels official sam3x8e board (I'm currently at work and can't remember the name of the board).. In both cases I got an error and the board refused to connect.. I also remember that SAM-BA disappeared just as you describe it.. I didn't look into it further.. I'll have a look at it when I get home and report back!

//Basel
134  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: August 01, 2013, 05:10:12 pm
I'll look into that in the morning, thanks.

When you say you've been programming it from Atmel Studio, what have you been doing code wise? Coding using pure C and not the Arduino libraries etc?

Well, I wouldn't call it pure C.. But sure.. C/C++.. No arduino libraries.. In the case of the SAM chip, I'm only using ASF (Atmel Software Framework) in Atmel Studio..

P.S: Arduino IDE uses ASF .. D.S

You're welcome bro =)..
//Basel
135  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: August 01, 2013, 04:37:04 pm
So, you got this working and you're currently programming the chip over USB?

You mentioned using Atmel Studio, is that with a USB cable, or using a SAM-ICE?

Yes... USB only.. I don't have SAM-ICE or any other JTAG module.. Fortunately the chip comes preloaded with a bootloader... I've programmed the chip with Atmel Studio over USB.. It's simple.. Just create a external tool (http://www.atmel.no/webdoc/atmelstudio/atmelstudio.section.csl_qbq_kc.html) in Atmel Studio.. The tool will consist of a call to bossac (just like the Arduino IDE).. If you need further details let me know..

//Basel
Pages: 1 ... 7 8 [9] 10 11 ... 18