background image

8 Commands and responses

The SQM-LU-DL accepts a sequence of characters as a command, then executes those commands and usually provides a
response of a sequence of characters. The following details are useful when programming your own interface to send data
to and receive data from the SQM-LU-DL.

8.1 Commands

Commands consist of a string of characters. The first character is the command type. The following is a list of the
“Standard” commands:

Table 8.1: Summary of standard commands

Command

Description

rx

Reading request.

cx

Calibration information request.

ix

Unit information request (note lower case “i”).

zcalAx

Arm Light Calibration command.

zcalBx

Arm Dark Calibration command.

zcalDx

Disarm Calibration command.

zcal5

Manually Set Light Calibration Offset.

zcal6

Manually Set Light Calibration Temperature.

zcal7

Manually Set Dark Calibration Time Period.

zcal8

Manually Set Dark Calibration Temperature.

0x19

Reset micro-controller. Hexadecimal value 19. See the “Firmware Upgrade” chapter
on page 93 for more details.

:

Intel Hex firmware upgrade initiation. See the “Firmware Upgrade” chapter on
page 93 for more details.

P...x

Set period (in seconds) for interval reporting to EEPROM and RAM for booting
and immediate use. Firmware feature=13.

p...x

Set period (in seconds) for interval reporting to RAM for immediate use. Firmware
feature=13.

T...x

Set threshold (in

mag

arcsec

2

) for interval reporting only to EEPROM and RAM for

booting and immediate use. Firmware feature

13.

t...x

Set threshold (in

mag

arcsec

2

) for interval reporting only to RAM for immediate use.

Firmware feature

13.

Ix

Request interval settings (note upper case “I”). Firmware feature

13.

sx

Request reading of internal variables.

S...x

Simulate internal calculations.

63

Summary of Contents for SQM-LU-DL

Page 1: ...M LU DL Operator s Manual Copyright 2005 2022 Version 20220119 Company information Mailing address Unihedron 4 Lawrence Avenue Grimsby Ontario L3M 2L9 Canada Telephone 905 945 1197 Website unihedron c...

Page 2: ......

Page 3: ...12 2 1 3 Other luminance scales 13 3 Theory of operation 15 3 1 Light measurement 15 3 2 Communication to the PC 16 4 Specifications 17 5 Hardware connections 20 5 1 Battery operation 20 5 2 Diagnosti...

Page 4: ...2 3 Linear reading request 66 8 2 4 Inline linear reading request 67 8 2 5 Unit information 68 8 3 Calibration commands 68 8 3 1 Calibration information request 68 8 3 2 Light calibration command 69...

Page 5: ...ponse 87 8 8 Simulation commands 88 9 Installation 90 9 1 Mechanical installation 90 9 1 1 Cover selection 90 9 1 2 Cover calibration 90 9 1 3 Cover maintenance 91 10 Default settings 92 11 Firmware u...

Page 6: ...screen 44 7 27 Log Continuously Trigger tab 45 7 28 Log Continuously Threshold 45 7 29 Log Continuously Pre audio alert 46 7 30 Log Continuously Alarm for darkness 46 7 31 Log Continuously Transfer ta...

Page 7: ...nually setting dark calibration time period 72 8 15 Response for manually setting of dark calibration temperature 72 8 16 LED accessory command summary 72 8 17 LED accessory response summary 73 8 18 R...

Page 8: ...95 13 3 Cannot Find UDM software 95 13 4 Driver not found 95 13 5 USB device not found or more than one device on the same COM port 95 13 6 USB serial number garbled 96 13 7 LED does not light up 96 1...

Page 9: ...Researching twilight brightness changes with the addition of external Neutral Density filters Unihedron offers adapters to attach such filters onto the meter The SQM LU DL has the same features as the...

Page 10: ...e data log into MS Excel 1 Find the log data It will be in a dat file where the will give you the date and time 2 In the Tools pulldown in the UDM program use the dat to Moon csv function to convert t...

Page 11: ...cts have a higher magnitude value For example a star that is 6th magnitude is brighter than a star that is 11th magnitude The star Vega is used a the reference point of 0 magnitude Table 2 1 shows the...

Page 12: ...ings that may block the sensor A reading of greater than 22 0 is unlikely to be recorded however there are reasons for extra dark readings Cloud or ash covered sky in a remote area where little natura...

Page 13: ...an occur in very isolated areas like mountain tops the ocean or the desert You will have to be aware of this special situation when analyzing readings Volcanic eruptions Dust released into the atmosph...

Page 14: ...conversion or the chart shown in Figure 2 2 and Equations 2 2 and 2 3 Figure 2 2 Mpsas vs NELM Convert NELM V mags to MPSAS B sky brightness 3 Bmpsas 21 58 5 log 10 1 586 NELM 5 1 2 2 Convert MPSAS B...

Page 15: ...to report a frequency measured in Hz Period mode The period mode is for dark readings where the frequency is low The sensor signal gates a high speed internal counter which reports the period measure...

Page 16: ...ayed to the micro controller The micro controller responds to commands by sending data strings to the USB interface which are then relayed to the PC Readings are gathered asynchronously by the micro c...

Page 17: ...17...

Page 18: ...respectively Power requirement 18mA from the 5V USB connection Can be put to sleep and woken up for battery operated data logging 3 42V minimum under battery operation The included battery adapter can...

Page 19: ...Figure 4 1 Front and back of of unit Unihedron SQM LU DL Operator s Manual 20220119 19...

Page 20: ...w the SQM LU DL to perform data logging while disconnected from the computer This battery connection replaces the USB connection from the computer as shown in Figure 5 2 Figure 5 2 Battery connection...

Page 21: ...mpling every 5 minutes TBatt AHRating IAverage 5 9 AHRating IQ tQ tW IW tM IM 5 10 3AH 209uA 0 93 3s 60s 10mA 5s 5 60s 55mA 5 11 1861 hrs or 78 days or 2 5 months 5 12 Note that measuring is still per...

Page 22: ...ire C Shutdown One quick flash for normal battery voltage above 4 9V more quick flashes if the battery voltage is too low 2 4 8V 3 4 6V 4 4 4V 5 4 2V 6 4 0V Battery voltage detection is performed at t...

Page 23: ...equired 1 A serial 115200 baud connection must be made to the serial port assigned to the SQM LU DL 2 Data commands are sent to the SQM LU DL and it responds with a string of characters 3 Close the se...

Page 24: ...a result like this r 09 42m 0000005915Hz 0000000000c 0000000 000s 027 0C 6 2 Pascal The UDM program contains many examples of finding the SQM devices and reading data from them It is open source and w...

Page 25: ...am which should run sufficiently on any present day computer under the Windows Mac or Linux operating systems The Windows version of UDM can also be run in a virtualization mode using VMware Fusion Ac...

Page 26: ...rst This step is fairly quick a few seconds 2 UDM then searches for attached Ethernet devices within the reach of the Ethernet network but not outside a firewall This step may take about 30 seconds If...

Page 27: ...ts of the items File View Tools Help as defined below 7 3 4 File menu The file menu is used for opening files finding newly attached devices and quitting the program as shown in Figure 7 2 Figure 7 2...

Page 28: ...can also be used instead of the mouse File Quit The File Quit menu item is used to close the UDM program The program can also be closed from the window panel X 7 3 5 View menu The view menu allows you...

Page 29: ...tinuously features Also log files from data logging meters will be stored here from the Retrieve All function The Logs Directory Path path can be changed from its default by pressing the folder button...

Page 30: ...e Configfile path is the place where UDM stores its configuration about the program and attached SQM devices This path is not changeable View DL Header shows the Data logger header editing page See th...

Page 31: ...oordinates 3 The Elevation entry is optional as it is not used for anything yet 4 Press the Apply button when you are satisfied with the desired values Note The Apply button will only be enabled if th...

Page 32: ...e plot can be saved in vector graphics SVG or bitmap PNG modes using the Save buttons in the Settings tab View Plotter Time offset To assist in correcting timing problems when the datalogger real time...

Page 33: ...th Edit the file with a text editor and place settings under the Plotter section for example MPSASColor clRed The following names can be used to define plot line colors MPSASColor MPSAS2Color MPSAS3Co...

Page 34: ...orithm library from Andreas Ho rstemeier 6 This tool prepares the file for importation into a spreadsheet like Excel OpenOffice or LibreOffice For importing into a spreadsheet The value for Moon phase...

Page 35: ...ieve The DL retrieve tool is used for datalogging and Vector model to pull in data files that were stored on disk previously Tools dat to kml Creates a kml file from a dat file This is used when the S...

Page 36: ...cords Listing 7 1 dat minimum field example UTC Date Time MSAS Latitude Longitude 2018 02 07T04 27 57 642 19 0 33 2208 116 3387 2018 02 07T04 28 17 089 18 3 33 2208 116 3422 2018 02 07T04 28 37 105 18...

Page 37: ...reconstruct Select the proper region and time zone Press the Reconstruct dat local times button The reconstructed file will be written to disk at the location specified in the bottom Filename section...

Page 38: ...on and 180 degrees New Moon waxing Moon from 180 to 0 degrees waning Moon from 0 to 180 degrees values flip from 180 to 180 at Full Moon MoonElev Elevation angle in degrees of the moon above or below...

Page 39: ...21 5614 48fc a5d4 292b92640d50 filesusr com ugd 445aec_7522a23976bc472f8dbdcfb907d5d5b7 pdf by Bill Kowalik and Michael McKeag Oregon Chapter of International Dark Sky Association ResidStdErr is a mea...

Page 40: ...ovides more than 300 samples per day will fail The Range parameter is the number of samples usually 5 minutes apart to include before and after the current point at which the Residual Standard Error o...

Page 41: ...t Range number of points in a day and the final Range number of points in a day are assigned dummy RSE values of 999000 0 5 During daylight hours when the entire Range of values has SQM readings of 0...

Page 42: ...that UDM can find from this computer If only one device is found then UDM auto selects it and gathers the version information for that selected device Figure 7 20 Found device single If more than one...

Page 43: ...the found box The default port number for the SQM LE is 10001 See Figure 7 23 Figure 7 23 Ethernet connection details The RS232 fields are editable so you may enter your own port and baud rate The ba...

Page 44: ...om the connected SQM and stores that information to a data log file on the disk in the Logs directory path The location of the file can be identified and changed by View Directories The log file can b...

Page 45: ...he Record button The records are stored in a logfile whose location is shown in the Logfile name area A new logfile is automatically created at the beginning of each day at local time 0 00 9 Press the...

Page 46: ...0 The Test button plays this file for test purposes The audio file is named alarmsound wav and is located in the the Data Directory which can be identified from the main page View Directories Figure 7...

Page 47: ...ted text is synchronized with scheduled triggered recordings Without Synchronized checked the hotkey will immediately trigger a record log and the associated annotation text will be appended to that t...

Page 48: ...at no other programs are accessing the GPS 7 In UDM Log continuous GPS Port type in that filename An example would be dev cu usbserial 8 Enter the baud rate for the GPS into the Baud field in my case...

Page 49: ...f the GoTo script file is a semicolon separated file with an extension of goto Comment lines are preceded by the pound symbol The second line defines the field format Zenith Azimuth The remaining line...

Page 50: ...ow Figure 7 35 Calibration tab populated Use the following steps to change the calibration values 1 Enter the new calibration data on the left side entry box Desired values column 2 Press the associat...

Page 51: ...e will be used instantly and also after power up Report interval is measured in seconds i e 300 5 minutes Report threshold is measured in Magnitudes per square arcsecond mpsas a larger positive value...

Page 52: ...s shown in Figure 7 38 Figure 7 38 Firmware selection 2 Select the desired firmware file then press Open 3 The Load firmware button will be enabled and you can press it now to start loading the firmwa...

Page 53: ...ructions on the right side of the screen The calibration report can be logged to a data file and also printed out from this screen Figure 7 39 Configuration tab Warning confirmations as shown in Figur...

Page 54: ...shold value will be ignored The SQM LU DL still has to turn on to determine the brightness value Battery Life estimator Use the Battery life estimator to determine the approximate battery life with th...

Page 55: ...ividual records Figure 7 45 Storage navigation Table 7 3 Storage navigation button descriptions Button Description Move the current record pointer to the first record stored in the SQM LU DL and displ...

Page 56: ...g so continued presses of this button may result in the display of new records Retrieve Press the Retrieve button to call up the Retrieve dialog shown in Figure 7 46 Figure 7 46 DL Retrieve dialog win...

Page 57: ...te the last record An ending range beyond the max will pull in data records that have not yet been written to odd values will be displayed When the retrieval is complete the file location will be show...

Page 58: ...he Data Logging tab then the Retrieve All button Select the Plot tab Click the Show data button and select the previously retrieved log file The contour plot will appear after all the points have been...

Page 59: ...The minimum requirements for the dat file to be read by the contour plotting function are One comment line describing the field of UTC Date Time Altitude Azimuth One line defining the ending of the h...

Page 60: ...rectory to the SQM LU DL in simulation mode and puts the output into simout csv The format of the csv is shown in Table 7 4 Table 7 4 simin csv field description Position Example value Description 1 3...

Page 61: ...y used for troubleshooting to identify either when readings are created or requested The LED draws current and it may not be desireable to enable it when operating from the battery pack The LED blinks...

Page 62: ...If x 0 then all readings are get recorded LCGRS Run GoTo script then shut down when done Table 7 6 Select device command line parameters Parameter Description SEI x Select Ethernet device where x IP...

Page 63: ...t zcal6 Manually Set Light Calibration Temperature zcal7 Manually Set Dark Calibration Time Period zcal8 Manually Set Dark Calibration Temperature 0x19 Reset micro controller Hexadecimal value 19 See...

Page 64: ...n one record L5x Get battery voltage L6x Get status register1 L7x Report on bytes per FLASH bytes per record LM x Set Logging trigger mode next digit defines mode Lmx Get Logging trigger mode LIx Logg...

Page 65: ...the unit 10 21 0000022921Hz Frequency of sensor in Hz 23 33 0000000020c Period of sensor in counts Counts occur at a rate of 460 8 kHz 14 7456MHz 32 35 46 0000000 000s Period of sensor in seconds wit...

Page 66: ...55 56 Carriage return 0x0d Line feed 0x0a An example of the response is u 06 70m 0000022921Hz 0000000020c 0000000 000s 039 4C 0123456789 123456789 123456789 123456789 123456789 123456 Future versions...

Page 67: ...requency fout flight fdark To allow for long period measurements the output integer value is scaled up by a factor of 45 000 nout fout 45000 The format of the response is similar to the rx response an...

Page 68: ...xample value Description 0 i Indicates that the unit information response is being returned 2 9 00000002 Protocol number 8 digits This will always be the first 8 char acters after the i response This...

Page 69: ...ading space for positive value Leading negative sign for negative value 56 57 Carriage return 0x0d Line feed 0x0a An example of the response is c 00000017 60m 0000000 000s 039 4C 00000008 71m 039 4C 0...

Page 70: ...ately after Arm command Enable firmware upgrade 4 5 Carriage return 0x0d Line feed 0x0a An example of the response is zBaL 012345 8 3 4 Disarm calibration command The Disarm calibration command zcalDx...

Page 71: ...specified in The units are C Note The meter records the temperature in a raw value with different resolution so the reply back may not be exactly the same as the value sent The format of the response...

Page 72: ...eter records the temperature in a raw value with different resolution so the reply back may not be exactly the same as the value sent The format of the response is shown in table 8 15 Table 8 15 Respo...

Page 73: ...LED accessory status Table 8 17 LED accessory response summary Position Example value Description 0 2 A5 Confirmation Snow LED accessory command 3 n Where n 0 indicates the Snow LED is Off 1 indicate...

Page 74: ...s L0 000 000 0123456789 1 8 5 2 Logging pointer report To get a report on current logging pointer position use the L1x command This pointer is the record address of where the next record will be store...

Page 75: ...the L2x command There is no response 8 5 5 Log one record To force the unit to record one complete record into the FLASH memory use the L3x command The record will not be logged if the threshold is s...

Page 76: ...1 Subsequent logged reading triggered by time interval Available on firmware feature 49 and above 2char 1 Available on models with snow LED 0 No snow data recorded 1 Snow data recorded Available on f...

Page 77: ...ed This action is a software flow control method The subsequent record requests are made with the x command Each record contains binary values not ASCII Each record is defined below Table 8 25 Binary...

Page 78: ...onal snow accessory Snow reading Big endian raw 32 bit binary value for magnitudes The decimal reading value is determined as ReadingMP SAS xxxx 6553600 0 24 27 xxxx Optional snow accessory Snow frequ...

Page 79: ...takes a long time it is necessary to read the status register busy bit bit 0 using the L6x command The response is shown in table 8 27 Table 8 27 Response of requesting EEPROM Status regoster 1 Column...

Page 80: ...Every 10 minutes on the 1 6th hour 5 Every 15 minutes on the 1 4 hour 6 Every 30 minutes on the 1 2 hour 7 Every hour on the hour 4 5 Carriage return 0x0d Line feed 0x0a An example response is LM 0 0...

Page 81: ...ng the command LT x sets the threshold of the timed interval reports to EEPROM and RAM for boot and immediate use The units are magnitudes arcsecond2 For example LT00000016 00x limits reporting to val...

Page 82: ...n example response is Lv 0 012345 8 5 15 Put datalogging unit to sleep For test purposes the SQM LU DL can be put to sleep with the Lsx command so that the quiescent battery current can be measured Th...

Page 83: ...ires connected to the USB jack This mutual access settings allows logging while also connected to a PC when data wires are connected to the USB jack The Mutual access mode is set with the LDnx command...

Page 84: ...om the un averaged accumulator Normally the averaged reading is sent Table 8 37 Continuous reporting command summary Command Description Yx Get status of the continuous reporting features YRx Enable c...

Page 85: ...eporting commands Table 8 38 continued from previous page Column Example value Description 5 6 Carriage return 0x0d Line feed 0x0a An example response is YrCpu 01234 Unihedron SQM LU DL Operator s Man...

Page 86: ...ht sensor in degrees C Leading space for positive value Leading negative sign for negative value 55 63 00000413 Serial number 8 digits Each unit has its own unique serial num ber 64 65 Carriage return...

Page 87: ...ription 0 I Interval settings from EEPROM and RAM are being returned 2 12 0000000360s Interval period that was set into EEPROM 14 24 0000300360s Interval period that was set into RAM 26 37 00000017 60...

Page 88: ...quency in Hz 25 Separation character 26 37 0000000244t Temperature ADC value as seen by the CPU See Equation 8 1 38 39 Carriage return 0x0d Line feed 0x0a An example response is s 0000000360c 00000003...

Page 89: ...ted frequency in Hz 26 37 0000000245t Simulated temperature ADC value See Equation 8 1 38 39 r Beginning of calculated readings 40 47 18 04m Calculated mag arcsec2 48 60 0000000000Hz Frequency used fo...

Page 90: ...ain consideration would be to keep the domes clean every so often and to make sure that the mounting plane is painted black to that it doesn t reflect light back to the inside of the dome and then bac...

Page 91: ...9 1 Mechanical installation Figure 9 2 Example cover calibration 9 1 3 Cover maintenance Keep the covering clean of dust water ice and bird droppings Unihedron SQM LU DL Operator s Manual 20220119 91...

Page 92: ...n FTDI USB interface module The FTDI interface has not been altered from its default There should be no reason to alter the FTDI chip settings The baud rate is defined by the VCP driver side when a te...

Page 93: ...ontains a thorough description of the Intel Hex format http en wikipedia org wiki hex The basic requirements for firmware uploading are 1 Reset micro controller by sending the hex character 0x19 2 Wit...

Page 94: ...adjust the light reading to 13 5 fc at the place of the SQM LU DL The light calibration routine inside the SQM LU DL expects to see this value The light that the SQM LU DL and light meter see must be...

Page 95: ...and also produce strange readings Table 13 3 Cannot Find UDM software Problem Microsoft Edge cannot find UDM software on the CD Error Can t reach this page Cause Microsoft Edge has protections in pla...

Page 96: ...ke this FTESKYBA a garbled serial number looks something like this 5 dc4a97 Cause Non FTDI device driver installed on Windows Solution Visit the FTDI website to download and install the latest FTDI VC...

Page 97: ...that can be done to correct this aside from replacement However the following test usually reliably proves the issue While connected to the computer using UDM run the unit in Log continuous mode at 1...

Page 98: ...hould have been cleared out Solution The following steps can be used to clean up the FTDI entries in Windows 1 Install this FTDI CDM Uninstaller utility at www ftdichip com Support Utilities CDMUninst...

Page 99: ...unit The above will identify which COM port the SQM LU DL has been assigned If the SQM LU DL is plugged in the active COM port will show up in this list HK LOCAL MACHINE HARDWARE DEVICEMAP SERIALCOMM...

Page 100: ...per square arcsecond The unit of measurement reported by the SQM NMEA National Marine Electronics Association data format that the GPS receiver produces RAM Random Access Memory Temporary memory that...

Page 101: ...aefer Telescopic limiting Magnitudes Web page discussion of brightness in Schaefer 1990 and Clark 1994 http w1 411 telia com u41105032 visual Schaefer htm accessed7 2003 5 NELM Converter K Fisher fish...

Reviews: