[help needed] CAN BUS sniffer for dashboard

Hardware inside and outside of the ECU
Post Reply
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

CAN BUS sniffer for dashboard

Post by puff »

Okay.
Couldn't wait to do that stuff. Found a project buy some german guy (some blog with 'chaos' in its name) with this can bus sniffer.
Took his schematics, removed connectors and 232 chip. Added some pinheads for UART (wanna connect it to bluetooth module), and stepper motors (may be I need to add ADC?). This way I can use mega8 to drive stepper motors directly (if there's enough memory space) or could send data over serial to some tiny85 chip that would control the needle.

Wanna fit it into 1sq.in. and order it from oshpark:
Снимок экрана 2014-10-28 в 23.56.03.png
Снимок экрана 2014-10-28 в 23.56.03.png (48.07 KiB) Viewed 17998 times
few questions:
What are the rest unused pins on MCP2515? why vref is not used on 2551? what's the purpose of jp6 and those resistors?

On the discovery side I'll be using TJA1050 (do I need voltage divider if I power it from 5v?)

Any ideas/comments?
Last edited by puff on Tue Oct 28, 2014 9:10 pm, edited 1 time in total.
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

hm. seems that would be almost impossible? :D
Снимок экрана 2014-10-29 в 0.05.55.png
Снимок экрана 2014-10-29 в 0.05.55.png (96.59 KiB) Viewed 17997 times
anyone wllling to beat this challenge? (oh! there are two layers! beside, I could use 0805 instead of 1206)
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: CAN BUS sniffer for dashboard

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

i know, but my purpose is exactly the opposite. i have a bunch of special stepper motors, and i want to use them to retrofit my old and stylish analog dashboard. i don't want to waste discovery, which is not the best option and actually is an overkill in this case.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: CAN BUS sniffer for dashboard

Post by kb1gtt »

What drives the stepper? It would seem that part of the schematic is missing, perhaps an add-on board.

I'm guessing that JP6 is a misc input. Jumpers might set the software to a different mode, or something like that.

The MCP2515 pins 12, 14,15,16 are a serial interface, reset is a manual reset device, and I don't know init.

2551 vref is that pins VDD/2. So not required in this case for anything.
Welcome to the friendlier side of internet crazy :)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

steppers are driven directly by microcontroller :-)
.so do you think i will cope with putting all this into 1 sq.in? (5$shipped)
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: CAN BUS sniffer for dashboard

Post by kb1gtt »

If you change the XTAL's and resistor to a different package, you can probable get it. You also have several test jacks, which could change, or could be put under a chip and accessed from one side of the board, as they are just test jacks.
Welcome to the friendlier side of internet crazy :)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

smd XTALs occupy almost the same space. besides, I don't have test jacks - all of them will become proper pins. First, the task is place all the big components and outer pads, and then I'd populate resistors and capacitors on the other side of the board.
or I could put mega on the top, and the controller - on the bottom (just below mega)? - that would save some lots of space.

haven't decided yet if i need those capacitor in the top right corner.
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

how much does this work usually cost if doing that with freelancer?
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

I hate eagle's ugly autorouter. is kicad any better? will it take long to move the schematics from eagle?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: CAN BUS sniffer for dashboard

Post by kb1gtt »

Yes KICAD is better, as it has lost the autorouter :) I hate autorouters. You spend more time trying to make it work correctly.

Not sure about freelancer. I've always done it myself, but am short time time currently.
Welcome to the friendlier side of internet crazy :)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

okay :D
flipped several pins and removed a LED and couple of caps.
at least it seems now I connect everything i need (with few vias) :roll:
Снимок экрана 2014-10-30 в 19.58.10.png
Снимок экрана 2014-10-30 в 19.58.10.png (49.43 KiB) Viewed 18544 times
Decided to go without oshpark but with a local guy who would do that fast and cheap. as of now the board is five by five cms
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

I got the following mess. Any ideas how to improve it?
Снимок экрана 2014-10-30 в 21.47.45.png
Снимок экрана 2014-10-30 в 21.47.45.png (62.33 KiB) Viewed 18541 times
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: CAN BUS sniffer for dashboard

Post by kb1gtt »

I would suggest you make the back a GND flood, then punch through all GND's as close to the pin as possible. This will likely remove many of your traces as well it will make significant'y better PCB layout design.

Also see XTAL cases in this picture http://www.picfun.com/parts/xtal1.jpg Take note of the XTAL on the right, it's small with thru hole leads, which allows you to mount the XTAL above the PCB, allowing you to crowd components very close to the XTAL, using almost no PCB space.

I would also suggest using 45 degree angle, instead of 90 degree angles.

All in all looking good. Keep up the effort.
Welcome to the friendlier side of internet crazy :)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

okay. changed it a bit. added couple of adc inputs (and LEDs for debugging purposes)
don't know why that would be any better tho..
Hope that guy is still accepting orders. in that case this board would seemingly cost me less than 3$ shipped! (no silkscreen, no solder mask, no bias, just copper and drills)

here how it looks like.
altogether:
Снимок экрана 2014-11-01 в 12.37.22.png
Снимок экрана 2014-11-01 в 12.37.22.png (121.12 KiB) Viewed 18525 times
top layer:
Снимок экрана 2014-11-01 в 12.37.49.png
Снимок экрана 2014-11-01 в 12.37.49.png (35.61 KiB) Viewed 18525 times
bottom layer:
Снимок экрана 2014-11-01 в 12.38.06.png
Снимок экрана 2014-11-01 в 12.38.06.png (28.93 KiB) Viewed 18525 times
already got the parts shipped. hope to receive them within the next couple of weeks (moscow snail mail!)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

turned out, that guy stopped providing his services because of some difficulties… I hate these FX rates, but will probably have to go oshpark. Still want to reduce the board size…
UPD seems, I found another cheap place ;-)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

okay. placed an order. just one board. jut $3 shipped. expect toget it in a week. the parts are on the way. meanwhile, i want to read CAN from discovery with my logic analyzer. any tutorials on enabling canbus in rover setup?
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

got the chips. waiting for the board and tutorial
User avatar
acab
provoker
provoker
Posts: 263
Joined: Wed Dec 18, 2013 7:27 pm
Location: Minsk, BY

Re: CAN BUS sniffer for dashboard

Post by acab »

puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

mine is a different one, but also from germany.
could you please explain if you were reading the can messages from rusefi - what were the settings? (pins, baud rates, config menus, etc.)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

mama
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

testing tapatalk. here's the can module assembled..
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: CAN BUS sniffer for dashboard

Post by puff »

something went wrong...
take 2.
Image
Post Reply