Skip to content

MurataBSN

Richard Darst edited this page Feb 13, 2020 · 26 revisions

Configuration information for the Murata BSN

Info from Murata. We will use the sca11h in particular. See these links for what data the sensor should output and technical documentation. Installation guide (discusses positioning, the configuration instructions are reproduced below). In general these are all quite technical documents. You can download software from their site, too

Background

This node plugs into mains power, connects to your wifi, and uploads data. It has a magnetic backplate which can be magnetically attached to a metal frame, screwed in, or hold onto a sheet. If the device starts with the backplate off, it boots into configuration mode, otherwise it starts in operational mode.

Positioning of the sensor

The device has a picture of a person on it. It should align with the way the person is actually sleeping. The sensor operates by detecting very small movements of the bed, so this should be considered when placing it. It could be

  • Attached anywhere to the bed frame, if it is lightweight and not heavily anchored to the ground
  • Attached to the bed frame, close to the person
  • Placed under a mattress, close to the person (but not directly under them)
  • It is even sensitive enough that it can be placed on top of the bed near the person - however, this is not very practical since it may end up being moved.
  • Magnetically attached to bedsheets on the top or sides (but this usually results in not enough rigidity if on the sides)
  • In all cases, we have found that a position vertically in the range between chest and head level works best.
  • The sensor should not directly touch a person or be directly under them - the only movement should be along the same axis as the person sleeps. In general, sensor should always be 20cm away from the person (this rule also applies to the other suggestions above).

You should try different things and see what works best. It is unknown how multiple people in a bed will affect things. Someone should try different positioning to see what signals it can detect.

One way of testing is with the Android app - see below (if it works it can be nice, but sometimes hasn't worked well). You can use the app to check the signal strength - basically the magnitude of movements. It will be non-zero even when the bed is empty. You want it noticeably higher when there is someone in bed and not moving than when the bed is empty.

When you calibrate the sensor, you want to be as motionless as possible, so that the "occupied" signal strength is the minimum value possible (so that you are sure to be above this when sleeping)

Configuration

  1. Before proceeding, open this page and the koota device page (with the secret_id) in browser tabs. You won't have internet during configuration!

  2. To configure the device, first take off the magnetic backplate and plug it in. You will see a wifi network muRata_CFG_xxxxxx. Connect to this network with a password, which you can find in the Installation guide.

  3. Go to http://192.168.253.1/ in a browser (open in a new tab!)

  4. Network settings

    • Node name: The device_secret_id from the koota server - you left the tab open to copy and paste, right? This ID should be 16 or more hex characters long
    • You need to connect the sensor to your home wifi network. Find your home wifi network in the list of networks. Click and enter your password to connect (Note that it doesn't check that the password was correct at this point, so make sure you enter it correctly).
    • You won't know if the connection was successful until after you reboot. So, if you don't see data appearing, come back here and check again.
    • You know you got it wrong if, after you reboot, a single green light is flashing.
    • Apply
  5. Communication settings

    • Cloud mode
    • URL: https mode, ss1.koota.cs.aalto.fi (Note that is SS1, not SSL).
    • All of these fields don't matter and can be anything (such as "x"), except
    • Network id: "x" (this is not used but must be entered)
    • Node ID: The device_secret_id from the koota server - you left the tab open to copy and paste, right? This ID should be 16 or more hex characters long
  • User/password: "x" and "x". Do not use anything real.
  • Report/Timestamp reset multiplier: It doesn't matter too much, I leave it at 60/360, which sends data every 60 seconds and fetches the time every 60*360s=6h.
  • Apply
  1. System info -> Management:

    • WLAN country code: Set it to Europe (or your region). This is necessary to connect to some wifi networks.
    • Optional (you will receive instructions on if you should do this): Enable Automatic firmware update. Server: ss1.koota.cs.aalto.fi, username: "x", password: "x". This will allow the server to change your calibration parameters, but is not quite as secure as the sending of the data because it does not use SSL.
    • Apply
  2. Reboot to finish first phase

    • Make sure that the magnetic plate is attached, then click "System Info -> reboot to complete configuration"
    • See if the sensor can connect to the wifi network - there should be one constant green light and other flashing lights.
    • Look at the server to see if any data comes in. Data should come in every 60 seconds. You will have to check the settings above, mainly checking on wifi configuration, node name, node ID, WLAN country code. If it doesn't, do troubleshooting (see below).
  3. End of first phase

    • You are now done with most of the setup.
    • Begin placing the sensor into its final place. You want to get it placed properly for the calibration.
    • Power off the sensor. Take off the magnetic backplate, plug in the sensor, let it go into config mode, then put the backplate on again and place the sensor into the final position. You want it in its final position with backplate on, but you want to start it without the backplate so that it goes into config mode. (Summary: go back into config mode)
  4. Calibration. ("Bed sensor settings" tab)

    • The magnetic backplate must be on when you are doing the calibration.
    • Our green labels are backwards, thus the bed sensor must be in "Inverted" mode. (The wire comes out pointing to the head of the bed).
    • Empty bed calibration - click start, wait one minute.
    • Occupied bed calibration - subject enters bed, stays as motionless as possible, click start, wait one minute. Yes, it is a bit hard to stay motionless while clicking the button. Do your best or ask someone else to do it.
    • Alternatively: use these manual parameters and don't do calibration.
      • signal high: 6000
      • signal low: 300
      • min amp: 4000
      • typ amp: 1500
      • scale: 7
  • You can recalibrate at any time.
  1. Reboot to complete
  • Connect to your normal Internet again.
  • Make sure the magnetic backplate is attached. Save settings and reboot. Sensor should connect to your network (see description of the lights below, just like before).
  • Wait a bit more than one minute, then check that data is appearing in your device page. If not, go back and troubleshoot again, however nothing should have changed since a previous step.

More info:

  1. If the position of the device changes, it should be recalibrated.

  2. Another way to calibrate

    • You can use the android app described under "local mode" below to configure the sensor. It has mixed results, though.
    • Install the app on your (android phone), connect to the sensor, and begin a calibration without going through the configuration process above. This should be done when the position of the device changes.
    • Also, it is worth checking the signal strength. The android app (on the settings page) lists the current signal strength (the amount of movement it is detecting). If this number is not notably higher when the bed is occupied (compared to when it is not occupied), then the sensor should be repositioned and re-calibrated.
    • It may be worth calibrating every so often anyway...

Meaning of data

The relevant converter is MutaraBSN. MurataBSNDebug contains some extra debugging information, and MutataBSNSafe is the data with all values replaced by zeros (if you want to send to someone else for debugging purposes).

The data columns mean:

  • time the time reported by the sensor. Every six hours it gets the time from the server, and simply ticks seconds from that point.
  • hr heart rate (beats/minute)
  • rr respiration rate (breaths/minute)
  • sv heart stroke volume (dimensionless unit - no absolute scale)
  • hrv heart rate variance (ms) ("Simplified heart rate variability")
  • ss signal strength (this should be generally between the high/low calibration parameters)
  • status bed occupancy test. 0=empty (low signal), 1=occupied (ok signal), 2=occupied and awake (high signal), 3= sensor overloaded, 4=measured heartrate is close to the maximum heartrate measurable (120 bpm)
  • bbt0, bbt1, bbt2 beat to beat time. This is the time in ms between the previous two beats. There are three columns, if there are two new beats in one second, two columns have nonzero values, etc.
  • time2 This is an alternative calculation of the time, based on when the data was uploaded. It should be functionally equivalent to time, and I'd recommend you just use the time column. If you notice a large variance between these two, let us know.

Local mode and Android app

If you want, you can communicate with the device with an Android app. This app is just for demo purposes, and not a finished product, but is still quite useful for testing. This allows you to see real time data and perform calibrations. If you don't want to configure your sensor for sending data over the network, you can put it in "local mode" and still use the app. The android app can be found at the software download link at the top (from the Murata website). Once you start the app, scan for sensors, and play around with it.

Note that for the sensor to be found, your wifi network has to allow client-to-client communication and IP broadcast packets. Most consumer networks should do this, but institutional wifi networks may not (and also, it seems some phones' tethering modes doesn't work).

There is also a Windows GUI available on the Murata website, which is capable of getting raw data from the sensor, that you could analyze yourself.

We haven't tested the Windows application, and we have had mixed results with the app.

Troubleshooting

  • After turning on, does one green light flash slowly, or does the yellow light NOT flash sometimes (once per minute or as often as data is set to upload?), or does it go to the config mode even when the magnetic back is on? If these are true, then it can't connect to your wifi network. Check those settings.
  • Can't calibrate? Make sure that the magnetic backplate is attached.
  • Is data not arriving on the server? Is the node ID set properly?
  • Is remote calibration not working? Is the node name set properly? Is firmware upgrade turned on?
  • If you can't otherwise see data, contact the admins, they may be able to check if server has a problem.

Notes

Sensor lights mean:

  • Attempting to connect to network: Green flashing 1/second
  • Connected to network: Static green. Green flash 1/second=collecting data. Orange flash=sending data (1/60 seconds or whatever you configured).
  • In configuration mode: Starts with all 3 lights flashing rapidly, then single green slow flashing 1/(2 seconds).

The calibration parameters (on the device config page) mean the following. In order to do remote calibration, you must have the firmware updates turned on when first configuring the devices (note that this is a bit insecure). Then, you enter new parameters in the top box, our defaults are: 6000,300,1500,0,4000,7. The bottom box should not be edited, but is only for you to see what parameters the sensor sends to you. TODO: this needs checking.

  • 0=var_level_1 (1000-30000) [signal high in web UI]
  • 1=var_level_2 ( 100-10000) [signal low in web UI]
  • 2=stroke_vol (500-20000) [min amplitude in web UI]
  • 3=tentative_stroke_vol (0-20000) [not included in web UI]
  • 4=signal_range (100-10000) [typ amplitude in web UI]
  • 5=to_micro_g (2-15) [scale in web UI]

Firmware upgrades: Second round upgrade: xxx_All_FW.bin (BSN), then Aalto custom DCT firmware (BSN), then turn on OTA mode. New firmware is version 2.4.15.0

Clone this wiki locally