Trevor
0
- Joined
- Jul 17, 2009
- Messages
- 4,386
- Points
- 113
Peregrine - The Free, Open Source Universal LPM Interface
I started this project in April 2012 when Seoul_lasers was experimenting with trying to get his LaserBee logging to Mac OS X. Peregrine started life intended to be solely a utility for OS X, but has evolved into a lightweight but robust cross-platform tool for interfacing with all currently available hobbyist laser power meters.
Licensing & Legal
Because there have been no negative consequences for LaserBee owners using programs other than the bundled datalogger to view the serial output of the LPM, it is safe to say Peregrine is perfectly fine to use. Should this change, this thread will be updated.
However, because of unpleasantness that swirled around the inception of the project, it will, for the time being, remain closed-source.
UPDATE: As of April 11, 2013, Peregrine is now open-source. It is released under the GNU GPL v3. A good, plain English explanation can be found on Wikipedia. Basically, if you have modified Peregrine and want to distribute it, the source should be available and also distributed under the GNU GPL v3.
That being said, I do ask developers to link to this thread rather than distributing copies of Peregrine.
Why Peregrine?
Peregrine is a fully featured datalogger utility, designed to work with any currently available hobbyist LPM. It gives Windows users the choice between the datalogger bundled with their LPM or Peregrine - leaving them free to use whichever program better suits their needs. It gives Mac OSX users an option that does not involve buying a Windows computer just for LPM datalogging, running a VM, or emulating a Windows runtime environment - and Peregrine is a purpose-built utility, not a catch-all serial terminal. The Linux version of Peregrine brings LPM datalogging to various distributions of Linux.
It allows developers to build LPM's that are compliant with one of current protocol standards and not have to worry about developing a brand new datalogging program. All that I ask is that developers provide a link to this thread, rather than bundling Peregrine with their product.
General Information
Interface and Menus
Usage
Configuration
Notes
Getting Started
To Do
Current Change List
Support
I am currently paying for all of the costs of this project out-of-pocket. If you'd like to support the ongoing development of Peregrine monetarily, I very much appreciate the support.
Supporters
Changelog
Downloads
Conclusion
I'm happy to finally get this project out into the world. It's been a long development process, filled with with... well, learning Java for one. But it was also pretty fun, if not filled with some unpleasantness. I'm happy to have another datalogger option freely available to the community, and excited to see what people do with it.
Any bug reports can be posted here or sent to me via private message.
Cheers!
Trevor
I started this project in April 2012 when Seoul_lasers was experimenting with trying to get his LaserBee logging to Mac OS X. Peregrine started life intended to be solely a utility for OS X, but has evolved into a lightweight but robust cross-platform tool for interfacing with all currently available hobbyist laser power meters.
Licensing & Legal
Because there have been no negative consequences for LaserBee owners using programs other than the bundled datalogger to view the serial output of the LPM, it is safe to say Peregrine is perfectly fine to use. Should this change, this thread will be updated.
However, because of unpleasantness that swirled around the inception of the project, it will, for the time being, remain closed-source.
UPDATE: As of April 11, 2013, Peregrine is now open-source. It is released under the GNU GPL v3. A good, plain English explanation can be found on Wikipedia. Basically, if you have modified Peregrine and want to distribute it, the source should be available and also distributed under the GNU GPL v3.
That being said, I do ask developers to link to this thread rather than distributing copies of Peregrine.
Why Peregrine?
Peregrine is a fully featured datalogger utility, designed to work with any currently available hobbyist LPM. It gives Windows users the choice between the datalogger bundled with their LPM or Peregrine - leaving them free to use whichever program better suits their needs. It gives Mac OSX users an option that does not involve buying a Windows computer just for LPM datalogging, running a VM, or emulating a Windows runtime environment - and Peregrine is a purpose-built utility, not a catch-all serial terminal. The Linux version of Peregrine brings LPM datalogging to various distributions of Linux.
It allows developers to build LPM's that are compliant with one of current protocol standards and not have to worry about developing a brand new datalogging program. All that I ask is that developers provide a link to this thread, rather than bundling Peregrine with their product.
General Information
- Supported Operating Systems
- Windows (The 32-bit build works on both 32-bit and 64-bit systems.)
- Mac OS X
- Linux (untested)
- Supported Protocols
- Simple
- To support even the most basic LPM datalogging.
- OpenLPM
- ARGLPM and ARGraph
- Can read the datastream from any other OpenLPM compliant device.
- Kenometer
- Kenometer USB
- Kenometer Pro
- LaserBee
- Any LaserBee running Ellipsis
- Any LaserBee running stock firmware
- LaserBee I ( 1W )
- LaserBee I-X ( 2.1W )
- LaserBee II ( 3.2W )
- LaserBee USB ( 2.5W )
- Any LPM using the "DL-Module," including the 5W LaserBee
- Simple
- Features
- Basic autoranging graphing functionality
- Monitoring mode, a 60-second rolling window of laser power readings
- Timed measurements
- Export of a graph
- Export of a dataset
- Configurable data protocol
- Configurable baud rate
- Interactive graph for viewing particular values, local peaks, and local averages
- Built-in serial monitor for developers
Interface and Menus
- Serial
- Available devices are listed in the dropdown menu on the main window.
- To refresh the list of devices, press the "Refresh" button.
- To connect, press the "Connect" button.
- Baud rate can be changed in the "Meter" menu.
- File Menu
- Export / Graph Image - Render and save an image of the current dataset. This option is only available when a timed measurement is completed.
- Export / Dataset - Output the dataset from the previous completed timed measurement to a CSV file.
- Exit - Quits Peregrine
- Meter Menu
- Datastream - Use this menu to specify the input data formatting that your LPM uses.
- Baud - Use this menu to specify the bitrate of the serial connection to the LPM. Must be selected before connecting.
- Measurement Menu
- New... - Open the dialogue window to start a new timed measurement.
- Monitor - Go into monitor mode to view a rolling 60-second window of laser power.
- Stop - Stops graphing.
Usage
- To connect to your laser power meter, select the device from the dropdown on the main window, ensure the baud rate ( Meter -> Baud ) is properly set, and then press connect. If Peregrine alerts that it is receiving malformed packets, make sure the desired datastream protocol ( Meter -> Datastream ) is set.
- Peregrine defaults into monitor mode, where it just displays whatever readings are streaming off the meter.
- To begin a timed measurement, select that option from the measurement menu ( Measurement -> New ), fill in the fields ( A test named "Laser Test" with a threshold of 10mW, duration of 60 seconds, and a red line color is the default. ), then press "Start" to begin.
- Whenever there is data displayed in the graphing area, it is possible to hover the mouse over the graphing area to examine specific readings. The cursor snaps to the datapoint nearest the time value represented by the mouse position. The "Current Reading" field changes to "Selected Reading," and the reading turns the color that was configured for the line.
- It is also possible to drag the mouse over a time range to examine the local average and local peak. Similar to the operation of the cursor, the field labels and color will update with new captions and a new color. When used in monitor mode, the selection box remains stationary at the times originally specified by the user, but will autorange to accommodate the power values in the range.
- When a timed measurement is complete, a graph or dataset may be saved.
Configuration
- Configuration file is named "Peregrine.conf" and is located in the /data/ folder.
- Environment.GUI.Graph.MouseoverEffects - true / false - Enables or disables graph mouseover effects.
- Comm.Serial.Baud - Fill in one of the standard baud rates here, corresponding with the list of options in Peregrine
- Comm.Serial.Protocol - The desired datastream formatting.
- Comm.Serial.Autorefresh - true / false - Allows automatic refreshing of the serial port list.
- Environment.Threading - true / false - Implements threading for data and graph export.
- Developer.Serial.Debugger - true / false - Enables or disables Peregrine's built-in serial debugger.
- Developer.Environment.Debugger - true / false - Enables or disables debug mode.
- Depending on what release you have, there might be more options present in your configuration file. These are listed below, for completeness.
- Export.Graph.Height - NOT IMPLEMENTED
- Export.Graph.StrokeWidth - NOT IMPLEMENTED
Notes
- The version number is located in the title bar when Peregrine starts.
- The graphing area does not autorange below 0mW. This was a design decision made because readings that are useful are rarely, if ever, below zero and it gives a much cleaner looking graph output.
- The decision was made not to initially include peak and average information on the graph itself, so as to not have a cluttered view. It would not be difficult to add as a configurable option if users wish.
- The option for importing a dataset was intentionally omitted, so as to prevent data from being tampered with then re-exported as a graph image.
- The CPU usage can be very high due to system configuration and the number of cores. This is an idiosyncrasy of Java when doing a lot of rendering and is prettymuch unavoidable if we want a cross-platform datalogger.
- Mac users may experience a system crash if they disconnect the LPM while it is connected to Peregrine. This appears to be a system flaw.
Getting Started
- Download Processing from here: Download \ Processing.org
- To compile and run Peregrine, I recommend version 2.0b7.
- Once you've downloaded and run Processing, move the Peregrine sketch folder (it contains all of the source files, in addition to the folders that contain the compiled programs) into your Processing sketch folder, probably in your Documents folder.
- You can open the sketch from there!
- - OR -
- Just open the appropriate compiled program directory and directly run the program!
To Do
- Vector graphics export
- Customizable coloring of the controls in Peregrine, via Peregrine.conf
- Enlarge form elements (perhaps via a "large controls" setting in Peregrine.conf?)
- An indicator to show whether the laser power is trending up or trending down
- Allow configuration of the graph line width.
Current Change List
- n/a
Key: Standard Priority | Elevated Priority | High Priority
Support
I am currently paying for all of the costs of this project out-of-pocket. If you'd like to support the ongoing development of Peregrine monetarily, I very much appreciate the support.
Supporters
- Me!
- ARGLaser
- DJNY
- Seoul_lasers
- Pman
- benmwv
- mhemling33
- herunotsurugi
Changelog
- 1.0.4.2
- Initial release.
- 1.0.4.7 Mac OS X only
- Fixed a bug that prevented Mac users from properly connecting.
- 1.0.4.9 Mac OS X only
- Removed Bluetooth options from the device dropdown.
- Updated the size limitations of the device dropdown to prevent devices lower on the list from being hidden.
- 1.1.2.6
- Updated the functionality of connecting and disconnecting so that the graph will not clear unexpectedly.
- Updated graphing functionality to render gaps in received data.
- Added additional alerts to pass users more information.
- Added automatic serial refreshing.
- Added threading so that computationally intensive processes will not be done on the main thread.
- Note: I forgot to update the version number; it still says 1.0.4.9.
- 1.2.1.3
- Added an option in the configuration file to remove threading for computationally intensive tasks.
- Added debug mode back into the code. Allows viewing off all of Peregrine's internal variables.
- Cleaned up a few areas of code for public consumption.
- 1.3.0.2
- Added support for additional OpenLPM protocol functionality.
- Enabled starting / restarting measurement via "s" packet.
- Enabled starting / restarting measurement with parameters via "sp" packet header.
- Added support for additional OpenLPM protocol functionality.
- 1.5.0.4
- Added support for the Radiant Electronics datastream formatting.
- Added automatic detection of datastream formatting, so that it is no longer necessary to specify a protocol.
- Updated the baud rate selection process so that it can be changed while a device is connected; Peregrine automatically disconnects and reconnects to the device so it is not necessary to manually cycle the connection.
Downloads
- The download below contains all source files and compiled binaries for Windows, Mac OSX, and Linux 32- and 64-bit.
Conclusion
I'm happy to finally get this project out into the world. It's been a long development process, filled with with... well, learning Java for one. But it was also pretty fun, if not filled with some unpleasantness. I'm happy to have another datalogger option freely available to the community, and excited to see what people do with it.
Any bug reports can be posted here or sent to me via private message.
Cheers!
Trevor
Last edited: