![]() This sketch is designed to automatically query the sensors connected to the two analog ports on the Vernier shield. Upload these sketches to your arduino device, and open up a Serial Monitor to view the data coming back to your computer. Vernier has created a wealth of examples hosted on github. The team at Vernier have helped us with creating a couple simple Arduino sketches that automatically query either the Analog or the Digital ports of the Arduino and report back the sensor identification and standard calibration data. In general, you won't need to access these lines unless you are interfacing to the Vernier sensors through I2C. identifies which connector to switch the MUX to. connectorNum is a number from 0 to 3 which The following snippet of code illustrates one way to switch which connector A4 and A5 are connected to. Pins 10 (LSB) and 11 (MSB) are used to control the multiplexer. The Vernier shield uses an analog multiplexer to share / route pins A4 (SDA) and A5 (SCL) to each of the four connectors. A majority of sensors use a resistor placed on one of the pins, but some of their sensors use I2C for both sensor identification and storing calibration data. Vernier uses a variety of methods for identifying which sensors are connected to the interface. In addition to the internal wiring and routing for the Vernier BTA and BTD connectors, we placed an indicator LED tied to pin 13, a general purpose button on pin 12, and a reset button on the shield. In order to properly access the BTA and BTD connector pins, you will need to interface the analog multiplexer circuit. *Pins A4 and A5 are shared across all four connectors. Used for rotary motion sensor to increase sensitivity. Trigger pin for the motion detector and I2C data (SDA) for sensor ID Signal pin used for the photogate, motion detector echo, radiation count, and CCW rotary motion count. Pin assignments for digital ports Digital 1 The measured voltage drop across this pin uniquely identifies the sensor. The shield has a built-in circuit to scale and shift input voltages from -10V to +10V to a range of 0V to 5V for pins A1 and A3.Ī 10K pull-up resistor ties these pins to 5V. Most analog sensors will interface to this pin. Pins 10 (LSB) and 11 (MSB) control a multiplexer for A4 and A5. Pin assignments for analog ports Analog 1 ![]() See the section on multiplexing for more information. The multiplexer is controlled with Pins 10 (LSB) and Pin 11 (MSB). We use a multiplexer to "share" (multiplex) pins A4 and A5 between all four connectors. Many of the Vernier sensors use I2C for identification and calibration data. To maximize the flexibility of using all of the Vernier sensors, we have made the following pin assignments on our shield. ![]() The BTA and BTD connectors will not plug into the same socket. This is called a left-handed British Telecom connector and has the tab on the opposite side. Note that the connector is slightly different compared to the analog sensors. The following table outlines the pin assignments used for the Vernier digital connector. These sensors each have a somewhat unique pin-out definition. Common digital sensors include: motion detector, photogate, radiation monitor, and the rotary motion sensors. British Telecom Digital (BTD) – Left Handĭigital sensors are any of the devices that return a signal that is either on (5V) or off (0V). On each of these probes, the signals are each tied to Pin 1 and and GND of the BTA connector. To extend the use of Vernier equipment, they also offer a few voltage probes that allow for direct voltage measurements between +/- 6V, +/- 10V, and +/- 30V. Primary sensor output for most analog sensors including light, temperature, force, pressure, pH, etc. Vernier uses this to identify the sensor. Most sensors have a unique resistor that is tied between this pin and GND. 15K pull-up resistor ties this pin to 5V to use as a voltage divider between Pin 6 and GND. This is wired through a scale and shifting op-amp circuit so that the Arduino can read it on a scale of 0 - 5V. Used with a number of Vernier voltage probes. The pins of the BTA connector are defined as such: PIN # Learn more about the differences between analog and digital here. A large number of sensors used in the classroom fall under the category of "analog" sensors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |