M4 + N4 + CAN BUS problem [ CLOSED]

Info and discussion about the autonomous Micro FC, suitable for nanos, micros and mini multirotors

M4 + N4 + CAN BUS problem [ CLOSED]

Postby fred_fr » Thu Sep 17, 2015 10:26 pm

hi

We have a problem tu use ESC3V32 CAN BUS with M4 + N4 board.

The ESC32V3 is ok I have calibrate it and define all ESC_ID : 1, 2 ,3 , 4

The M4 and N4 board is Ok , it work with hobbyking 20A HV in PWM mode

we have test GND , +5v and CANL and CANH continuiti wire is ok

On power connexion we have music on esc and after nothing nox arm no rpm .... :(

log and config :


(MAV 161) Radio task started
(MAV 161) GPS task task started
(MAV 161) RTC set: 2015-09-17 20:44:19 UTC
(MAV 161) Motors: cannot find CAN id [1]
(MAV 161) Motors: cannot find CAN id [2]
(MAV 161) Motors: cannot find CAN id [3]
(MAV 161) Motors: cannot find CAN id [4]
(MAV 161) Control init
(MAV 161) Control task started

can.JPG
can.JPG (33.68 KiB) Viewed 2801 times


configuration of ESC

> version
ESC32 ver 3.3.1

> set list
STARTUP_MODE = 0
BAUD_RATE = 230400 baud
PTERM = 0.500
ITERM = 0.00500
FF1TERM = +5.45419e-07
FF2TERM = +3.59981e-03
MIN_PERIOD = 50 us
MAX_PERIOD = 12000 us
ADVANCE = 15.00 Degs
START_VOLTAGE = 0.75 Volts
GOOD_DETECTS_START = 48
BAD_DETECTS_DISARM = 32
MAX_CURRENT = 12.00 Amps
START_CURRENT = 0.75 Amps
SWITCH_FREQ = 20.0 KHz
MOTOR_POLES = 14
PWM_MIN_PERIOD = 2200 us
PWM_MAX_PERIOD = 25000 us
PWM_MIN_VALUE = 750 us
PWM_LO_VALUE = 1000 us
PWM_HI_VALUE = 1950 us
PWM_MAX_VALUE = 2250 us
PWM_MIN_START = 1100 us
PWM_RPM_SCALE = 4000 RPM
ACTIVE_FREEWHEEL = 1
THR1TERM = +0.00000e+00
THR2TERM = +1.00000e+00
RPM_MEAS_LP = 0.750
SERVO_DUTY = 5.0 %
SERVO_P = 0.050
SERVO_D = 0.000
SERVO_MAX_RATE = 1000.0 deg/s
SERVO_SCALE = 360.0 deg
ESC_ID = 2
DIRECTION = 1
AUDIO_VOLUME = 0.0

> status
INPUT MODE PWM
RUN MODE OPEN_LOOP
ESC STATE DISARMED
PERCENT IDLE 97.68
COMM PERIOD 0
BAD DETECTS 0
FET DUTY 0.00
RPM 0.00
TEMP 35.10
AMPS AVG 0.01
AMPS MAX 0.04
BAT VOLTS 4.17
MOTOR VOLTS 0.00
DISARM CODE 0
CAN NET ID 0

same problem if i set de input mode to CAN

> status
INPUT MODE CAN
RUN MODE OPEN_LOOP
ESC STATE DISARMED
PERCENT IDLE 97.30
COMM PERIOD 0
BAD DETECTS 0
FET DUTY 0.00
RPM 0.00
TEMP 39.44
AMPS AVG 0.01
AMPS MAX 0.15
BAT VOLTS 3.99
MOTOR VOLTS 0.00
DISARM CODE 1
CAN NET ID 0



- we need a différent firmware ?
- I lost some thing ?
- some body can help me ?
Last edited by fred_fr on Mon Sep 21, 2015 12:56 pm, edited 1 time in total.
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire

Re: M4 + N4 + CAN BUS problem

Postby LPR » Fri Sep 18, 2015 5:04 am

Fred

I've had the same problem with getting the ESC32 to talk to the flight controller with CAN sometimes.

The first thing to be sure of is to have the same parameter in the flight controller for "MOT_VALUE_SCALE" as you have in the setting for your ESC32's "RPM Scale".

Second you need to have the 120 ohm resistor between the CANH and CANL lines and then be able to measure a resistance of 60 ohms between the two signal wires.

I also find that it might help to power on the ESC32 and the FC at the same time.

If you have one of the ESC32 V3 set to have audio you'll be able to hear when your CAN connection is working. As soon as the FC has all it's led working after connecting the power, the motor controlled with an ESC32 V3 will say DISARM and you'll know that you have a CAN connection.

Good Luck!!

Larry
Last edited by LPR on Fri Sep 18, 2015 1:03 pm, edited 1 time in total.
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA

Re: M4 + N4 + CAN BUS problem

Postby chschmid » Fri Sep 18, 2015 5:39 am

Hi Fred

It looks like your CAN bus is not working right. As Larry sais, check the resistance over the CAN lines and make sure it is 60Ohms and make sure the CAN lines are not swapped. Check that your ESC_ID's are 1-4.

Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: M4 + N4 + CAN BUS problem

Postby JussiH » Fri Sep 18, 2015 8:05 am

You need to connect CAN between the M4 and the N4 expander:

DSC02631.JPG


The expander has a 120 Ohm resistor, so the bus impedance should end up at around 60 when the 2 boards are connected.
JussiH
 
Posts: 2103
Joined: Thu Jun 21, 2012 9:25 pm

Re: M4 + N4 + CAN BUS problem

Postby fred_fr » Fri Sep 18, 2015 10:20 am

thanks all

I test your ideas tonight.

I have not connect M4 to N4 board for CAN-BUS.
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire

Re: M4 + N4 + CAN BUS problem [ CLOSED]

Postby fred_fr » Fri Sep 18, 2015 7:31 pm

Hi

all is ok :D after connect M4 to N4 board

Could you add this information on N4 extender board wiki :idea: .

(MAV 161) GPS task task started
(MAV 161) ESC32: CAN ID: 1, ver: 3.3.1
(MAV 161) ESC32: CAN ID: 2, ver: 3.3.1
(MAV 161) ESC32: CAN ID: 3, ver: 3.3.1
(MAV 161) ESC32: CAN ID: 4, ver: 3.3.1
(MAV 161) Control init
(MAV 161) Control task started


thanks
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire


Return to AutoQuad M4 Micro Controller

Who is online

Users browsing this forum: No registered users and 1 guest