Test and Measurement Forum

ARDUINO ZERO AS BUFFER/ISOLATOR FOR PICOLOG DA LOGGERS - 5

Post discussions on projects you are working on

ARDUINO ZERO AS BUFFER/ISOLATOR FOR PICOLOG DA LOGGERS - 5

Postby Glovisol » Wed May 11, 2016 7:25 am

ARDUINO ZERO BUFFER/ISOLATOR I2C - ANALOGUE OPERATION

If you are prepared to write (or look for) libraries which are not accepted any more by IDEs 1.6.6, 1.6.7 or 1.6.8 (newest), you can install one of these. They handle the COM PORT connections between PC and Micro better and seldom lose the COM PORT. Also they solve the problem of auto-opening of the Serial Port that required the ERW addition with IDE 1.0.6. Unfortunately these newer IDES do not recognise the WIRE and several other useful Libraries any more.


My statement quoted above is incorrect in the sense that, even if many "old" libraries do not work with IDE 1.6.0 and later, the WIRE library, very useful with I2C operation, does work with the new IDEs and with the ZERO.

While in the UNO the SDA and the SCL connections of the I2C are present on pins A4 and A5, in the ZERO these connections are on the two sockets behind the AREF socket: e.g. they are between the AREF socket and the RESET pushbutton (see schematic in Part 4).

A sketch for I2C/Analogue operation is uploaded below. In this sketch output pins D2, D3, D4, D5 & D6 are used as Analogue PWM outputs from inputs A0, A1, A2, A3 & A4, while pin D7 is used as Analogue PWM output for the I2C input. For this example an I2C temperature sensor module using the LM 75 precision temperature sensor has been used. As previously explained, using I2C, several sensors can be accommodated in parallel, by simply using different addresses. If one plans to mix Analogue and I2C sensors, it must be kept in mind that the available PWM outputs (see Part 1) are limited to pins D2, D3, D4, D5, D6, D7, D11 & D13. For more output pins, additional Multiplexer manipulation is needed: relevant information can be provided on request on this forum.

The sketch has been configured so that pin D7 outputs a PWM proportional to sensor temperature, with 0% duty cycle @ 0°C and 100% duty cycle @ 100°C.
Attachments
Buffer I2C + Analogue.jpg
PC screen showing one I2C input & one Analogue input
Sketch_Universal_Translator_8_I2C.doc
ZERO Universal sketch I2C + ANALOGUE
(46.5 KiB) Downloaded 43 times
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Return to Projects

Who is online

Users browsing this forum: No registered users and 0 guests