Wireless Sensor Development Board

Added by wolfpackmars2 over 5 years ago

I’m posting this information in case it helps someone. I’ll try to keep it updated, but at this time there’s not much anticipation that this will be further developed.

The files were created using KiCad. The Arduino sketch was created using Arduino 1.5.4. This board is a breakout board for a Jeenode Micro V3. It adds a 5V power supply for interfacing with a Freescale MPXV pressure sensor. This board provides two main interfaces: a header for the Jeenode Micro and a header for the components provided by the Development board. A standard ISP header is also included, to ease programming the Jeenode Micro. A few obvious connections are made by the board, such as routing some BATT power and routing the 5V power to the MPXV sensor. Most other connections are left for the user to connect however they wish (hence - why this is called a development board).

The schematics are intentionally incomplete. Read the extensive notes in the drawing for more information about what’s needed to make this work. This board was designed in order to assist in developing a digital furnace filter monitor. As implemented and described, it does work, although it’s rough and there’s plenty of room for improvement.

EDIT: 2013.11.30 I’ve added a sample log file of the data received on the RaspberryPI. The file is sample_pi_log.csv and includes a header for each column to explain each byte. Each row of data represents one transmission from the Jeenode Micro, spaced about 1.5-2 seconds apart. No power saving features are implemented, other than turning off the 5V power (and thus the Pressure Sensor) when not being used. Also added sample_pi_log.xlsx (Excel 2010 format), which translates the raw data into human readable data with real-world data meanings. The excel workbook contains a separate worksheet which explains the formulas used to convert the raw data into human readable values. Also added a screen shot of the Value Charts from the Excel spreadsheet.

This information is Copyright © 2013 Steve Groesz, and released under the 3-clause BSD license.

The notes from the schematic are copied here.


This is a development board for testing only. None of the signals are connected to the
microcontroller as a result. Connections are made using jumpers between the Board I/O
and Jeenode I/O headers. Also, this schematic is incomplete. During development, it was
realized that the MPXV sensor would output UP TO 5V, which, if connected to an ATTiny
input pin, would potentially destroy that input or the whole mico controller when the
ATTiny is configured for 3V signalling (as the Jeenode Micro V3 is). As a result, any
voltages greater than 3V (or that have the POTENTIAL to be greater than 3V) require a
resistor divider to bring their voltage down to a MAX of 3V. Luckily, the same 5V to 3V
voltage divider can be used for all voltages to be measured (20k top/30k bottom).
A 20k/30k voltage divider will take a MAX 5V signal and make it a MAX 3V signal. Use
the Batt Sense circuit as an example. The Batt Sense voltage divider allows up to 5V
of battery voltage (3xAA) to be measured. This does not interfere with the sensitivity
of the ADC, since at 3V signalling 3V will be FullScale - ie 3xAA fresh AA batteries at 4.9V
will measure a little under 3V on the microcontroller, which the microcontroller will
report as between 950-1000 where 1024 is FullScale with a 10-bit ADC.

Also, the 10-bit ADC of the ATTiny84 proved insufficient to register the small pressure
changes that we are looking for when monitoring a furnace filter. In order to take full
advantage of the sensitivity of the MPXV pressure sensor, a 16-bit ADC similar to the
Texas Instruments ADS1115 (adafruit breakout board ID 1085) or the 18-bit ADC
MicroChip MCP3424 (\_Plug) is
required. Using the ADS1115 is not so simple, since the Adafruit library requires the
Wire library, which is incompatible with the Jeenode Micro.

The memory chip (U2) has not been tested at all. It was thrown in to possibly permit
OTA updates (see Moteinos @ However, as of now, I have not
spent any time attempting to get this to work. The flash chip could also be used as
a temporary data storage. It’s possible the memory chip could interfere with RFM12
or ISP programming, since it shares the same data lines. However, my development
board has had a memory chip installed (but not used), and no interference with either
function has been noticed.

Hooking it up:
The following connections have been tested:
- Assemble PCB correctly using components identified in this drawing.
- Add an Adafruit ADS1115 breakout board
- Add a 20k/30k resistor divider. Connect PRESS to the top of this divider; connect
ADS1115 A0 to the middle of this divider. For this and all resistor dividers, connect
the bottom of the divider to GND.
- Add another 20k/30k resistor divider. Top of divider connects to +BATT; middle
connects to ADS1115 A1.
- Connect +3V to ADS1115 A2. This is optional to monitor the 3V power rail.
- Add a third 20k/30k resistor divider. Top of divider connects to +5V power rail;
middle connects to ADS1115 A3.
- Connect DIO2 to 5V EN
- Connect DIO1 to ADS1115 SDA (bit-banged i2c Data)
- Connect GND to ADS1115 GND
- Connect +3V to ADS1115 VDD. NOTE: this makes the ADS1115 a 3V device - do NOT
exceed the max voltage - VDD+0.3 or 3v3 in this case - of the ADS1115, unless you
intend to release the magic smoke of the ADC. This is the reason for the 3 voltage
dividers used in this setup.
- Connect AIO1 to ADS1115 SCL (bit-banged i2c Clock)

Code considerations:
The ATTiny does not support the Arduino Wire library. A TinyWire library exists, but
it would interfere with the communications between the RFM12B. The only other
option is to use the i2c implementation provided by Jeelib. The Adafruit ADS1X15
library will not work since it relies on the Wire library. You will need to manually
translate the ADS1X15 library to be compatible with the Jeenode Micro. You could
also use the Jeelabs Analog Plug - I have not tested this but it should work much
better, and includes a native JeeNode library.

Wireless Sensor Dev Board BOM.csv (1.47 KB) Wireless Sensor Dev Board BOM.csv Bill of Materials
Wireless Sensor Dev Board.sch (28.2 KB) Wireless Sensor Dev Board.sch KiCad Schematic, includes BOM
Wireless Sensor Dev Board.pdf (168 KB) Wireless Sensor Dev Board.pdf PDF Schematic
PressureLogger.ino (10.7 KB) PressureLogger.ino Arduino sketch. Requires only Jeelib
Wireless_Sensor_Dev_Board.png (469 KB) Wireless_Sensor_Dev_Board.png
sample_pi_log.csv (32.4 KB) sample_pi_log.csv Sample log of received data
sample_pi_log.xlsx (167 KB) sample_pi_log.xlsx Human readable data from the Jeenode
Value_Charts.png (107 KB) Value_Charts.png Charts of the data with moving average trendlines
Value_Charts_L.jpg (224 KB) Value_Charts_L.jpg Charts of the data with moving average trendlines (reduced size)

Replies (5)

RE: Wireless Sensor Development Board - Added by wolfpackmars2 over 5 years ago

garethcoleman wrote:
> wolfpackmars2 wrote:
> > I’ve posted information about my project (including schematics and BOM) here:
> >
> > I spent most of yesterday translating the Adafruit ADS1X15 library to be compatible with the Jeelib i2c implementation. Hopefully it will serve as an example to anyone who wants to imlement i2c using the JM Micro.
> That’s really interesting as it is very close to what I want to do - interface the adafruit TSL2561 i2c light level sensor to a jeenode micro and see how long it can run on a pair of AA’s.
> Have you got any idea of the power consumption? Are you employing any tricks around sleeping between measurements, turning the radio off etc?
> Many thanks
> Gareth

I haven’t yet messed with any of the sleeping. I’m still trying to figure out my readings and what they mean. Once I have a method for monitoring the readings and I have it completely set up, I intend for it to only take a measurement once an hour (it will probably report the average of about 10 readings during the “reading period”). The sketch is set up so it transmits about once every 1.5s or so, once the delays are added up.

Now, with that said, what I CAN offer you is an excerpt of my PuTTY log taken from my RaspberryPI session. This will show the progression of battery voltage as the unit is running. What’s interesting is that it’s very easy to see the drain on the batteries as the unit runs, losing “1 bit” (.000125 VDC per bit) as the unit operates. It seems to drop every 3 or 4 transmissions or so. Remember, if you’re using the internal 10bit ADC, your resolution will be considerably less. Given that the ADS1115 is effectively measuring at 15 bits of resolution, someone so inclined could calculate what this would look like with 10 bits of resolution…

I converted the log to CSV format and added a header row to show what each column of data means. The log has been added to the original post.

RE: Wireless Sensor Development Board - Added by wolfpackmars2 over 5 years ago

Soo… I guess it’s not possible to update/remove files once they’ve been uploaded…

RE: Wireless Sensor Development Board - Added by BobCochran13 over 5 years ago


Yes, this will help me also because I’m trying to use a PIR sensor with my JeeNode Micro. I’ve posted a photo of it connected to a Really Bare Bones Board purchased from Modern Device. I got the PIR sensor from them, too. Either I don’t understand how PIR sensors work and need some practice and fiddling to get the sketch and the hardware tuning correct, or this particular PIR sensor is a dud. I don’t know which yet due to my inexperience — but I’ll keep trying. The LED doesn’t “turn on” when I wave my hand over the Fresnel lens. I have played a bit with the delay time adjustment pot, but it doesn’t seem to help much. I was following this sketch

I do understand I have not fine-tuned this for a JeeNode Micro.

My intention is to connect the Micro to a PIR sensor and put this outside my door just where the doorbell button goes. Someone walks up to the door, and the sensor sees the person. This causes the JeeNode Micro to send a radio packet upstairs alerting a receiver, which in turn signals a relay, which turns lights on and off in a flashing arrangement. That tells me someone is at the door.



PIR Sensor connected to a Really Bare Bones Board, turns on an LED when sensor signal is low

pir_sensor_connected_to_rbbb_small_cropped.jpg (275 KB) pir_sensor_connected_to_rbbb_small_cropped.jpg PIR Sensor connected to a Really Bare Bones Board, turns on an LED when sensor signal is low

RE: Wireless Sensor Development Board - Added by wolfpackmars2 over 5 years ago

I’ve not messed with PIR sensors, and not a lot of information to go off of from the linked post. Does the PIR sensor require a pull-down resistor? Check out - I think he has a recent post about using a PIR sensor on a MOTEINO (which is similar to an RBBB).

RE: Wireless Sensor Development Board - Added by martynj over 5 years ago

Here is a good PIR thread to unpick.
The need (or not) for a pullup on the PIR output is discussed.