Test and Measurement Forum

REMOTING SIX SENSORS ON ONE TWISTED PAIR - PART 6

Post any questions you may have about our current range of USB data loggers

REMOTING SIX SENSORS ON ONE TWISTED PAIR - PART 6

Postby Glovisol » Sat Feb 13, 2016 3:53 pm

Pico sketch Master with channel 5 975 Hz PWM (Medium).jpg
5. COMPLETE SIX CHANNEL SOFTWARE


SKETCHES AND RELEVANT DISCUSSION IN THE REPLY (NEXT POST BELOW).

The enclosed Master & Slave sketches are in WORD format and must copied and pasted to the Arduino IDE as previously described for the demo software. Some additional information.

- The time measurement is approximate and depends on the individual Arduino used. It can be individually calibrated by changing the “seconds” equivalence, but it is not really important, as accurate time is kept by the Data Logger.

- It is possible to eliminate the NE555 negative generator, at the cost of one data channel. In fact only Arduino pins 3,5,6 9,10 & 11 are PWM capable. One of these could be used to output the square wave now generated by the NE555, thereby simplifying the Master Shield circuit.
Attachments
Pico sketch Slave in operation (Medium).jpg
Pico sketch Master in operation (Medium).jpg
Last edited by Glovisol on Wed Feb 24, 2016 11:07 am, edited 2 times in total.
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: REMOTING SIX SENSORS ON ONE TWISTED PAIR - PART 6

Postby Glovisol » Tue Feb 16, 2016 1:20 pm

MOVING TOWARDS ARDUINO M0

The move to Arduino M0 imposed a major re-work of the sketches because with the new device the Arduino ERW 1.06 does not work. The main advantages of the ERW IDE are due to:
i) Automatic opening of the Serial Monitor at the end of the upload cycle.
ii) Availability of a "SOFT RESET" button on the Serial Monitor, which allows to go back to the initial conditions once the set number of iterations has been reached.

Arduino M0 requires newer IDE Ver. 1.7.8, which does not have the above facilities, so that it became necessary to re-write the sketches to have a built-in SOFT RESET for the Master and the SLAVE units. This is quite a job and required a complete change of architecture and a few tricks.

I am therefore uploading NEW VERSIONS of the DrDAQ demo software, as a guide to understand the changes. Now writing "a" in the Serial Monitor re-sets the Master and also the remote Slave. Writing "b" starts the system as before.

In the Part 7 next I shall upload the sketches for the 6 channel version, still for Arduino 1, as I already anticipate technical difficulties for the M0 version, which will require additional work.
Attachments
sketch_SLAVE_485_DrDAQ_DEMO_1_6.doc
Slave DrDAQ demo remotely resettable
(38 KiB) Downloaded 92 times
sketch_MASTER_485_DrDAQ_DEMO_1_6.doc
Master DrDAQ demo with re-set built-in
(39 KiB) Downloaded 84 times
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy


Return to USB PC Data Loggers

Who is online

Users browsing this forum: No registered users and 0 guests