Author Archives: admin

CAN-ISO: Code configuration and test

08 Feb 20
admin
,
No Comments

In this section we will see how to configure the module RubinoLAB CAN-ISO on Arduino and how to test it.

To buy CAN-ISO: LINK

The implemented protocol uses a standard ASCII communication. This makes the system compatible with any program (Python, LabVIEW, MATLAB etc), simple to adapt to your project.

The first step is to install the MCP_CAN library (if you have not already installed it), in the Arduino editor. Here is the link of the library:

https://github.com/coryjfowler/MCP_CAN_lib

Create a project with the example code shown here or alternatively download the attached project and unpack it in your workbook.

CANINO_v2 CANINO_V2.zip

Compile and upload it to the Arduino module.

//revisione 2 del 30/03/2018, con Arduino 1.8.5
/*
  CAN BUS + ARDUINO --> CANINO interface :)
  USB <--> CAN BUS interface
  Author: Luigi Rubino

  Adesso accetta 3 byte di indirizzo

  STRING EXAMPLE:
  @00A0102030405060708\n
*/

#include "mcp_can.h"
#include <SPI.h>

#define CAN0_INT 2                              // Set INT to pin 2
MCP_CAN CAN0(10);                               // Set CS to pin 10


// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
// Can_Bus_shield-ISO-v1 is default D10
//const int SPI_CS_PIN = 10;
//MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

unsigned char buf[8];
unsigned char canId;
long unsigned int rxId;


#define LEN_STRING 10

unsigned char ReceivedString[LEN_STRING];  //stringa ricezione carattere da USB

int inByte = 0;         // incoming serial byte

//global var
int  digValue, sign=1;
char rxpos, rxpos2;          //per il parser seriale
int address;                //comando da eseguire
int DT;


void setup() {
  // start serial port at 115200 bps:
  Serial.begin(115200); //provare velocità 115200
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
 
  // Initialize MCP2515 running at 16MHz with a baudrate of 500kb/s and the masks and filters disabled.
  if(CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_16MHZ) == CAN_OK)
    Serial.println("MCP2515 Initialized Successfully!");
  else
    Serial.println("Error Initializing MCP2515...");
  
  CAN0.setMode(MCP_NORMAL);                     // Set operation mode to normal so the MCP2515 sends acks to received data.

  pinMode(CAN0_INT, INPUT);                            // Configuring pin for /INT input
  
  Serial.println("CANINO READY...");
}

void loop() {

  unsigned char len = 0;
  
  // if we get a valid byte, read analog ins:
  if (Serial.available() > 0) {
    // get incoming byte:
    inByte = Serial.read();
    //Serial.write(inByte);
    // delay 10ms to let the ADC recover:
    //delay(10);
    
 /* Get the character received from the USART */
  if (inByte=='@')
   {
     rxpos     = 1;
     digValue  = 0;
   }
  else
  {
    
//    Serial.print("-->");
//    Serial.print((int) rxpos);
//    Serial.println();
    
  switch(rxpos)
  {
   case 1:
      address   = hex2int(inByte);
      rxpos    += 1;
      
      break;

   case 2:
      address   <<=4; 
      address += hex2int(inByte);     
      rxpos    += 1;

      break;
      
   case 3:
      address   <<=4; 
      address += hex2int(inByte);    
      rxpos    += 1;
      rxpos2   =  0; 

      break;
                  
   case 4:   //byte 1
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 5:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;

   case 6:   //byte 2
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 7:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;
 
   case 8:   //byte 3
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 9:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;

   case 10:   //byte 4
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 11:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;
      
   case 12:   //byte 5
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 13:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;

   case 14:   //byte 6
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 15:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;

   case 16:   //byte 7
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 17:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;

   case 18:   //byte 8
      DT = hex2int(inByte);
      rxpos    += 1;
      break;
   case 19:
      DT   <<=4; 
      DT += hex2int(inByte);
      ReceivedString[rxpos2] = DT;
      rxpos    += 1;
      rxpos2   += 1;
      break;
                  
   case 20: //eseguo il comando
        CAN0.sendMsgBuf(address, 0, 8, ReceivedString);
        //byte sndStat = CAN0.sendMsgBuf(0x100, 0, 8, data);
    //delay(100);          // send data per 100ms
      rxpos    = 0;

//da rinuovere
//      Serial.print(address, HEX);
//      for (int kk=0;kk<=7; kk++)
//      {
//        Serial.print(" ");
//        Serial.print(ReceivedString[kk], HEX);
//        
//        }
//        Serial.println();
    break;
    default: 
        rxpos    = 0;
        break;
  }
  }    //fine gestione acquisizione 
  }  //fine gestione seriale

  // --------------------------------------------------
  //gestione CAN BUS
  if(!digitalRead(CAN0_INT))                         // If CAN0_INT pin is low, read receive buffer
  {
    CAN0.readMsgBuf(&rxId, &len, buf);      // Read data: len = data length, buf = data byte(s)

    canId = (unsigned char) rxId;
//    canId = CAN0.getCanId();       // indirizzo risposta
        
 //       Serial.println("-----------------------------");
 //       Serial.print("Get data from ID: ");
        Serial.print("@");
        Serial.print(canId, HEX);

        for(int i = 0; i<len; i++)    // print the data
        {
            if (buf[i]<=15)  {  Serial.print('0');}
            Serial.print(buf[i], HEX);
        }
        Serial.println();
    }
 
}

void establishContact() {
  while (Serial.available() <= 0) {
    Serial.print('A');   // send a capital A
    delay(300);
  }
}

int hex2int (char c)
{
  if (c >= '0' && c <= '9')
  {
      return (int) (c-'0');
  }
  else
  {
      return (int) ((c - 'A')+10);
  }
}
CANINO library

Now we are ready to start!

Code test (Transmission)

A typical CAN-Bus connection in the industrial automation domain is shown in the figure, where there is a master and several multi slaves. In the master/slave one device or process (known as the master) controls one or more other devices or processes (known as slaves). Once the master/slave relationship is established, the direction of control is always from the master to the slave(s).

For the code test it is necessary to create a CAN-BUS micro-network, for example using two Arduino CAN-BUS interfaces.

For the example code shown here we used an Arduino CAN-BUS interface connected to a commercial CAN-BUS interface.

NB. The interface is configured for a CAN communication speed of 500kbps. Change this value in the code for a different speed. The addresses are configured to 11bit.

Open the serial terminal from the Arduino editor and configure it for a speed of 115200 baud, no flow control.

Enter the following string: @00A0102030405060708 and press enter.

The string consists of three parts:

  • @ (Attention) warns the interface that a new string is coming and that it must realign for a new send
  • 00A destination address
  • 01 02 03 04 05 06 07 08 are the 8 bytes to be sent in hexadecimal format. Recall that a hexadecimal byte is between 00 and FF.

If all the operations have been carried out correctly, the other interface will receive at the address 0A the bytes as in the sequence shown.

Code test (Reception)

For the reception code test, the reverse operation is performed.

We send to the address 0B, the string 08 07 06 05 04 03 02 01

In reception we will have an ASCII string formatted in the same way as the transmission, as shown below:

Example (Canino+LabView)

A YouTube video where CAN-ISO communicates with a CAN BUS industrial device, using the “CANINO” code and the “LabView” graphical interface:

Conclusions

Now that the code is tested and we are able to transmit / receive a generic package, appropriately formatted, the next step is to use the interface with a program. In the next tutorial we will see how to use the interface with Python, LabVIEW, MATLAB, bash shell and others.

Contact us to let us know your opinionsinfo(at)rubinolab dot com

To buy CAN-ISO: LINK

Enjoy!

CAN-ISO: CAN-BUS isolato galvanicamente (ARDUINO)

07 Feb 20
admin
, ,
No Comments

Unico prodotto “isolato galvanicamente”, professionale sul mercato mondiale per Arduino e/o similari!!

CAN-ISO è uno shield CAN-BUS (isolato galvanicamente) e permette di interfacciare una scheda Arduino o similare con propri dispositivi e/o commerciali, quali centraline, condizionatori, BMS (sistemi di ricarica), ecc che utilizzano il bus CAN.

Il costo di CAN-ISO (Made in Italy) è di 35 euro (solo shield).

 

Per informazioni o altro, e-mail: rubinolab(at)gmail dot com

 

E’ uno shield “professionale” completo di tutte le protezioni hardware con pin-out standard CAN su DB-9 facile da utilizzare.

Perché sceglierla rispetto altri prodotti? Principalmente poiché è isolata galvanicamente, di qualità, dalle alte prestazioni, riconfigurabile.

Ma l’isolamento galvanico a cosa serve? Per operare in sicurezza visto che solitamente si lavora su linee CAN con diversi dispositivi collegati. Nel caso di malfunzionamento di un dispositivo CAN (non isolato) per esempio guasto all’alimentatore o dispersioni di tensione che possono verificarsi in un ambiente di lavoro per umidità o pioggia è possibile che sulla linea CAN ci sia una tensione pericolosa per l’utente. In generale in base alla norma tecnica IEC 60479-1 la soglia di tensione minima considerata pericolosa per una persona è di 50Vac (tensione alternata a 50Hz) e 120Vdc (tensione continua). Gli effetti più frequenti e più importanti che la corrente elettrica produce sul corpo umano sono fondamentalmente quattro e bastano decine di milliampere per trovarsi in una delle condizioni: Tetanizzazione (>10-15mA), Arresto della respirazione (20-30mA), Fibrillazione ventricolare (70-100mA), Ustioni (>100mA).

Dove si utilizza? Si può utilizzare in moltissimi campi, per connettere più dispositivi con soli 2 fili twistati (consiglio di utilizzare anche uno schermo). E’ un sistema Real-Time, alla velocità di 1Mbit/s è possibile connettere linee di 40metri, mentre a 10kbit/s linee fino a 6 chilometri.

Riporto alcuni campi di utilizzo:

  • Automazione Industriale, Controllo, Sensori, Sistemi di comando a distanza
  • OBD II (On Board Diagnostics) Automotive
  • Industria 4.0 internet of things
  • Automazione di edifici e controllo del clima (HVAC)
  • Sistemi di sicurezza
  • Mezzi di trasporto
  • Sistemi medicali
  • Sistemi di telecomunicazioni
  • Standards CAN Bus quali: CANopen, DeviceNet, NMEA2000, ARINC825, ISO11783, CAN Kingdom, CANaerospace

Inoltre CAN-ISO è un progetto OPEN Software per i Makers !!!

In questa pagina sono riportati:

Grazie al supporto della community, questa pagina raccoglierà anche i migliori progetti di Makers, dando alla comunità dei Makers il miglior archivio per i loro progetti sviluppati con questo hardware.

Declinazione di responsabilità: RubinoLAB non può essere considerato responsabile per l’uso improprio del progetto.

Descrizione Tecnica

CAN-ISO è uno shield isolato galvanicamente per CAN-BUS, con protezioni e filtri su can-bus per board Arduino o similari.

In combinazione con una board Arduino è un potente strumento per l’invio e la ricezione di comandi, test e analisi delle reti CAN-BUS.
CAN-ISO può essere alimentata da una board Arduino attraverso la USB oppure da una alimentazione esterna a 12V sul connettore DB-9 consentendo di avere una board “standalone”. La scheda sarà sempre isolata sia se alimentata da Arduino che dal connettore DB-9.

Caratteristiche

  • Completamente conforme con le specifiche CAN 2.0A & CAN 2.0B Bosch
  • ISO 11898-2 (CAN alta velocità) interfaccia fisica
  • CAN baud rate configurabile da software fino a 1Mbps
  • 1000Vrms isolamento galvanico tra CAN-BUS e board Arduino
  • Protezione Fault Bus tra –27 V e 40 V
  • Protezione ESD
  • Filtro CAN di modo comune (rumore di linea)
  • Terminatore di linea CAN da 120 ohm (configurabile)
  • MCP2515 @16MHz
  • Circuit Operating Voltage: 5V default; 3.3V su richiesta prima dell’acquisto
  • Alimentazione isolata tra la board Arduino e il CAN-BUS (il dispositivo previene le il rumore delle correnti parassite sul bus dati o altri circuiti che possono entrare sul piano di massa e interferire o danneggiare i circuiti sensibili)
  • Pienamente compatibile con i protocolli ad alto livello quali: CANopen, DeviceNet, NMEA2000, ARINC825, ISO11783, CAN Kingdom, CANaerospace
  • Connettore industriale standard DB-9 (possibilità di alimentare da una sorgente esterna a 12V dc)
  • Protezione inversione di polarità da sorgente esterna su DB-9
  • Indicatori LED

Connessione

Riportiamo le connessioni dello shield “CAN-ISO”. Le etichette in blu sono utilizzate da CAN-ISO.

Il clock della board per il chip MCP2515 è 16.00 MHz.

Note :

  1. Lo shield CAN-ISO ha a bordo un terminatore CAN bus che è possibile inserire/disinserire mediante pinhead
  2. Il CAN bus deve essere terminato con un solo terminatore a 120 Ohm per cavi piccoli di lunghezza (< 2m)
  3. Per cavi CAN networks (>10m) & ambienti rumorosi usa cavi con schermo, con fili twistati.

Compatibilità

CAN-ISO Shield è utilizzabile sulle board che lavorano con segnali a 5V (default), fornibile per segnali a 3.3V su richiesta prima dell’acquisto:

Nome dispositivo Compatibilità Note
Arduino UNO (ATmega328) 100% testato
Arduino Mega (ATmega1280/2560) 100% da testare
Arduino Leonardo (ATmega32U4) 100% da testare

Test

Diversi test di base sono stati condotti per garantire che lo shield lavori in modo appropriato. I tests includono la misurazione della frequenza di clock, la potenza assorbita, le caratteristiche del filtro EMI.

Inoltre sono stati condotti altri specifici test con strumenti dedicati o hardware personalizzato. Questi test includono:

ISOLAMENTO fino a 1000 V Misuratore di isolamento:

NORMA

L.Nr.1806 30303

ERRORE DI COMUNICAZIONE più di 10 ore continue di comunicazione due shields sono stati utilizzati per un test in loopback

Lo Shield CAN-ISO ha superato con successo tutti i test menzionati!

On-Board Diagnostics (OBD)

Interfacciare OBD-II con DB9

Questo è la connessione standard per interfacciarsi alla OBD-II per tutti i veicoli in circolazione dal 2008. Per quelli più vecchi o per le auto FORD la piedinatura OBD-II potrebbe variare e dipende dal costruttore auto.

Codice di esempio RubinoLAB

Il primo esempio di codice si chiama “CANINO”. Questo codice trasforma l’hardware Arduino + CAN-ISO in un bridge tra la porta seriale USB e il CAN BUS. I pacchetti sono facilmente leggibili con un programma “serial terminal”, ciò consente di debaggare facilmente le linee o creare una facile interfaccia grafica con LabVIEW, Python, Processing ecc.

Per l’esempio: Configurazione del codice e test CAN-ISO

Un video YouTube dove CAN-ISO dialoga con una centralina CAN BUS, utilizzando il codice “CANINO” e interfaccia grafica “LabView”:

Per l’utilizzo con interfaccia grafica “professionale” vai alla pagina: CANHacker

 Maker

Per condividere il tuo progetto realizzato con CAN-ISO, invia una e-mail a: info(at)rubinolab dot com e proponi la tua idea.

Se la tua idea sarà considerata interessante, sarà ospitata nel sito web RubinoLAB o collegata alla nostra pagina.

Dove acquistare

Abbiamo realizzato una prima serie per soddisfare le nostre esigenze e quelle di molti makers, fino ad esaurimento scorte. Nel caso ci sia ulteriore richiesta ci sarà una ulteriore produzione.

Il costo della scheda (Made in Italy) è di 70 euro ora in offerta a 35 euro.

Per informazioni o altro, e-mail: rubinolab(at)gmail dot com

Confronto tra convertitori USB – CAN BUS isolati galvanicamente

08 Jan 20
admin
,
No Comments

In quest’articolo confronteremo il convertitore CAN-ISO (di RubinoLAB) con vari prodotti USB-CAN BUS commerciali (isolati galvanicamente).
Poiché sul mercato non esistono shields CAN bus “isolati galvanicamente” per Arduino o piattaforme simili, il team RubinoLab ha confrontato CAN-ISO con le migliori interfacce sul mercato che consentono di utilizzare interfacce proprietarie e permettono la personalizzazione.

Confrontando i dati risulta che l’interfaccia CAN-ISO (di RubinoLAB) è l’unica soluzione con “software aperto”, tutti gli altri hanno limitazioni sulle piattaforme di utilizzo (tipicamente OS Windows), firmware, e uso del software proprietario.
Ciò permette l’utilizzo nel settore industriale, e automobilistico a basso costo.
CAN-ISO ha due ingressi di alimentazione (ma necessita per funzionare di una sola alimentazione): USB e pin su connettore CAN. Tipicamente via USB per un utilizzo come sniffer connesso al PC, dal pin +12V su connettore CAN per realizzare un dispositivo stand-alone con alimentazione da remoto (non connesso al pc). Le due alimentazioni garantiscono isolamento galvanico e alimentazione dello shield CAN-ISO e della board Arduino (o compatibile).
CAN-ISO ha molti pin liberi presenti sullo shield e permette di collegare display, pulsanti, potenziometri, sensori, ecc. per realizzare nuovi dispositivi con connettività bidirezionale CAN-BUS “isolata galvanicamente”.
Ottimo per realizzare un banco di test CAN per centraline con interfacce realizzate ad hoc.

Contattateci per farci conoscere le vostre opinioni, o proporci una vostra idea/progetto. Per scriverciinfo(at)rubinolab dot com

Per l’acquisto di CAN-ISO: LINK

Enjoy!

Comparison isolated galvanically converter USB – CAN BUS

08 Jan 20
admin
,
No Comments

This article reports a comparison between CAN-ISO (of RubinoLAB) with commercial USB-CAN BUS product (galvanically isolated).
Since there are no “galvanically isolated” CAN bus shields on the market for Arduino or similar platforms, the RubinoLab Team has compared CAN-ISO with the best interfaces on the market that allow to use both proprietary and new interfaces for customization.

Comparing the data shows that the CAN-ISO interface (RubinoLAB) is the only solution with “open software”, all others have limitations on the use platforms (typically OS Windows), firmware, and use of proprietary software.
This allows use in the industrial, and low-cost automotive sector.
CAN-ISO has two power inputs (but only one power supply): USB and pin on CAN connector. Typically via USB for use as a sniffer connected to the PC, from pins on CAN connector to create a stand-alone device with remote power supply (not connected to the PC). The two power supplies guarantee galvanic isolation and power supply of the CAN-ISO shield and the Arduino board (or compatible).
CAN-ISO has many free pins on the shield and allows you to connect displays, buttons, potentiometers, sensors, etc. to create new devices with bi-insulated CAN-BUS bidirectional connectivity.
Excellent for creating a CAN test bench for control units with interfaces created ad hoc.

Contact us to let us know your opinionsinfo(at)rubinolab dot com

To buy the CAN-ISO: LINK

Enjoy!

Clone Arduino & driver chip CH340, CH340G, CH341

08 Jul 19
admin
,
No Comments

The CH340/CH341 chip is used by a number of Arduino compatible cards to provide USB connectivity.
Many operating systems do not recognize these chip natively because they lack the drivers and consequently we have an error due to lack of drivers.
The lack of this driver does not allow you to communicate with the hardware platforms and to use the Arduino development software.

No panic, driver installation is very easy!

The driver must be downloaded from the official (Chinese) website.

Once the unzip of the package has been executed, it is possible to proceed with the update of the driver for the device CH340/CH341 and equivalent (download driver only for your OS):

 

WINDOWS 32/64bit (version: 3.4 – 2016/09/27)

Drivers in the Windows OS are missing, you need to download and install them.

(WINDOWS 32/64bit) for Windows 10/8.1/8/7/VISTA/XP/2000/ME/98 & SERVER 2016/2012/2008/2003

 

LINUX 32/64bit (version: 1.5 – 2018/03/18)

The drivers are integrated into different Linux distributions. If the device is not recognized, download the Linux CH340/CH341 driver.

(LINUX 32/64bit)

 

MAC OS 32/64bit (version: 1.5 – 2018/07/05)

This driver is for MacOS Sierra/High Sierra. Do not install the drivers for the Mojave, because it seems that the latest versions are equipped with the built CH340/CH341 support.

(MAC OS 32/64bit) for MacOS Sierra/High Sierra

Installation
• Unplug any CH34* devices.
• Unload the old drivers if running:
• sudo kext unload /Library/Extensions/usbserial.kext
• sudo kext unload /System/Library/Extensions/usb.kext
• Remove the old driver by issuing one of the following commands (depending on your installation):
• sudo rm -rf /System/Library/Extensions/usb.kext
• sudo rm -rf /Library/Extensions/usbserial.kext
• Double-click on the CH34x_Install_V1.3.pkg file and install (no need to reboot)
• Instead of rebooting, you can force quit Installer after it completes.
• Load the new driver:
• sudo kextload /Library/Extensions/usbserial.kext
• Plug in your device. It should now be listed under the /dev directory. Examples:
• /dev/cu.wchusbserial1410
• /dev/cu.wchusbserial1420

 

ANDROID (version: 1.5 – 2018/03/18)

Android 3.1 – USB Host, root, apk, lib, (Java Driver), App Demo, (USB UART Demo SDK)

 

Enjoy!

European Clean Sky Project (FP7) – EPOCAL

04 Jan 19
admin
, , , ,
No Comments

EPOCAL: Electrical POwer Center for Aeronautical Loads

JTI-CS – Joint Technology Initiatives – Clean Sky
from 2013-03-01 to 2015-07-31

EPOCAL is a European FP7-JTI project of the Clean Sky research program, in the Aeronautics sector.

The participants to the project:

  • University of Campania “Luigi Vanvitelli”;
  • Aeromechs: whose brothers Rubino Guido and Luigi were responsible for the design, construction and testing of hardware and firmware codes of the SSPC (Solid State Power Controller) designed ad hoc. They have also dealt with all internal communications (CAN-BUS 2.0b) and external interfacing with third-party devices.

All parts of the project were developed and implemented at the Rubino brothers’ laboratory, now RubinoLab.

Description

The main objective of this project is been the development of an Electrical Power Center (EPC) for the “flight test” on AIRBUS ATR-72, which integrates with a dedicated control console (CC), enhanced with advanced electrical power management strategies (E-EM).

The main keypoints developed are been:

  1. An EPC equipped with Solid State Power Controllers (SSPCs) designed ad-hoc that integrates the hardware and software protections of its functionality and regulates the power to the loads according to the energy management strategy.
  2. Most recent technologies are been included in the electrical power center, referring to the recent state-of-art, in order to guarantee compliance with aeronautical standards.

Project have followed a typical workflow based on requirements analysis, specs derivation, design phase, physical implementation, testing phase, results analysis versus simulations and final equipment validation.

The EPC is one of the fundamental components for the correct functioning of all the electric and electronic parts of an aircraft, for this reason before the installation for the “flight test” on AIRBUS ATR-72-600, strict pre-testing was requested for the qualification tests to 10000mt, at a qualified third-party laboratory (more than 35 tests).

The qualification tests of all the parts for the flight were conducted at Celab (Latina), which certified the reliability of the device according to the most stringent aeronautical standards.

Here are some interior photos of the project “Epocal”

Photo of the “Epocal” equipment installed inside an ATR-72.

The device under the Clean Sky project, in March 2016, ranked among the first
10 best technology jobs on over 300 projects evaluated. In the future it will be reproduced for the installation of series on new aircraft.

Article: 

Electrical Power Center for Aeronautical Applications

EOBD socket (European On Board Diagnostic)

07 Dec 18
admin
, ,
No Comments

With the term OBD or OBD-II, in the automotive, motorcycle or motoring context in general, it is a generic term that refers to the ability of self-diagnosis and error reporting of a vehicle. Technically his name is J1962 and in Europe he is called by the term EOBD.

The communication protocol used for the OBD (On Board Diagnostics) is the CAN (Controller Area Network) that can communicate with the “Body computer” to which all the devices of a vehicle are connected.

It is essential to distinguish the roles of the two CAN and OBD-II protocols.

The CAN (controller area network) protocol is a serial digital communication bus of the “broadcast” type: it allows distributed real-time control with a very high level of security. It was introduced by Bosch in the early 1980s for automotive applications, to enable communication between intelligent electronic devices mounted on a vehicle, but has now spread to many sectors of the industry. But in order for there to be communication between the CAN devices, the data received must be uniquely identified and consequently the OBD was introduced. The OBD-II protocol, much more detailed than the CAN, was born expressly as a standard for transport vehicles and has become mandatory in America in vehicles produced since 1996. The European version of this standard is called EOBD, it is substantially identical to OBD-II and is mandatory since 2001.

The OBD-II not only defines the communication standard, but also the connector that must be present in the vehicle interior for the connection of compatible OBD-II instruments. This connector is substantially a connection port to the CAN bus (or other bus present on the vehicle). When this connector is connected to an instrument with an OBD-II interface, it is practically connected to the CAN bus and is able to do two things:

  • “Reading” passively. All the messages sent by the control units on the bus and transmit them to the user’s computer (or other device).
  • “Writing” actively with the control units, requesting data and then transmitting the replies received to the computer (or other device).

Like all active systems, it is possible to send commands to modify the operating parameters, so it is advisable to limit yourself to sending the messages you know the effect of, because different messages could alter the functioning of the car and this can be dangerous.

The OBD-II connector also includes a line that supplies power to the connected device. It is important to know that the connector in many vehicles always supplies energy, even when it is switched off and a diagnostic tool always connected to the vehicle (even with the engine off) could cause the battery to discharge since it always keeps the control units that are not in the Energy Saver active. For these reasons it is recommended to disconnect the diagnostic connector after each use to preserve the vehicle battery charge.

OBD-II

The OBD-II standard also defines some commands for controlling the output, the self-monitoring modes and for clearing the KAM memory (Keep Alive Memory).

The OBD-II connector is identical for all models but there are five different communication protocols:

  • VPW (Variable pulse width): General Motors
  • PWM (Pulse-width modulation): Ford
  • ISO 9141: Chrysler in Asia and Europa
  • ISO 14230 KWP2000 (Keyword Protocol 2000 on line K)
  • ISO 15765 (via CAN line, as SAE-J2284)

It also provides information on all relevant parameters and errors for the purposes of polluting emissions:

  • Parameter codes (RLI)
  • Speed
  • Rpm
  • Error codes (DTC)
  • Oxygen sensor

The reading of the error components is standardized, so any workshop even without the official tool of the house, must be able to read the OBD errors.

Notes: For petrol engines before 2001, instead of OBD-II we talk about OBD-I, ie an on-board diagnosis related to electrical errors only.

The EOBD regulation European On Board Diagnostics (European On Board Diagnostics) is the European equivalent of OBD-II and was introduced for petrol engines in 2001 together with the Euro 3 emission level with Directive 98/69/CE[1].

The EOBD applies to all M1 class vehicles (with no more than 8 seats and a gross vehicle weight of up to 2500 kg) registered for the first time within the EU Member States from 1 January 2001 for petrol-powered cars and from 1 January 2004 for cars with diesel engines. For the newly introduced models, the dates of application of the legislation were brought forward by one year: 1 January 2000 for petrol-driven cars and 1 January 2003 for diesel-powered cars.

For cars with a gross vehicle weight greater than 2500 kg and for light commercial vehicles, the dates of application of the legislation started from 1 January 2002 for petrol models, and from 1 January 2007 for diesel models.

Note: If the pin 15 contact is present in the EOBD2 socket, the procedure for reading the error codes can be performed. Connect the pin 15 (if present) with the ground pin 5 and the diagnostic indicator and the error code list identify the error code in memory.

On some cars the flash code is available on pin 13.

EOBD-II – Fault Codes

EOBD fault codes European On Board Diagnostics are composed of five characters: a letter, followed by four numbers.

The letter refers to the system that is referenced (eg Pxxxx refers to the propulsion system) while if the next character is a 0 indicates compliance with the EOBD European On Board Diagnostics standard, if it is a different number it falls within the manufacturer’s proprietary code table and may vary depending on the system diagnosed. The third character refers to a subsystem, eg:

  • P00xx – Fuel measurement and air intake, auxiliary emission control
  • P01xx – Fuel measurement and air intake
  • P02xx – Fuel measurement and air intake (injection system)
  • P03xx – Injection control and missed ignitions
  • P04xx – Auxiliary emission control
  • P05xx – Vehicle speed control and engine minimum adjustment system
  • P06xx – Control unit communication system control
  • P07xx – Transmission system control
  • P08xx – Transmission system control

For the complete table of codes: OBD II Standard Fault Codes

Now let’s take the CAN-BUS ISO and we prepare the connection cable for reading the values on EOBD!

Enjoy!

CAN-ISO with CANHacker graphic interface

05 Nov 18
admin
,
No Comments

In this section we will see how to make an “Universal isolated galvanic CAN BUS monitor” using Arduino with a CAN-ISO shield (RubinoLab) and a graphic interface CANHacker.

A complete professional device for all CAN-BUS protocols, from the automotive to the industrial sector.

To buy CAN-ISO: LINK

A CAN network device that allows to write / read on CAN-bus to perform operations such as diagnostics, analyze network traffic, identify network problems, etc. For example:

In the automotive sector: it can be used to read the error codes of the cars, motorcycles, etc. that use OBD-II, or carry out operations of “CAN Bus Reverse Engineering” by monitoring the exchange of CAN data between engine side units, or send commands to reset error codes, perform bench tests of individual subsystems, etc

In the industry: with network monitoring you can help managers of a CAN network to identify whether a network is working normally or is congested. In addition, bottlenecks can be identified within a network to identify and improve performance with upgrades to the infrastructure.

Identification of problems: As mentioned above, in addition to reading / writing to CAN you can identify all the problems related to the network. By reading the information acquired by the sniffer it is possible to identify the wrong packets and / or identify the node that has not responded to the requests. This facilitates the identification of defective devices within the network efficiently and provides the ability to take quick corrective actions.

Here’s what you need

Buy the hardware:

Download the software:

Now we are ready to start!

Features

Before installation, let’s see what they are and what they do “Arduino canbus monitor” and “CANHacker tool”.

The sketch “Arduino canbus monitor”, implements CAN ASCII/SLCAN protocol compatible with Lawicel CAN232/CANUSB. It can be used for monitoring a large part of CAN protocols. Note: For CAN speeds exceeding 500kbps with a high data density on the serial port of Arduino, the serial port can become a bottleneck.

The graphic interface windows “CANHacker tool” of (Lawicel) can be interfaced to “Arduino canbus monitor”. It implements communication CAN with:

  • send & receive Can Frames
  • supports standard (11 bit) & extended (29 bit) frames
  • supports remote frames (RTR)
  • supports filter by ID (mask + code)
  • supported can baudrates from 10Kbps up to 1Mbps
  • support MCP2515 @ 16 MHZ

Now we will see step by step how to install the software “Arduino canbus monitor”  and “CANHacker tool”.

Installation

After downloading “Arduino canbus monitor”:

  1. load sketch “arduino-canbus-monitor.ino”
  2. Compile and if there are no errors continue to step 3. If there are errors about missing libraries (“mcp_can.h” and “can-232.h”) zip the files into a folder (can-232.cpp, can-232.h, mcp_can.cpp, mcp_can.h, mcp_can_dfs.h) and then from the Arduino IDE: Sketch -> Include Library -> Add .ZIP Library. Restart the Arduino IDE and go to point 1.
  3. Load to Arduino platform
  4. Disconnect and reconnect Arduino to USB

Now download “CANHackerV2.00.02.exe” and install the software to Windows platform.  After installation, restart Windows. Now it’s ready.

Usage

Now we can start using ours “sniffer” or “monitor canbus”.

  1. Connect the CAN Device (Arduino+CAN-ISO shield) to PC. Wait for Windows assign a COM serial port number. Check the serial port number assigned by windows in “device management”.
  2. Start the software CANHacker, and in “Setting” choose:
  • CAN Device: the COM port assigned to Arduino from windows
  • COM Baudrate: 115200 bits/s
  • CAN Baudrate: CAN port speed

Click on the button “OK”, then “Connect”. Have fun! Monitor your Can bus, save traces, send messages, do what your analyzer/visualizer software can.

EXAMPLE 01

In this test we will carry out Canbus communication tests between two “Arduino UNO” boards with “CAN-ISO” shields.

For the test we need:

(2) boards “ARDUINO UNO”
(2) Shields “CAN-ISO”
(1) cable Canbus

In order to use the same PC to read/write on the Canbus, we will use a “Windows terminal” and “CANHacker” as graphic interfaces.

As result, the download sketches on the first Arduino board is “CANINO”, in the second “Arduino canbus monitor”
Download CANINO
Download Arduino canbus monitor

Now launch the terminal:
CANHacker: configure the COM port, CAN speed (for board with Arduino canbus monitor);
CANINO: configure the COM port, CAN speed (for board with Canino);

In the figure, for example, we can see the sending of the string @00A0102030405060708 from “Windows terminal” of CAN to “CANHacker”.

Conclusions

With this solution we will have a complete tool, galvanically isolated for multiple uses, at low cost.

Contact us to let us know your opinionsinfo(at)rubinolab dot com

To buy CAN-ISO: LINK

Enjoy!

CAN-ISO: Galvanically isolated CAN-BUS Shield (ARDUINO)

12 Sep 18
admin
, ,
No Comments

The first “galvanically isolated” product, professional on the world market for Arduino and / or similar !!

CAN-ISO is a shield CAN-BUS that allows to interface an Arduino board or equivalent with own devices and / or commercial, such as control units, air conditioners, BMS (charging systems), etc. that use the CAN BUS.

The cost of CAN-ISO (Made in Italy) is 35 euro (only shield).

 

To buy CAN-ISO: LINK

or write me: rubinolab(at)gmail dot com

 

It is a “professional” shield complete with all hardware protections with standard CAN pin-out on the DB-9 easy to use.

Why choose it compared to other products? Mainly because it is galvanically isolated, quality, high performance, reconfigurable.

But why do you need galvanic isolation? To operate safely since you usually work on CAN lines with different connected devices. In the event of a malfunction of a CAN device (not isolated), for example a power supply failure or voltage losses that may occur in a working environment due to humidity or rain, it is possible that there is a dangerous voltage for the user on the CAN line. In general, according to the IEC 60479-1 International Electrotechnical Commission, the minimum voltage threshold considered dangerous for a person is 50Vac (AC voltage at 50Hz) and 120Vdc (DC voltage). The most frequent and most important effects that the electric current produces on the human body are basically four and just tens of milliamps are enough to find one of the conditions: Tetanization (> 10-15mA), Breathing arrest (20-30mA), Ventricular fibrillation ( 70-100mA), Burns (> 100mA).

Where is it used? It can be used in many fields, to connect multiple devices with only 2 twisted wires. It’s a Real-Time system, at the speed of 1Mbit / s it is possible to connect lines of 40 meters, while at 10kbit / s lines up to 6 kilometers.

I report some fields of use:

  • Industrial Automation, Control, Sensors, and Drive Systems
  • OBD II (On Board Diagnostics) Automotive
  • Industry 4.0 internet of things
  • Building and Climate Control (HVAC) Automation
  • Security Systems
  • Transportation
  • Medical
  • Telecom
  • CAN Bus Standards such as CANopen, DeviceNet, NMEA2000, ARINC825, ISO11783, CAN Kingdom, CANaerospace
Moreover CAN-ISO is a project OPEN SOFTWARE for Makers !!!

In this page are reported:

Thanks to the community support this page will also collect the best Makers project, giving to the Makers community the best code repository and hardware for their projects.

Disclaimer: RubinoLAB cannot be considered responsible for the improper use of the project.

Technical Description

CAN-ISO is a shield isolated galvanically, with protection and filter on can-bus for board Arduino or similar.

In combination with an Arduino board it is a powerful device for the command, test and analysis of a CAN network.
CAN-ISO can be powered by the Arduino board via USB or by an external 12V power supply on the DB-9 connector. The card is always isolated with both the Arduino power supply on the DB-9 connector.

Features

  • Fully compliant with the CAN 2.0A & CAN 2.0B Bosch specifications
  • ISO 11898-2 (High speed CAN) physical interface
  • CAN baud rate adjustable by software up to 1Mbps
  • 1000Vrms galvanic isolation barrier
  • Bus-Fault Protection of –27 V to 40 V
  • ESD protection
  • Common Mode Filters CAN
  • 120 ohm terminating resistor at CAN node (setup)
  • MCP2515 @16MHz
  • Circuit Operating Voltage: 5V (3.3V on request)
  • Isolated power supplies between board Arduino and CAN-BUS (the device prevents noise currents on a data bus or other circuits from entering the local ground and interfering with or damaging sensitive circuitry)
  • Fully compatible with higher level protocols such as CANopen, DeviceNet, NMEA2000, ARINC825, ISO11783, CAN Kingdom, CANaerospace
  • Industrial standard DB-9 connector (possibility to supply external to 12V dc)
  • Protection inversion of polarity on the DB-9 (supply external to 12V dc)
  • LED indicators

Connection

We report the most important connections of the shield “CAN-ISO”. Blue labels are used by CAN-ISO.

Notes :

  1. The CAN-ISO Shield contains onboard a internal CAN bus termination that is possible insert or no with pinhead
  2. The CAN bus must be terminated with a 120 Ohm resistor, with a single 120 Ohm resistor for short cable lengths (< 2m)
  3. For long CAN networks (>10m) & in noisy environments the use of screened, twisted pair wire is recommended.

Compatibility

CAN-ISO Shield can be used on boards that work with 5V signals (default), available for 3.3V signals on request before selling:
Device name Compatibility Note
Arduino UNO (ATmega328) 100% tested
Arduino Mega (ATmega1280/2560) 100% not tested
Arduino Leonardo (ATmega32U4) 100% not tested

Tests

Several basic tests have been conducted in order to guarantee that the shield is properly working. Tests include clock frequency measurement, power absorption, EMI filter characteristics.

Furthermore other specific tests have been conducted with dedicated instruments or custom hardware. These tests includes:

ISOLATION up to 1000 V Isolation instrument:

NORMA

L.Nr.1806 30303

COMMUNICATION ERROR more of 10 hours continuous communication two shields have been used for loopback test

The CAN-ISO Shield have successfully passed all the above mentioned tests!

On-Board Diagnostics (OBD)

 

OBD-II to DB9 interface

This is the standard connection to OBD-II for all vehicles from 2008. For old vehicles or FORD cars the OBD-II pinout may vary and depends on the car manufacturer.

RubinoLAB code example

The first example is the CANINO code. This code transform your Arduino hardware + CAN-ISO to a bridge between the USB serial port and the CAN BUS. The packets are easily readable with a serial terminal, this allow to easily debug the line or write a custom graphical interface with LabVIEW, Python, Processing etc.

For the example: Code configuration and test CAN-ISO

A YouTube video where CAN-ISO communicates with a CAN BUS control unit, using the “CANINO” code and the “LabView” graphical interface:

For use with “professional” graphical interface: CANHacker

Maker’s

To share your project made with CAN-ISO, please send an email to: info(at)rubinolab dot com and propose you idea. If considered interesting, your project can be hosted in the RubinoLAB website or linked to our page.

Where to buy

We have created a first series to meet our needs and those of many makers, while stocks last. If there is further request there will be a further production.

The cost of CAN-ISO (Made in Italy) is 35 euro (only shield).

To buy CAN-ISO: LINK

or write me: rubinolab(at)gmail dot com

WIRELESS EBIKE BATTERY CHARGER

22 Jul 16
admin
,
No Comments

Wireless Resonant Inductive Power Transfer for an Ebike Charging Battery

In this page RubinoLab.com presents the prototype and experimental tests of an E-bike 300W battery charger for a cyclo-station based on wireless power technology made for research.

For this project, several scientific papers were written with a mathematical model developed and conducted with performance analysis to determine the voltage transfer function, maximum power transfer capacity, efficiency for different air gaps (1 -3 cm) and misalignments (0.5-1.5 cm).

The resonance frequency of this circuit for wireless charging batteries is 40kHz.
To achieve maximum efficiency and maximum power transfer, work at the resonance frequency.
To evaluate the correctness of the circuit a LabView panel was realized where it was possible to characterize the circuit by varying the frequency between 30-50 kHz on the prototype.

This is a second prototype of the Ebike Charging battery. It is a primary part of the charger. it works at a higher frequency and for the magnetic part has been used a coil of Wurth Elektronik.

The circuit during the tests connected to the electronic instrumentation.

Scientific papers:

1- Resonant inductive power transfer for an E-bike charging station (Journal ELSEVIER)

2- Controller design and experimental validation of a power charging station for e-bike clever mobility (Conference IEEE)

3- Detailed continuous and discrete–time models and experimental validation to design a power charging station for e-bike clever mobility (Journal ELSEVIER)