Go Down

Topic: Building a CAN API for Arduino DUE (Read 377114 times) previous topic - next topic

weird_dave

Be careful here, if you connect the scope ground to 'L' and the Due is powered from USB, you may be shorting 'L' via mains earth (if your local mains supply has this). You're better off 'scoping both the 'L' and 'H' simultaneously.

Can (no pun intended) we have 'scope traces of the noise?

I assume you've checked that there is in fact 3v3 across the modules supply pins. (I had a board with a 5v part fitted instead of 3v3 and all I got was noise).

If you are using the 230 part instead of the 234, note that pin 5 is not supposed to be connected to 3v3, it's a reference output, forcing this to 3v3 may be why it doesn't work as expected (and could damage it).

gaskraank

Be careful here, if you connect the scope ground to 'L' and the Due is powered from USB, you may be shorting 'L' via mains earth (if your local mains supply has this). You're better off 'scoping both the 'L' and 'H' simultaneously.

Can (no pun intended) we have 'scope traces of the noise?

I assume you've checked that there is in fact 3v3 across the modules supply pins. (I had a board with a 5v part fitted instead of 3v3 and all I got was noise).

If you are using the 230 part instead of the 234, note that pin 5 is not supposed to be connected to 3v3, it's a reference output, forcing this to 3v3 may be why it doesn't work as expected (and could damage it).
Hey thank you for the helpful information.

Currently PIN 5 of the transceiver is connected to 3v3 you think it has to be connected with 5V instead?

I could do some scope traces of the noise but I will try to use the 5V first.
Do you mean the modules supply pins the pins of the arduino board or of the transceiver?

That particular transceiver has no enable pin so it is essentially always on. If you have signals on CANRX and CANTX but the CANL and CANH lines are garbage then there is likely a wiring fault on the H/L side (the actual CAN bus). What you should get is a square wave on H/L when you use L for ground on your scope and H at the scope input. Or connect to your local board ground with the scope and L will sink then return to center and H will rise and return to center. They ought to rest at essentially the exact same voltage. At rest H = L so you will measure 0 volts. When active they pull away from each other as a squarewave that ought to look like an exact mirror image of each other. The more it differs from that ideal the worse off you are.
Yes so I'm gonna do some measurements on CANTX and CANRX on the Oscillator today again and post the scope here.

I'm going to check if CANL and CANH has 0 Volts when there is nothing send. But I already checked with the multimeter and if I was Sending Frames there was still 0 Volts. If I receive Messages via CANalzyer its about 190 mV. Receiving Messages is working fantastic, do you think this could be still a wiring fault on the H/L side?

Thank you so much for all the answers.

gaskraank

Hey Again,

maybe this is also important to know.

I used this CAN Transceiver Board
KNACRO SN65HVD230
Bought them here https://www.amazon.com/KNACRO-SN65HVD230-Communication-transceiver-Arduino/dp/B01ILU2WP6/ref=cm_cr_arp_d_pdt_img_top?ie=UTF8

So the  SN65HVD230  is already wired on a breakout board an I only added the capacitors in between.

Greetings

ard_newbie

#618
May 03, 2018, 05:59 am Last Edit: May 03, 2018, 06:30 am by ard_newbie
It seems that these transceivers have already 120 Ohms resistors, no need to add them. Remove capacitors and see what happens.

weird_dave

Stupid website logged me out while I was replying, I'm not going through all that again

Suffice to say, don't connect anything to pin 5, it's an output!
CANH and CANL should never be both 0v or both 3v3.

disconnect everything on CANL and CANH at the module and attach 2 channels of a scope to them. I would also disconnect Rx and Tx from the module, get this working then attach the Rx and TX and see if it still works, then attach to CANL and CANH, at one of these stages it will fail, indicating where the problem is. I also advise taking a look at the datasheet for the IC.

gaskraank

Hey Guys,

So I just bought the Copperhiltech CAN Due Dual Channel Shield.

This worked perfect for me uploaded the code I already had and it worked instantly.

So I thank you all so much and this due is insane its just firing out the messages.

I was even printing all the frames on the serial and this was still getting all the messages forwarded.


Thank you so much.

Greetings

Go Up