Page 4 of 5

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 9:39 am
by kamikaze
Roberthh wrote:The CAN bus uses a diffferential signal. Given that, connecting the GND of PyBoard to the GND of the car is not mandatory, but it might help in case of noise & spikes. If you power PyBoard from the car's power network, then a common GND can be assumed anyhow. Us proper twisted & shielded cables, unless tehse are very short.
but wouldn't it there be a problem in that PyBoard has 3.3V and OBD2(car) has 12V ?

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 9:45 am
by Roberthh
You're just connecting the GND lines, to avoid high potential differences between the data lines and GND due to floating potentials. Of yourse you cannot supply PyBoard directly from the car's supply, which is something between <10V and 14.4V, depending on the state of the car (starting engine, running, etc..). You would always need a proper supply circuit. I would ne even connect Vin on Pyboard directly to the car's supply w/o a LC filter.

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 9:55 am
by Lysenko
kamikaze wrote: but wouldn't it there be a problem in that PyBoard has 3.3V and OBD2(car) has 12V ?
If you don't want to mess around with "electrics" directly you might find something like this:

https://www.olimex.com/Products/Power/DCDC6-16-TO5/

... easier. It's MP14820S based. Similar to the TI part you mentioned but generic in a Anadin vs. Aspirin sense.

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 10:52 am
by kamikaze
Lysenko wrote:
kamikaze wrote: but wouldn't it there be a problem in that PyBoard has 3.3V and OBD2(car) has 12V ?
If you don't want to mess around with "electrics" directly you might find something like this:

https://www.olimex.com/Products/Power/DCDC6-16-TO5/

... easier. It's MP14820S based. Similar to the TI part you mentioned but generic in a Anadin vs. Aspirin sense.
Thanks, but the main idea is to minimize CAN "shield", so it looks like I will make such regulator on-board. Also MP14820S is not capable to output 3.3V as I see it. I'm going to output 3.3V which will be sent directly to PyBoard`s V+ (or VBAT? which one?)

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 11:10 am
by Roberthh
You must not connect any external power supply to Pyboard 3.3V pins. These are outputs. The input is Vin/V+.
PyBoard's V+ (called Vin at Pyboard 1.0) can deal with 3.6 .. 16V, unless you draw too much (>80 mA) current, at which point it overheats at 14V. So in principle you can connect it to the car's Power, assuming a 12V net. The problem are spikes and noise on the card power supply. So you should add some passive filters, something like this:

Image

Only that I would put the Zener diode behind the FR102 and add a fuse. You can buy this ready made. Just look for power filter car audio. What helps for car audion, helps here too.

Re: connecting pyboard to CAN BUS

Posted: Mon Oct 31, 2016 2:56 pm
by dhylands
Using a switching regulator to get the 12V down to 5V would reduce the wasted heat. Something like:
https://www.pololu.com/product/2843
or an adjustable version:
https://www.pololu.com/product/2103

You probably also want the filtering circuitry in @roberthh's post

Re: connecting pyboard to CAN BUS

Posted: Tue Nov 01, 2016 2:51 pm
by kamikaze
Roberthh wrote:FR102
is SBYV27-100 part will be simillar/better than FR102?

Re: connecting pyboard to CAN BUS

Posted: Tue Nov 01, 2016 3:02 pm
by Roberthh
You can use that part. It's major purpose is to protect against reverse polarity.

Re: connecting pyboard to CAN BUS

Posted: Thu Nov 03, 2016 1:06 am
by kamikaze
Created my third version (actually second) of CAN bus transceiver PCB. Soldered it with a solder paste in owen... let's hope I haven't burn the TCAN337GDR chip :roll: will test it soon. If it works fine then I'll try to create a real shield for PyBoard that will actually contain a voltage regulation stuff and 2 CAN bus transceivers. So it will be possible to connect it to car`s OBD2 port directly. What do you think - is it a better idea to create 2 separate halves (so they could be used together or as a separate parts) - one for CAN and one for 12V to 5V regulation ?

Image

Re: connecting pyboard to CAN BUS

Posted: Mon Nov 07, 2016 1:31 am
by kamikaze
ok. It didn't work for some time... thought that I've burned ICs in owen... but the real reason was one wire that wasn't completely connected, doh )

DEMO

My tiny test suite