CAN conexions

Info & Discussions about good ole AQ6, taken to the next level.

CAN conexions

Postby afernan » Thu Apr 24, 2014 8:21 pm

UPDATE:
SOLVED. Was my bad: a wrong mix in my Tx that created an extrange behaviour. All the procedure described below is correct. I leave it for interest to others.
__________________________________________________________________________

I´m testing for first time CAN with the new ESC32 (version "ESC32v20r49") and DIMU v1.1

The connection done is shown in the figure below. I´ve set ESC32 to ESC_ID =1.I´ve asigned MOT_CAN = 1 in QGC parameters page and the mixing table on Motor A, ID=1, Thrust = 100, P,R,Y = 0. Comunication console has show
"ESC32: CAN ID: 1, ver: 2.0.0 "

Working well
Attachments
Capture.JPG
Capture.JPG (25.58 KiB) Viewed 3089 times
Last edited by afernan on Fri Apr 25, 2014 7:18 pm, edited 3 times in total.
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: CAN conexions

Postby Jdmagoo » Thu Apr 24, 2014 8:36 pm

afernan wrote:I´m testing for first time CAN with the new ESC32 (version "ESC32v20r49") and DIMU v1.1

I´m followed wiki and I´ve got to be connected but motor doesn´t run well. Motor don´t run smooth responding to throttle as with PWM. It´s a kind of delay extrange not correct.

The connection done is shown in the figure below. I´ve set ESC32 to ESC_ID =1.I´ve asigned MOT_CAN = 1 in QGC parameters page and the mixing table on Motor A, ID=1, Thrust = 100, P,R,Y = 0. Comunication console has show
"ESC32: CAN ID: 1, ver: 2.0.0 "

What is wrong?


Perhaps flash to the newest firmware R54 and try again. But the Zip file on the FTP site is empty, Im using R52 for now

James
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Re: CAN conexions

Postby afernan » Fri Apr 25, 2014 9:19 am

@James, thanks for your help.

I´ll try r54. I´ve compiled it using Makefile (attached the hex). There is already a Makefile prepared for that (Thanks for that, very useful!). The use is similar to AQ fw. In summary:
1.- Download r54 from repo. Copy STM32 library folders: “STM32” y “STM32F4xx_DSP_StdPeriph_Lib_V1.3.0” at same level of "/onboard"
2.- Change your compiler path in "makefile", line 64 . In my case is "CC_PATH ?= C:\CW"
3.- Open a CMD (Windows command prompt) starting in folder /onboard and run: "MAKE ALL". You´ll get the hex under "build" folder

Anyway, did you (or anyone) get ESC32 running properly using CAN?

Angel
Attachments
ESC32_r54.zip
(62.73 KiB) Downloaded 83 times
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: CAN conexions

Postby Jdmagoo » Fri Apr 25, 2014 9:29 am

afernan wrote:@James, thanks for your help.

I´ll try r54. I´ve compiled it using Makefile (attached the hex). There is already a Makefile prepared for that. The use is similar to AQ fw. In summary:
1.- copy STM32 library folders: “STM32” y “STM32F4xx_DSP_StdPeriph_Lib_V1.3.0” at same level of "onboard"
2.- Change your compiler path in "makefile", line 64 . In my case is "CC_PATH ?= C:\CW"
3.- Open a CMD (Windows command prompt) starting in folder /onboard and run: "MAKE ALL". You´ll get the hex under "build" folder

Anyway, did you (or anyone) get ESC32 running properly using CAN?

Angel


Thanks for the link will try that later.

Im having success on the bench for the moment.

Have just spent all day soldering the CAN transceivers, capacitors and other parts on 5 ESC32's and just starting my final 6th now. So far i have tested each one as i go along, connecting up to the FC and applying power to the motors. Without props each one has been a success (so far) and will finish the build tomorrow. Im using R52 for now and don't have any of the problems you describe, i did have problems with 2x Flyduino / Viacopter UART to USB connectors which was giving all sorts of grief connecting to the ECS and reading the parameters, but I'm now using a different UART cable and no problems what so ever.
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Re: CAN conexions

Postby aBUGSworstnightmare » Fri Apr 25, 2014 10:15 am

afernan wrote:@James, thanks for your help.

I´ll try r54. I´ve compiled it using Makefile (attached the hex). There is already a Makefile prepared for that (Thanks for that, very useful!). The use is similar to AQ fw. In summary:
1.- Download r54 from repo. Copy STM32 library folders: “STM32” y “STM32F4xx_DSP_StdPeriph_Lib_V1.3.0” at same level of "/onboard"
2.- Change your compiler path in "makefile", line 64 . In my case is "CC_PATH ?= C:\CW"
3.- Open a CMD (Windows command prompt) starting in folder /onboard and run: "MAKE ALL". You´ll get the hex under "build" folder

Anyway, did you (or anyone) get ESC32 running properly using CAN?

Angel


Yes, my 4 ESC32 in the CamCruiser were connected via CAN. Ensure your bus impedance is in the correct range (50 to 70 ohms).
They were flashed to r54.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: CAN conexions

Postby Jdmagoo » Fri Apr 25, 2014 10:31 am

Another note as well Angel, is Im using Mennos custom Firmware for the Hott telemetry which is based on R380. What FC firmware are you using?
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Re: CAN conexions

Postby afernan » Fri Apr 25, 2014 2:27 pm

I´m using AQ r372.

About impedance, I´m using the R120 Ohm sugested in between both lines H-L (see drawing above). Is that correct?. Can I measure the impedance simply with the Resistance measurement of the tester machine?.

Angel
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain

Re: CAN conexions

Postby bn999 » Fri Apr 25, 2014 2:34 pm

Angel - can you describe or show a video of the behavior that seems incorrect?

With CAN, you either have an open channel or you do not. The fact that the FC reports connecting with ESC ID # 1, means that your CAN bus is likely ok.

Also, as CAN support has been refined over time, I'd recommend going with the latest firmware revision - rev 381. I've got a fair bit of time on it in the air using CAN & DIMU so you won't be the first.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: CAN conexions

Postby Jdmagoo » Fri Apr 25, 2014 3:21 pm

afernan wrote:I´m using AQ r372.

About impedance, I´m using the R120 Ohm sugested in between both lines H-L (see drawing above). Is that correct?. Can I measure the impedance simply with the Resistance measurement of the tester machine?.

Angel


I placed a 130ohm resister on the R3 pad of the DIMU, once I did this I placed a multimeter across the resister and measured an impedance of 63ohms (roughly). Your diagram above is correct but are you using the DIMU V1.1 which already has an 120ohm resister installed? With your resister installed, you should be able to measure across your resister to get your impedance value which should be between 50-70 ohms
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Re: CAN conexions

Postby afernan » Fri Apr 25, 2014 7:16 pm

SOLVED

Was my bad: a wrong mix in Tx that created that extrange behaviour.

@jdmagoo: thanks for your test. I measured the impedance and was 60 Ohms. I use only one R = 120 Ohms (as in scheme).

I´m using r54 on ESC32 (the one attached above).

Angel
afernan
 
Posts: 1214
Joined: Sat Jul 07, 2012 5:24 pm
Location: Madrid, Spain


Return to AQ6 +DIMU +CAN

Who is online

Users browsing this forum: No registered users and 2 guests