New OSHW board with STM32F303 now can have CAN and USB working at same time, operates from -40+85C and with power supply from 4.2-40VDC

OLIMEXINO-STM32F3 is re-design of our popular OLIMEXINO-STM32 board.

What is new?

  • STM32F303RCT6TR is used which allow CAN and USB to work at the same time. The F1 Series of STM32 shared same buffer for both USB and CAN which leads to not be able to work with both CAN and USB at the same time. This is solved in F3 series
  • Increased amount of memory: 256KB Flash, 40KB RAM
  • Power supply is now from 4.2VDC up to 40VDC which allow OLIMEXINO-STM32F3 to work in Automotive applications without special power converters
  • Industrial temperature grade -40+85C
  • Real Time Clock backup battery holder for CR2032 Li battery
  • Lower cost

The price of OLIMEXINO-STM32F3 is EUR 14.95 for single unit and drops to EUR 11.96 for 50+ pcs order.

How to use A20 CAN interface with the A20 universal Armbian image for OLinuXino

CAN-Network-Diagram

To use A20 CAN interface you need A20-OLinuXino board and A20-CAN board.

Then you have to install the armbian A20 CAN overlay:

 

$ sudo armbian-add-overlay <path_to_the_dts_file>

 

  • connect A20-CAN to your OLinuXino and reboot.

You can see if CAN is available now:

$ ifconfig -a

   can0     Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
            NOARP MTU:16 Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:10
            RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
            Interrupt:51

 

To use CAN interface you can install can-utils and setup the CAN interface:

$ sudo apt-get install can-utils 
$ ip link set can0 down
$ ip link set can0 type can bitrate 100000 triple-sampling on loopback off
$ ip link set can0 up

 

Now conect A20-CAN to the CAN network two wire interface.

To send a packet over CAN use :

cansend <can_interface> <packet>

 

For instance:

$ cansend can0 5AA#10.10.10

 

To sniff for CAN network messages you can use candump :

$ candump can0

 

Now you can log your car CAN networking messages and interpret them. There is plenty of info on the web about the different CAN messages which are exchanged on car CAN bus.

ESP32-EVB now get much better

ESP32-EVBESP32-EVB revision A was made quick and has too many errors 🙂 some were due to the non very clear documentation, like that we assumed that all ports could have internal pull-ups but  when we try to write the software we found that the GPIOs we used for the buttons has no such. Other were done by our engineer negligence.

We had small 100 pcs series from Revision A, but after all issues we encounter just decided to trash it and just move forward to revision B.

Now in Revision B all interfaces are tested and confirmed to work fine 🙂

What we keep:

  1. Two relays 250VAC/10A
  2. LiPo charger which allow ESP32 to work without external power supply
  3. Reset and User button
  4. micro SD card
  5. UEXT connector to add temperature, humidity, etc sensors
  6. GPIO with all signals available on 0.1″ proto friendly step connector

What we add:

  1. USB connector now is also used for automatic programming of ESP32 so no need for external serial cable, with DTR and RTS bootloader mode is entering automatically
  2. Ethernet now is correctly wired and works 🙂
  3. We were surprised to read ESP32 has CAN and we try and it works great, so in the new revision we add CAN driver
  4. We add Infrared transmitter and receiver, so now you can control all your home appliances with IR control like TVs, VCRs, Air conditioners, and everything else with IR control

What we removed:

  1. second button, with all above peripherals the ESP32-WROOM-32 module resources are gone, there is no single GPIO unused left

Revision B schematic can be reviewed here . The PCB is now routing.

Color TFT 2.8″ LCD 320×240 pixel display board with UEXT compatible to ESP32-EVB is also coming soon.

A20-CAN – new OSHW board designed with KiCAD adds CAN networking to A20-OLinuXino and A20-SOM

A20-CAN

Want to sniff your car’s CAN bus or to drive Industrial machines with CAN networking bus?

Allwinner A20 SOCs have CAN but almost no one use it. If I remember correctly it was not even included in the Allwinner documentation just two pins had CAN on their names, so many people doubt if there is or not CAN.

Fortunately some people investigated further and add proper CAN support for A20 Linux, so we decided to make small driver board which to allow A20-OLinuXino and A20-SOM to have CAN. What does this means? Now you can use A20-OLinuXino to talk to other devices with CAN like industrial equipment, automotive CAN bus etc etc.

Current Linux image we have is without CAN support, but we put instructions on our WiKi how to build one with Linux-Sunxi 3.4 Kernel and with Mainline kernel: https://www.olimex.com/wiki/A20-CAN

What you see above on the picture is our first prototype of A20-CAN it works well although we use 5V CAN driver and A20 is 3.3V device. We successfully connected AM3352-SOM-EVB to A20-OLinuXino-LIME with A20-CAN driver and exchanged some messages at the highest speed 1Mbit and it works fine.

All CAD files, Gerbers, BOM are in this Github account: https://github.com/OLIMEX/A20-CAN . The board is done with KiCAD.

The PCBs are now in production and in 2 weeks A20-CAN will be orderable on our web page . While the PCBs are made we will work to add the CAN in our official images, so you do not have to bother with Kernels configurations and re-compiling.

Allwinner A10-A20 CAN bus is working and with mainline drivers!

58_can_bus_2

CAN (controlled area network) bus is communication protocol bus standard widely used in Automotive industry. It uses only two wires for communication and is very robust and noise immune. This is why it also is used in industrial robotics and other areas where reliable communication for small amounts of data is needed.

A10 and A20 SoCs are known to have CAN bus controller inside but few years ago when we started the A10/A20 OLinuXino design nobody knew what is this CAN driver neither how to use it.

This is why when I read message on Twitter –

can1

I reply: “indeed, but on purpose, as no one has used this CAN or know how to use it, this would be just waste of components ”

Obviously things changed for the last couple of years as we have been feed with info about A20 CAN driver!

There is mainline CAN driver for A10/A20: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/sun4i_can.c?id=refs/tags/v4.4-rc8

CAN is documented http://linux-sunxi.org/images/f/f5/Sun7i-CANbus.pdf in fact it’s same as NXP SJA1000.

Sunxi-Can-Driver is on Github: https://github.com/btolfa/sunxi-can-driver

Linux-Sunxi mainlining efforts: http://linux-sunxi.org/Linux_mainlining_effort#Merged_into_4.4

Can4Linux is available also.

We quickly setup test with CAN transciever from AM3352-SOM-EVB and A20-OLinuXino-MICRO and build kernel with CAN support. Everything works!

Now we work on small board with CAN transciever on it which will enable CAN to be used on A20-OLinuXino-MICRO, A20-SOM-EVB, A10/20-OLinuXino-LIME and A20-OLinuXino-LIME2.

Fortunately when we made the board we kept same GPIO pin numbering on all boards so the CAN signals are on same places on all these boards and this makes the extension CAN board easy to route.

This will allow all our A10/A20 OLinuXinos to be used in CAN applications.

DuinoMite DM-BASIC now have CAN support

Good News! Frank Voorburg implemented CAN support BASIC commands for DuinoMite http://www.kenseglerdesigns.com/cms/forums/viewtopic.php?f=4&t=259