Need help from Arduino MEGA to Teensy

Status
Not open for further replies.

Bullone

Well-known member
Hi guys,
I've implemented a board based on Arduino MEGA with a microSD car reader, a CAN bus module MCP2515, an analog input signal 0-5V, some LEDs a button etc...

Now I'd like to re-engineer the board to make it smaller and more powerfull.... I've just seen the Teensy board and I'm thinking to use the v3.2 board with a microSD module (can you point me to a good/simple module?) will that solution cover all the requirements desribed befoer?
The main requirement are:
- more powerfull and more RAM than Arduino MEGA
- simple to use connected to a CAN bus of motorbike (500Kbps) to ask and receive ODBII messages (i need RPM, TPS and ECT at least and as much real time as possible)
- possibility to read and write from a microSD
- acuire an analog signal 0-5V

What about the v3.5 or v3.6?

Can you help me choose the best Teensy board?

What about the already implemented and tested Arduino SW? How can I port it to Teensy in th ebest way?
I'm using sdFat library for the microSD module and coryjfowler MCP_CAN_lib for the CAN module



Thanks!
 
Teensy 3.5 might be simpler, since it's got the SD card socket built in.

Most code and libs for Arduino "just work". The best way to check is to install Teensyduino, then just switch to Teensy 3.5 in Arduino's Tools > Boards menu, and click Verify.

The one sticking point is going to be the analog input range. The ADC inputs are 0 to 3.3V. If you have 0 to 5V signals, you'll need to use resistor dividers or other ways to convert them to the 3.3V range.

Teensy 3.x boards also have a higher performance CAN peripheral built in. But the libs aren't exactly the same, so you may need to do some programming work to switch. You'll still need to add the 8 pin transceiver chip, but the built-in CAN eliminates the need for an external CAN controller chip.
 
Thanks for fast response!

Looking to this specs page it seems to me that only the 3.6 has input signa 0-3.3V, the 3.2 and 3.5 support 0-5V or am I wrong?

Auch! I was expected to do all the stuff with no external module but if I understood the CAN will need external component, correct?
Now I'm using MCP2515 moduel for Arduino.... what would be the best and simple solution for the Teensy board?
Is there any example project I can look?


Thanks!
 
Yes, T_3.6 I/O are all 3.3V max. T_3.5 is 3.3V on non-Digital Pins - analog only pins - and all signals - are still limited to 3.3V as MAX value.
Yes, CAN takes an external transceiver for wire signals.
I was just pointed to these modules: https://www.amazon.com/gp/product/B07NZCK5XY - they were some of the ones used in testing on other CAN threads for T_3.x library. Others may be linked on those CANBUS threads.
 
Thank you so much guys!
Well... it seems that the best and simple way could be to go for the v3.6 and if I've understood correct I'll just need the CAN transceiver posted by Defragster for all I have to do.
Forgot the analog signal.... is there any smd module to adapt and acquire an analog signal of 0-5V? Or a simple resistors divider is all I need?

What about the power supply of the v3.6 board? I'll use it on my motorbike so I'll have +12V (~14.2V while running!?)... If I read well the Teensy wants only +5V as power supply correct?

SW:
I've just ionstalled the Teensyduino and select both Teensy v3.2 and v3.6 and doing "Verify" from the Arduino IDE everything seems ok! whooooo!!!! Gerat!

What about this great module for the v3.2? Is there a place to buy it?
http://www.rcgroups.com/forums/showpost.php?p=27129264&postcount=1



Sorry for the many questions but I'm so exited and I definetly have to switch to Teensy! :)
 
6 volts max for power! If you really want 0-5V range you can get an external ADC (SPI/I2C variant) and allow teensy to read that chip. Teensy 3.6 is 3.3 volt on ALL pins ONLY. If you plan to run 5volt signals, get a Teensy 3.5, it outperforms the MEGA and has tolerance for GPIO at 5v except for the listed pins on the card.
 
Hi guys,
I've just ordered my first Teensy and I've choosed the v3.6 for my board! Can't wait to test it! :)
I've also ordered that CAN transceiver:
https://www.ebay.it/itm/2pcs-SN65HV...e=STRK:MEBIDX:IT&_trksid=p2060353.m2749.l2649
Which CAN library do you suggest me to use?

Can you help me finding a good step down? I'd like to use the +12v (~14.2V) of my motorbike... may I have issue with noise?
What about this step-down?
https://www.amazon.it/Regolabile-Bu...01MQGMOKI/ref=cm_cr_arp_d_product_top?ie=UTF8

As I'll have to acquire an analog 0-5V signal can you point me to an adapter if exist or is it better to just use couple of resistors?


Thank you guys!
 
i wouldnt use crappy hobby regulators for vehicles/motorcycles, due to cranking can sometimes reset the mcu, or the fact that some regulators cant handle the fluctuations of vehicle charging system. I recommend the aluminum enclosed epoxy sealed switching psu you can get off ebay, they dont get warm and theyre watertight, voltage never seeps and it can be powered from 8-40 volts, outputs 5v 30 amps, and fits in palm of your hand.


200170-1500x1500.jpg
 
@tonton81. can you ellaborate on "cranking" can reset MCU? I have a data logger in an electric go kart and use a simple buck converter to power a Teensy 3.2 It works well, but every once in a while the MCU will restart. Maybe bucks are not the way to go? input voltage is 24 VDC. Here are the bucks i'm using. https://www.amazon.com/gp/product/B078C7ZS74/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Note I have reverse polarity diodes before the buck on BOTH +24 and GND and 0.1 uf and 220 MFD caps before and after the buck.
 
cranking (starting vehicle) or voltage droops cause the reset. For this type of application you need a voltage stabilizer like the one i posted to you. i ran this with teensy3.5 in my civic for 3 years all seasons...
 
Status
Not open for further replies.
Back
Top