"Arduino" Pro Micro

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

oK aBUGSworstnightmare
The new version no longer-Eagle Logo

Ciao, servo
Attachments
promicro4.JPG

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: "Arduino" Pro Micro

Post by aBUGSworstnightmare »

Hi warthox,

great flying (as usual :D ). Is it based on your new MWC promicro shield (pics)?

No, the board is strictly designed to be powered by LiPo; powering by ESC is not possible (although servos needs to be powered by ESC).

I decided to do a self-powered USB design because I don't want to add a fuse to the board and minimize the risk of damaging the PCs USB port when something goes wrong with the power sources (onboard 5V LDO, 5V from USB, 5V from LiPo --> there's a slightly risk of leakage currents because all these voltages have a +/- tolerance and are not rock-solid at 5V level).
I don't have such problems with my microwii design since the electronic is supplied by the onboard 5V LDO and no other power source (USB or ESC) is connected.

aBUGsworstnightmare

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: "Arduino" Pro Micro

Post by warthox »

aBUGSworstnightmare wrote:Hi warthox,

great flying (as usual :D ). Is it based on your new MWC promicro shield (pics)?

No, the board is strictly designed to be powered by LiPo; powering by ESC is not possible (although servos needs to be powered by ESC).

I decided to do a self-powered USB design because I don't want to add a fuse to the board and minimize the risk of damaging the PCs USB port when something goes wrong with the power sources (onboard 5V LDO, 5V from USB, 5V from LiPo --> there's a slightly risk of leakage currents because all these voltages have a +/- tolerance and are not rock-solid at 5V level).
I don't have such problems with my microwii design since the electronic is supplied by the onboard 5V LDO and no other power source (USB or ESC) is connected.

aBUGsworstnightmare



yes its flown with the new promicro shield.

mh no power over bec is not that nice. but i think a single wire will do the trick ;)

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: "Arduino" Pro Micro

Post by Alexinparis »

aBUGSworstnightmare wrote:Hi,

just to keep you posted: the microWii is on it's way:

- ATmega32U4 based
- MPU-6050
- HMC-5883L
- MS5611-01BA01
- Power supplied by 2S to 4S LiPo
- LiPo voltage divider for 2S to 4S
- Spektrum Satellite connector (on bottom)
- GPS connector (on bottom; only GPS or Spektrum can be used at a time since the 32U4 only has one UART)
- LED driver for flight mode signalization (on bottom; i.e. with RGB-LED, similar to the DIVIDE et IMPERA! Rev2 board)
- miniUSB connector

Image

I'll keep you posted...
aBUGSworstnightmare


That sounds very interesting.
I have a micro proto board from Felix and it's like this proc was designed exactly for our needs ;)
A sort of intermediate between a 328 and a 2560 , with the size of a 328.
It's not fully supported by arduino, but it will for sure.
The patch to make it work is quite simple.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: "Arduino" Pro Micro

Post by Alexinparis »

warthox wrote:same copter with promicro and mpu6050 but onboard..

https://vimeo.com/40967931


So apparently you are now happy with the LPF setting of the MPU :)

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: "Arduino" Pro Micro

Post by warthox »

Alexinparis wrote:
warthox wrote:same copter with promicro and mpu6050 but onboard..

https://vimeo.com/40967931


So apparently you are now happy with the LPF setting of the MPU :)



hey alex, this was flown without the lpf solution. on this frame it worked without lpf.
on the 3 others i wrote in the bug post and a 4th it doesnt work.
i can tell u after the weekend if the lpf works on the the other frames.
with the flydumini i made a testflight with new lpf code and it seems to work :)
so im confident that it also works with the others.

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

hello ronco

how do I configure the channels with Spektrum satellite


Ciao, servo23

User avatar
aBUGSworstnightmare
Posts: 115
Joined: Mon Jun 27, 2011 8:31 pm
Location: Munich, Germany

Re: "Arduino" Pro Micro

Post by aBUGSworstnightmare »

Hi,

find it in rx.pde.

Code: Select all

/**************************************************************************************/
/***************          combine and sort the RX Datas            ********************/
/**************************************************************************************/
uint16_t readRawRC(uint8_t chan) {
  uint16_t data;
  uint8_t oldSREG;
  oldSREG = SREG; cli(); // Let's disable interrupts
  data = rcValue[rcChannel[chan]]; // Let's copy the data Atomically
  #if defined(SPEKTRUM)
    static uint32_t spekChannelData[SPEK_MAX_CHANNEL];
    if (rcFrameComplete) {
      for (uint8_t b = 3; b < SPEK_FRAME_SIZE; b += 2) {
        uint8_t spekChannel = 0x0F & (spekFrame[b - 1] >> SPEK_CHAN_SHIFT);
        if (spekChannel < SPEK_MAX_CHANNEL) spekChannelData[spekChannel] = ((uint32_t)(spekFrame[b - 1] & SPEK_CHAN_MASK) << 8) + spekFrame[b];
      }
      rcFrameComplete = 0;
    }
  #endif
  SREG = oldSREG; sei();// Let's enable the interrupts
  #if defined(SPEKTRUM)
    static uint8_t spekRcChannelMap[SPEK_MAX_CHANNEL] = {1,2,3,0,4,5,6};
    if (chan >= SPEK_MAX_CHANNEL) {
      data = 1500;
    } else {
      #if (SPEKTRUM == 1024)
        data = 988 + spekChannelData[spekRcChannelMap[chan]];          // 1024 mode
      #endif
      #if (SPEKTRUM == 2048)
        data = 988 + (spekChannelData[spekRcChannelMap[chan]] >> 1);   // 2048 mode
      #endif
    }
  #endif
  return data; // We return the value correctly copied when the IRQ's where disabled
}



aBUGSworstnightmare

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

OK aBUGSworstnightmare thanks

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

Ciao
Small video of the Micro-Pro 32U4_V11
Sorry I do not speak English
http://youtu.be/-h1ko-zrIrw

Ciao, servo23

User avatar
jstapels
Posts: 23
Joined: Sun Mar 04, 2012 8:50 pm
Location: Software Engineer

Re: "Arduino" Pro Micro

Post by jstapels »

Just an fyi. For those who wanted to play around with the pro micro but didn't want to deal with some of the missing pins on the SparkFun version, I found this version on eBay.

ATmega32U4 Dev Board

PaulStoffregen
Posts: 2
Joined: Fri Apr 20, 2012 7:04 pm

Re: "Arduino" Pro Micro

Post by PaulStoffregen »

You might also consider Teensy (full disclosure: I'm the author of Teensyduino).

Teensy costs less, is smaller, also provides all the pins, and has really quick startup (no need to reflash the bootloader).

Felix has recently added support for Teensy! :)

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

Hello
Finished PCB programmed ESC simon 600Hz

Thanks for your help :D :D :D
hello servo23

http://youtu.be/rE1f5fux-mw
Attachments
IMG_0037.JPG
IMG_0038.JPG
IMG_0039.JPG
PCB_Pro-Micro32U4_V11.jpg

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

hello ronco You could add the configuration to Y4 photos Connecting_ProMicro
thanks, servo23 :D :D
Attachments
Connecting_ProMicro.jpg
(58.62 KiB) Not downloaded yet

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: "Arduino" Pro Micro

Post by LenzGr »

FYI, the MicroWii is now available from flyduino.net. Looks great!

Image

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

Re: "Arduino" Pro Micro

Post by natael »

Hi,

This my first attempt at asking for some help, on the programming side.
I have finished assembling a pro micro based tricopter, using the one from Flyduino :
http://flyduino.net/Flyduino-Pro-Micro-16Mhz-5V-Schwarz-16mm-PCB_1
so, not the one from Sparkfun.
The flyduino description says it is meant to be seen as Leonardo, like the Sparkfun.
I am using genuine WMP, and will add the nunchuck after my first test is successful. I am not using other sensor.

Knowing that, i have installed the arduino 1.0.1 software, with the drivers from its software package. Leonardo lines are already uncommented in the boards.txt.
I carry on downloading the latest multiwii software which is at 2.1 there :
http://code.google.com/p/multiwii/downloads/detail?name=MultiWii_2_1.zip&can=2&q=

I am familiar with some arduino programming (basics), and more familiar with programing in general (C), but i am not sure if i am supposed to use this version of the multiwii software. I see some "pro micro" references but not sure if my flyduino is concerned by that. Reading the thread, i see that you guys have a dedicated branch :
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FMultiWii_promicro
but not sure if you put it there for developers only or users as well.

Could you clarify what would be the simplest software / version to load in the arduino / flyduino pro micro so i can get started ?
If you need some more information to direct me, just let me know.

Thanks

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: "Arduino" Pro Micro

Post by Hamburger »

Regular 2.1 should support pro.micro. Get it from downloads section

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

Re: "Arduino" Pro Micro

Post by natael »

ok, thanks for the prompt answer, got it already. So, since one does not specify if we're using a micro or a mini, this means the program tests which of these 2 is being used at initial setup and defines the pin numbers accordingly ? is that correct ? Or do I still need to uncomment something in a block to make it know it's a pro micro. Sorry for the redundant question, but that was the last thing I wasn't 200% sure of.

tj_style
Posts: 12
Joined: Mon Aug 27, 2012 5:31 pm

Re: "Arduino" Pro Micro

Post by tj_style »

Arduino Team has release the new tiny board similiar like Sparkfun Arduino Pro Micro.

It's "Arduino Micro" with all pin available. Check this:

http://arduino.cc/en/Main/ArduinoBoardMicro

Very like this new board.. and will replace my Pro Micro..

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

Re: "Arduino" Pro Micro

Post by natael »

Just making sure, does the bluetooth module connect and work with the Pro Micro in the exact same way as the Pro mini ? No difference whatsoever ?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: "Arduino" Pro Micro

Post by howardhb »

Just making sure, does the bluetooth module connect and work with the Pro Micro in the exact same way as the Pro mini ? No difference whatsoever ?

From the Arduino site: http://arduino.cc/en/Guide/ArduinoLeonardo
Separation of USB and serial communication.
On the Leonardo, the main Serial class refers to the virtual serial driver on the Leonardo for connection to your computer over USB.
It's not connected to the physical pins 0 and 1 as it is on the Uno and earlier boards.
To use the hardware serial port (pins 0 and 1, RX and TX), use Serial1. (See the Serial reference pages for more information.)

What this means, briefly:
(1) The Leonardo differs from the UNO in that the serial port (Serial0) that is used for programming and GUI, is not connected to the Tx / Rx pins on the board.
(2) If you want to connect a Bluetooth module, you will need to change the MW code to read/write to the second serial port, Serial1.

I found a somewhat cheaper version of the Leonardo Pro Micro ATmega32U4 on Ebay (ordered a week ago)
http://www.ebay.com/itm/310634777706?ss ... 1497.l2649
Looks identical to the one from Flyduino but I can't comment on the quality though.....
In my opinion Flyduino products are top class. (I'm using a Flyduino Mega and FreeIMU 0.4.3)

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: "Arduino" Pro Micro

Post by Alexinparis »

howardhb wrote:(2) If you want to connect a Bluetooth module, you will need to change the MW code to read/write to the second serial port, Serial1.


It's native with multiwii 2.2.
Serial1 is configured by default at 115200 baud and can be connected to a GUI/bluetooth or OSD

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

"Arduino" Pro Micro

Post by natael »

Ok, done. Didn't need to change anything in MW 2.2 indeed. Got EZ-GUI from android working perfectly.

Thanks

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: "Arduino" Pro Micro

Post by servo23 »

Hello aBUGSworstnightmare

But where is the piece of code below to change channels
in multwii 2.2

#define SPEKTRUM 1024

/**************************************************************************************/
/*************** combine and sort the RX Datas ********************/
/**************************************************************************************/
uint16_t readRawRC(uint8_t chan) {
uint16_t data;
uint8_t oldSREG;
oldSREG = SREG; cli(); // Let's disable interrupts
data = rcValue[rcChannel[chan]]; // Let's copy the data Atomically
#if defined(SPEKTRUM)
static uint32_t spekChannelData[SPEK_MAX_CHANNEL];
if (rcFrameComplete) {
for (uint8_t b = 3; b < SPEK_FRAME_SIZE; b += 2) {
uint8_t spekChannel = 0x0F & (spekFrame[b - 1] >> SPEK_CHAN_SHIFT);
if (spekChannel < SPEK_MAX_CHANNEL) spekChannelData[spekChannel] = ((uint32_t)(spekFrame[b - 1] & SPEK_CHAN_MASK) << 8) + spekFrame[b];
}
rcFrameComplete = 0;
}
#endif
SREG = oldSREG; sei();// Let's enable the interrupts
#if defined(SPEKTRUM)
static uint8_t spekRcChannelMap[SPEK_MAX_CHANNEL] = {1,2,3,0,4,5,6};
if (chan >= SPEK_MAX_CHANNEL) {
data = 1500;
} else {
#if (SPEKTRUM == 1024)
data = 988 + spekChannelData[spekRcChannelMap[chan]]; // 1024 mode
#endif
#if (SPEKTRUM == 2048)
data = 988 + (spekChannelData[spekRcChannelMap[chan]] >> 1); // 2048 mode
#endif
}
#endif
return data; // We return the value correctly copied when the IRQ's where disabled
}


Ciao, servo23 :roll: :roll:

OK problem resolved

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

Re: "Arduino" Pro Micro

Post by natael »

I tried to connect the buzzer on the pro micro.
I tried to connect it with D8, and uncommented also this line (in addition to the #define Buzzer) :


/********************************** Buzzer Pin **********************************/
/* this moves the Buzzer pin from TXO to D8 for use with ppm sum or spectrum sat. RX (not needed if A32U4ALLPINS is active) */
//#define D8BUZZER


Doing so i do have the buzzer "buzzing" whenever it supposed to buzz. But i lost my aux1 channel :shock: , which i used to arm the motor so far. Is this an expected behaviour ?
Where should i put my buzzer instead ? May i use the A2 override ? This would be handy as i'm using a board (flyduino) with servo plugs available on A2 (while i had to solder to connect to D8).
Or should i rather us TX0 ?

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

"Arduino" Pro Micro

Post by natael »

I'm trying to connect a baro BMP085 on a flyduino pro micro. So far I was using one of the early V3 board with only gyros + Acc (wmp+ & nunchuck). The SDA and SCL, according to earlier reading are pin D2 and D3.
However, connecting my baro to these ports does not work, i2c errors (i've updated the config.h to define baro). I naively made a direct connection, nothing in between SDA-SCL and D2-D3. Which means the latter are connected to both wmp and Baro.
But according to the multiwii connection diagram of the pro mini
http://multiwii.googlecode.com/svn/trun ... m_v1.9.pdf

There is a logic level converter between the baro SDA -SCL and the pins on the pro mini.

How would you procees with the pro micro to connect a bmp085 ?

Thank you

Thank you

natael
Posts: 33
Joined: Mon Sep 10, 2012 1:21 pm

"Arduino" Pro Micro

Post by natael »

natael wrote:I'm trying to connect a baro BMP085 on a flyduino pro micro. So far I was using one of the early V3 board with only gyros + Acc (wmp+ & nunchuck). The SDA and SCL, according to earlier reading are pin D2 and D3.
However, connecting my baro to these ports does not work, i2c errors (i've updated the config.h to define baro). I naively made a direct connection, nothing in between SDA-SCL and D2-D3. Which means the latter are connected to both wmp and Baro.
But according to the multiwii connection diagram of the pro mini
http://multiwii.googlecode.com/svn/trun ... m_v1.9.pdf

There is a logic level converter between the baro SDA -SCL and the pins on the pro mini.

How would you procees with the pro micro to connect a bmp085 ?

Thank you

Thank you


Problem solved ! I just had to use external 2k2 pull ups.

But now that i'm using a minimOSD (KVteam),
I've lost aux2 ! (Is it using RXI ?) Any idea what other pin i could use for aux2 ? And where to change the code accordingly ? Cause on the pro micro, it seems pin 8 is already taken by aux1. (I tried, and aux2 becomes a redondant aux1). In addition, pin 12 does not exist on the Pro Micro, so can't use that 2nd option.

Giskard
Posts: 1
Joined: Mon Sep 16, 2013 2:45 pm

Re: "Arduino" Pro Micro

Post by Giskard »

Hello folks,

i've got an issue and hope, i'm in the right Thread.

I tried to load the new Version 2.2 of MultiWii on my Arduino Pro Micro.
I selected the Arduinio Leonardo Board in the Arduino Editor and the the right COM-Port.
But after loading the software to the flightcontroller it is only detected as unknowen device.
And i can't find any matching drivers for it.

Before the update it was detected correct by windows and usabal as COM-device.

I've tried the procedure with the Sparkfun Pro Micro and the flyduino Pro Micro.
Both has been detected well before the update and after it, i'm not able to use the drivers that worked before!

I used Version 2.1 before without any anomalies...

Thanks for help and sorry for my english ;)

iamhandgun
Posts: 8
Joined: Thu May 30, 2013 7:23 am

Re: "Arduino" Pro Micro

Post by iamhandgun »

Alexinparis wrote:
howardhb wrote:(2) If you want to connect a Bluetooth module, you will need to change the MW code to read/write to the second serial port, Serial1.


It's native with multiwii 2.2.
Serial1 is configured by default at 115200 baud and can be connected to a GUI/bluetooth or OSD


For the life of me I can't figure out where to change the serial port to Serial1. I've spent hours changing different line with serial one by one with no luck. I'm sure it is obvious, but I just can't seem to find it. Is it in the config.h or the SERIAL tab or somewhere else completely different? Any help would be appreciated. Right now it's just for silly bluetooth but I am also planning on adding osd. Thanks.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: "Arduino" Pro Micro

Post by waltr »

The Pro Micro (32U4) is a great board/processor for simple copters like Aerobatic copters (use these on my Warp Quads) but is limited in hardware and memory including serial ports.
If you really want multiple serial ports, BT, OSD, etc then I suggest one on the STM32 boards and run CleanFlight. Then you have two USARTs, and 2 SoftSerial ports. I use Flip32 boards on my fpv mini-H copters. There are a number of different boards now available.

iamhandgun
Posts: 8
Joined: Thu May 30, 2013 7:23 am

Re: "Arduino" Pro Micro

Post by iamhandgun »

Yes, I got the pro micro a couple of years ago before knowing much about available boards. I just now got a new bluetooth module that works with iOS and wanted to be able to tune at the field and eventually swap to osd, not have bluetooth and osd simultaneously. It already flys well so I don't really need bluetooth on that setup but I can definitely see using osd with it in the near future. First world problem for sure.

manzurmurshid
Posts: 2
Joined: Sat Apr 30, 2016 12:39 pm

Re: "Arduino" Pro Micro

Post by manzurmurshid »

Any one on this thread can help me with arduino micro board for MWC. I tried to connect the standard RX with micro as pro micro diagram below.
[img]C:\Users\notb\Desktop\Connecting_ProMicro.jpg[/img]

but when i run the MWC gui and test the RX i cannot find Throttle and Roll working in MWC gui. Instead i find sometimes the throttle is increasing with IMu(GY-87) movement.
[img]C:\Users\notb\Desktop\micro_connection1.JPG[/img]

If any one has the connection diagram or any code needed to change in RX.cpp for Arduino Micro for MWC then please provide.

Post Reply