0

Looking for suggestions on microcontrollers
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Looking for suggestions on microcontrollers

by YeeP on Thu May 13, 2021 10:09 am

I have never worked with a microcontroller, so please feel free to explain things like I'm 5. I am currently planning a project to build a digital dash in a project vehicle I am building. The car will have a mix of sensors that can communicate on the CANbus, and others that need to be "translated" through a microcontroller. I don't understand how this actually works, but I have seen that it apparently can be done: https://hackaday.com/2021/03/31/classic ... ital-dash/

After I read that article I jumped on adafruit to get my hands on the Teensy microcontroller, but the newest version (unsure if I even need that) is out of stock. Can anyone explain to me the attributes I need to look for in selecting a microcontroller where I will need to translate an analog signal to a digital "packet", then get the data to the Raspberry Pi? I am a Node.js developer by trade, so it would be great if I could find something that can handle Node, but that is not an absolute show stopper.

Thank you for any explanations, still learning all of this.

YeeP
 
Posts: 15
Joined: Tue Jul 25, 2017 7:51 pm

Re: Looking for suggestions on microcontrollers

by dastels on Thu May 13, 2021 10:52 am

Node probably isn't likely. The primary language for microcontroller work is still C++, but there are viable options such as CircuitPython. I believe (but haven't tried) that Rust and TinyGo are feasible as well. There's also ulisp if you prefer a Lisp.

As for hardware, the Feather M4 CAN Express might be just what you need: https://www.adafruit.com/product/4759. Be sure to have a look at the tutorial guide for more information: https://learn.adafruit.com/adafruit-feather-m4-can-express.

Dave

dastels
 
Posts: 6455
Joined: Tue Oct 20, 2015 3:22 pm

Re: Looking for suggestions on microcontrollers

by YeeP on Thu May 13, 2021 12:51 pm

Hey Dave, I guess I wasn't clear or maybe don't understand. My current thought is that I need two microcontrollers. One to communicate with the CAN bus (was planning on using PICAN3) and another to communicate with the analog sensors. The later was what I was looking for in a microcontroller. Are you suggesting that both can be done with one, because that would be great for me as long as I had enough places to put the additional analog sensors.


Thanks.

EDIT: part of the reason I am leaning toward the PICAN, is it looks like it can interface with a "typical" node backend server. https://github.com/Mathews2115/AutoDashBackEnd

YeeP
 
Posts: 15
Joined: Tue Jul 25, 2017 7:51 pm

Re: Looking for suggestions on microcontrollers

by dastels on Thu May 13, 2021 1:13 pm

As for one board to do it all, it would depend on how many sensors you need, and whether they are plain analog or I2C. I.e. how much I/O you will need.The Feather M4 CAN is built around a SAME51 MCU, with a hardware CAN interface, hardware floating point, and a moderate amount of RAM (192K). It has 6 analog inputs, but you can add I2C ADC boards like https://www.adafruit.com/product/1085 which supports 4 addresses for 16 16-bit inputs in addition to the 6 on the feather.

Dave

dastels
 
Posts: 6455
Joined: Tue Oct 20, 2015 3:22 pm

Re: Looking for suggestions on microcontrollers

by YeeP on Fri May 14, 2021 12:57 pm

Dave - I spent some time inspecting my harness last night, and it is actually a "single wire CAN". That is to say it has CAN High, and Can Ground. In searching for single wire can microcontrollers, I found the following: https://www.mikroe.com/single-wire-can-click. Does adafruit have anything that can work with a single wire CAN?

YeeP
 
Posts: 15
Joined: Tue Jul 25, 2017 7:51 pm

Re: Looking for suggestions on microcontrollers

by dastels on Fri May 14, 2021 2:43 pm

AH, the CAN feather doesn't seem to be single wire. It has Gnd, H, and L. Whether Iit can be configured for single-wire, I don't know. The datasheet is here: https://cdn-learn.adafruit.com/assets/assets/000/097/530/original/SAM_D5xE5x_Family_Data_Sheet_DS60001507F.pdf

I believe that's it in the Adafruit shop for CAN support.

Dave

dastels
 
Posts: 6455
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.


cron