September 29, 2017

Upgrading a Bosch PLL 360 self-levelling line laser

Based on my previous upgrade of the Cocraft HL-10 cross line laser, I was set to upgrade my PLL 360 cross line laser as well.

Analysing the hardware

I first opened the laser by locating all 5 screws.
One of the screws is hidden under the sticker.
It seem to be possible to adjust the accuracy if needed by adjusting the copper coloured screws.
The line laser is self-levelling as long as the line laser is keep within ±4 degrees referenced from the  bottom plate. If the inclination is greater, the inclination switch kicks in and turn off the line lasers at the same time as a warning LED turns on. This can be avoided by pressing the Lock key.
When the spring makes contact with the surrounding PCB, the lasers are turned off.
Behind the control panel I find the main PCB.
A simple construction.
Top-middle right is a step-down converter to bring down 4x1.5V to 3.3V to feed the microprocessor. Bottom right is the microprocessor. A PIC16F676 and a convenient ICSP header close to it (J3). Bottom left is the laser driver n-channel mosfets. Top-middle left is some pull-up resistors and current limiting resistors for the indicator LEDs.
PCB overview
After some measuring I could map all pins on the PIC the functions,
// PORTA-defines
#define H_LED        0  // OUTPUT RA0, Horizontal laser indicator LED
#define V_LED        1  // OUTPUT RA1, Vertical laser indicator LED
#define BATT_STAT    2  // INPUT RA2/AN2
#define WARN_LED     5  // OUTPUT RA5, Warning indicator LED
// PORTC-defines
#define LOCK_LED     0  // OUTPUT RC0, Lock indicator LED
#define V_CTRL       1  // OUTPUT RC1, Vertical laser control pin
#define H_CTRL       2  // OUTPUT RC2, Horizontal laser control pin
#define MODE_BUTTON  3  // INPUT RC3, Mode button
#define LOCK_BUTTON  4  // INPUT RC4, Locked mode button
#define LEVEL_TRG    5  // INPUT RC5, Level switch

The BATT_STAT is never used. The pin is connected to battery output, probably to be able to sense when the battery is running out of juice. I did not find the point in implementing the voltage sensing function.

Adding a HW interface

The J3 connector can be used to connect to the PIC microprocessor.
Pro tip. Solder the cables from the bottom and up, if you'd like to keep the programming cables after closing the line laser.
Once the header has been populated with wires and a pin-header I connected it to my Pickit2.
To my surprise there is no read protection of the original software so it could be extracted and saved. That can be useful if something goes very wrong and I need to revert back to the original line laser firmware.

When the programming is done, the programming header can be tucked away along one side of the line laser. I taped it to one side just to make sure it does not fall loose and start to interfere with the self-levelling mechanism.

The original firmware function

The original firmware have a few basic features.
The Mode button selects which one of the two lasers should be lit. The horizontal laser, the vertical laser or both lasers.
The Lock button disables the internal inclination switch so that the line laser can be used at any angle.

The new features added with my new firmware

I have created two modes. Indoor mode and outdoor mode.
The indoor mode has exactly the same features as the original firmware except for one thing. The last used setting is saved in EEPROM and is recalled when turning on the line laser next time.

The outdoor mode is exactly the same as the indoor mode except that the lasers are pulsating at 2.6kHz.
By pulsating the lasers it is possible for a line laser detector to detect the lasers outdoor in bright daylight. This is a feature that is usually found in more expensive line lasers.
The outdoor/indoor mode is toggled by holding the Mode button while turning on the line laser.

The outdoor mode has been tested with the cheap Clasohlson laser detector, http://www.clasohlson.com/se/Laserdetektor-Cocraft-PRO-Edition-D50/40-9978
The detection range is measured to be at least 55 meter outdoor.

Talk is cheap. Show me the code.

The source code is written in C for the XC8 compiler here,
https://bitbucket.org/foogadgets/pll360-upgrade

The latest hex-file (pll360-outdoor-upgrade.hex) can be found and downloaded here,
https://bitbucket.org/foogadgets/foogadgets-document-and-firmware-download/downloads/

15 comments:

  1. Hello, I need tahis upgrade for my laser pll360, becouse i buy laser receiver but its not work. How to program new firmware. What do I need? PC and any interface? Thank you for your reply to my email.

    ReplyDelete
  2. I made a successful update using PICkit3.
    I was hoping the PLL 360 would work with the Bosch LR6 but not. A receiver is required that responds to pulse flashing.

    I have a problem to buy the Cocraft D50.
    Do you have any other tip on the receiver to work with this update?

    ReplyDelete
  3. https://www.aliexpress.com/item/32836873087.html
    But freq is out of range :(

    ReplyDelete
  4. Is it possible to increase the frequency?

    ReplyDelete
  5. bought this and it doesn't work.

    https://s.click.aliexpress.com/e/sXq5YSrq

    ReplyDelete
  6. Finally I bought https://www.aliexpress.com/item/32988300270.html
    Kaitian 12 Line Laser 360 Level Tripod Self-Leveling Horizontal Vertical Cross Line Level 3D Laser Detector Construction Tools

    ReplyDelete
  7. Please tell me what kind of detail is U1 with five legs?? and T1 with 3 pin. I also need. I accidentally burned the stabilizer. And I want to replace buy these items. Market as U 3DX for 5 pin and 306 for 3pin

    ReplyDelete
    Replies
    1. Удалось узнать что за деталь U1?

      Delete
  8. Does somebody know, what Aliexpress laser detector works for Bosch PLL 360, with no modification? Thank you.

    ReplyDelete
  9. Great work, thank you for your effort! Works perfectly on my PLL 360. In my device there was absolutely no space to keep the programming pins on PCB, they have to be removed. Warning: proceed only if you are familiar with embedded system development and have suitable soldering tools and skil to manage hw modifications!

    ReplyDelete
  10. hello, possible to set the freq to 10khz?

    ReplyDelete
  11. Thank you so much for this work and also for documenting it so well! From your images I found your Bosch PLL360 is the same hardware and firmware as my CST/Berger CL10. I tested your FW on my CST/Berger level and it worked just fine! But I got caught and wanted to add variable pulse frequency up to 10KHz in order to use any laser detector. I uploaded the resulting code to a public github repo: https://github.com/fmederos/Bosch-CST_laser_level_fw
    Of course it worked for me but use at your own risk!

    ReplyDelete