Electronics-Related.com
Forums

CAN bus

Started by Unknown August 13, 2021
A customer wants us to build a box (basically a cinder block bristling
with connectors) that includes a CAN bus for control. We'd include
ethernet too, for more general use.

Can someone recommend a good chip or chip set to do slow CAN? A good
eval kit or equivalent? A good way to make a PC talk CAN?

We'd have an internal uP, one of the ST Arm things.



-- 

Father Brown's figure remained quite dark and still; 
but in that instant he had lost his head. His head was
always most valuable when he had lost it.



  
On Friday, August 13, 2021 at 8:25:37 AM UTC-7, jla...@highlandsniptechnology.com wrote:
> A customer wants us to build a box (basically a cinder block bristling > with connectors) that includes a CAN bus for control. We'd include > ethernet too, for more general use. > > Can someone recommend a good chip or chip set to do slow CAN? A good > eval kit or equivalent? A good way to make a PC talk CAN?
There are USB-CAN adapters available.
> We'd have an internal uP, one of the ST Arm things.
You probably already have CAN available on PA11 and PA12, but are shared with USB. What is the exact STM model number?
fredag den 13. august 2021 kl. 17.25.37 UTC+2 skrev jla...@highlandsniptechnology.com:
> A customer wants us to build a box (basically a cinder block bristling > with connectors) that includes a CAN bus for control. We'd include > ethernet too, for more general use. > > Can someone recommend a good chip or chip set to do slow CAN? A good > eval kit or equivalent? A good way to make a PC talk CAN? > > We'd have an internal uP, one of the ST Arm things.
many of the STMs have CAN all you need is a transciever many of them also have USB so that's an easy way to make a PC talk CAN
On Friday, August 13, 2021 at 8:49:05 AM UTC-7, lang...@fonz.dk wrote:
> fredag den 13. august 2021 kl. 17.25.37 UTC+2 skrev jla...@highlandsniptechnology.com: > > A customer wants us to build a box (basically a cinder block bristling > > with connectors) that includes a CAN bus for control. We'd include > > ethernet too, for more general use. > > > > Can someone recommend a good chip or chip set to do slow CAN? A good > > eval kit or equivalent? A good way to make a PC talk CAN? > > > > We'd have an internal uP, one of the ST Arm things. > many of the STMs have CAN all you need is a transciever > > many of them also have USB so that's an easy way to make a PC talk CAN
The low pin count versions probably have USB and CAN sharing pins. But since he wants ETH, probably need a high pin count chip anyway.
On Fri, 13 Aug 2021 08:47:21 -0700 (PDT), Ed Lee
<edward.ming.lee@gmail.com> wrote:

>On Friday, August 13, 2021 at 8:25:37 AM UTC-7, jla...@highlandsniptechnology.com wrote: >> A customer wants us to build a box (basically a cinder block bristling >> with connectors) that includes a CAN bus for control. We'd include >> ethernet too, for more general use. >> >> Can someone recommend a good chip or chip set to do slow CAN? A good >> eval kit or equivalent? A good way to make a PC talk CAN? > >There are USB-CAN adapters available. > >> We'd have an internal uP, one of the ST Arm things. > >You probably already have CAN available on PA11 and PA12, but are shared with USB. >What is the exact STM model number?
It's an STM32F207IGT6. It does have two CAN interfaces. Do we just need a transceiver? Any suggestions? -- Father Brown's figure remained quite dark and still; but in that instant he had lost his head. His head was always most valuable when he had lost it.
On Friday, August 13, 2021 at 9:08:40 AM UTC-7, jla...@highlandsniptechnology.com wrote:
> On Fri, 13 Aug 2021 08:47:21 -0700 (PDT), Ed Lee > <edward....@gmail.com> wrote: > > >On Friday, August 13, 2021 at 8:25:37 AM UTC-7, jla...@highlandsniptechnology.com wrote: > >> A customer wants us to build a box (basically a cinder block bristling > >> with connectors) that includes a CAN bus for control. We'd include > >> ethernet too, for more general use. > >> > >> Can someone recommend a good chip or chip set to do slow CAN? A good > >> eval kit or equivalent? A good way to make a PC talk CAN? > > > >There are USB-CAN adapters available. > > > >> We'd have an internal uP, one of the ST Arm things. > > > >You probably already have CAN available on PA11 and PA12, but are shared with USB. > >What is the exact STM model number? > It's an STM32F207IGT6. It does have two CAN interfaces. Do we just > need a transceiver? Any suggestions?
MCP2551
fredag den 13. august 2021 kl. 18.08.40 UTC+2 skrev jla...@highlandsniptechnology.com:
> On Fri, 13 Aug 2021 08:47:21 -0700 (PDT), Ed Lee > <edward....@gmail.com> wrote: > > >On Friday, August 13, 2021 at 8:25:37 AM UTC-7, jla...@highlandsniptechnology.com wrote: > >> A customer wants us to build a box (basically a cinder block bristling > >> with connectors) that includes a CAN bus for control. We'd include > >> ethernet too, for more general use. > >> > >> Can someone recommend a good chip or chip set to do slow CAN? A good > >> eval kit or equivalent? A good way to make a PC talk CAN? > > > >There are USB-CAN adapters available. > > > >> We'd have an internal uP, one of the ST Arm things. > > > >You probably already have CAN available on PA11 and PA12, but are shared with USB. > >What is the exact STM model number? > It's an STM32F207IGT6. It does have two CAN interfaces. Do we just > need a transceiver? Any suggestions?
yes you just need a transciever (and possibly a termination resistor) something like a MCP2551 or one of the numerous similar all in SO8 They need 5V, you can get 3.3V transceivers but I seem to remember some claiming they are not fully compliant with the all of the CAN spec. (though not in a way that I've seen matter)
On Fri, 13 Aug 2021 09:12:40 -0700 (PDT), Ed Lee
<edward.ming.lee@gmail.com> wrote:

>On Friday, August 13, 2021 at 9:08:40 AM UTC-7, jla...@highlandsniptechnology.com wrote: >> On Fri, 13 Aug 2021 08:47:21 -0700 (PDT), Ed Lee >> <edward....@gmail.com> wrote: >> >> >On Friday, August 13, 2021 at 8:25:37 AM UTC-7, jla...@highlandsniptechnology.com wrote: >> >> A customer wants us to build a box (basically a cinder block bristling >> >> with connectors) that includes a CAN bus for control. We'd include >> >> ethernet too, for more general use. >> >> >> >> Can someone recommend a good chip or chip set to do slow CAN? A good >> >> eval kit or equivalent? A good way to make a PC talk CAN? >> > >> >There are USB-CAN adapters available. >> > >> >> We'd have an internal uP, one of the ST Arm things. >> > >> >You probably already have CAN available on PA11 and PA12, but are shared with USB. >> >What is the exact STM model number? >> It's an STM32F207IGT6. It does have two CAN interfaces. Do we just >> need a transceiver? Any suggestions? > >MCP2551
Yikes, there are tens of thousands available. I would have thought the car chip crisis would have affected that. Maybe they go full-custom. Thanks -- Father Brown's figure remained quite dark and still; but in that instant he had lost his head. His head was always most valuable when he had lost it.
On 13/08/2021 16:25, jlarkin@highlandsniptechnology.com wrote:
> A customer wants us to build a box (basically a cinder block bristling > with connectors) that includes a CAN bus for control. We'd include > ethernet too, for more general use. > > Can someone recommend a good chip or chip set to do slow CAN? A good > eval kit or equivalent? A good way to make a PC talk CAN? > > We'd have an internal uP, one of the ST Arm things. > > >
There are several possible CAN pitfalls, mainly to do with physical interfaces and protocols. There is low speed fault tolerant CAN and the more common high speed not fault tolerant CAN. There are ISO specs. Then there are protocols, like CANOpen - but there are zillions of them. The CAN peripheral on the ST chip will probably be OK for anything hardware except CAN FD. I've known people get fussy about clock speeds and want "exactly" the odd speed they are using which may not fit well with the processor clock. If you need to write code to support some of the complex protocols it's a lot of work. On the other hand if your customer has a sensible and documented home brew protocol it can be quite simple and problem free. MK
On Sat, 14 Aug 2021 10:03:08 +0100, Michael Kellett <mk@mkesc.co.uk>
wrote:

>On 13/08/2021 16:25, jlarkin@highlandsniptechnology.com wrote: >> A customer wants us to build a box (basically a cinder block bristling >> with connectors) that includes a CAN bus for control. We'd include >> ethernet too, for more general use. >> >> Can someone recommend a good chip or chip set to do slow CAN? A good >> eval kit or equivalent? A good way to make a PC talk CAN? >> >> We'd have an internal uP, one of the ST Arm things. >> >> >> >There are several possible CAN pitfalls, mainly to do with physical >interfaces and protocols. >There is low speed fault tolerant CAN and the more common high speed not >fault tolerant CAN. There are ISO specs. >Then there are protocols, like CANOpen - but there are zillions of them. > >The CAN peripheral on the ST chip will probably be OK for anything >hardware except CAN FD. I've known people get fussy about clock speeds >and want "exactly" the odd speed they are using which may not fit well >with the processor clock. > >If you need to write code to support some of the complex protocols it's >a lot of work. > >On the other hand if your customer has a sensible and documented home >brew protocol it can be quite simple and problem free. > >MK
I've been told that ST has software drivers for their CAN interfaces, and like their ethernet stuff, it's pretty bad. We are replacing some old boxes and the customer probably wants them to be drop-on replacements for their old home-made stuff. That sounds awful. -- Father Brown's figure remained quite dark and still; but in that instant he had lost his head. His head was always most valuable when he had lost it.