Electronics > Microcontrollers

SPI to CAN bus mcu?

(1/3) > >>

WaldPinkler:
I've been enjoying a new found electronics hobby. I wanted to make a current sense device that communicates over CAN bus.

I need an mcu for that. I spent many hours looking at them and downloading IDEs etc. It feels so overwhelming now. I have played with arduinos and esp32s but wanted to try something lower level. Have programming experience.

I've made a PCB for an ina229 current sense ic that fits on a shunt. SPI communication. I was hoping to connect the MCU and CAN transceiver pcb with some u-shaped header pins.

Any recommendations on an MCU? Preferably something that can be hand soldered. Living on a boat so 700W for a hot air gun burns up my batteries.

My first pcb, so any critique there is welcome.

jpanhalt:
Microchip has CAN bus controllers that are SPI (e.g., MCP25625 and MCP2515).  Other vendors (e.g., Maxim) do too.

So, keeping it really simple, all you probably need is an 8-bit MCU with hardware SPI.  Of course you can go up from there.

WaldPinkler:
I looked at STM8S, PIC, AVR, ATTiny, MSP430. Just pick one? I go around in circles. I was trying to find one that was easy to get started without having to get much extra hardware, easy to solder, then the software side being accessable.

jpanhalt:
Any of them will work.  It's a competitive market.  It all depends on what you have ("tool chain") and are familiar with programming.  I started with Microchip PIC's.  The 8-bit units are easy to program in Assembly, and you can pick ones with fewer peripherals to make starting simple.  The 12F1840 is an 8-pin device.  16F1xxx are also simple (almost identical in some cases) and have more ports/pins.  Most are still available in DIP or SOIC packages, which are easy to solder and can even be used with economical sockets or on a breadboard. 

If you stay with one brand, going to more complex chips is a little easier for setup.  You don't have to use all of the capabilities of any chip.  In the PIC series, I stay with the 1xF1xxx (14-bit core) and pick one with enough ports/pins for what I need.  My tool chain (MPLAB 8.92) is limited.  There are even newer ones that are not compatible with that tool.  I would stay away from the really old ones with a 12-bit core, as they do not have interrupts and have a more limited instruction set.

sicco:
Can can be done with many many microcontrollers. Last year I would have picked a Microchip PIC and MPLAB, but now, if i were you, I’d get a Teensy module. Or something else Arduino ish. Especially if hand soldering is a given…

Probably wise for you to opt for galvanic isolation between your CAN host and the INA229. Consider isolated CAN transceiver ic’s. If you can get your hands on them, because they’re sold out globally like any chip….

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version