1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Differential IR height sensor, Attemptin' Clone....ain't sure of success...now stage 10

Discussion in 'Mods and Upgrades' started by jim3Dbot, Aug 25, 2015.

  1. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Your thinking as I, The robo looks like it was on Slimfast without those two limit cables snaking their way southward......Would be cool to eliminate the X limit & swap with the IR, probably not cost effective.....nevertheless, still cool......Hmmmm maybe a small bicycle reflector mounted on the X......and an IR or photoelectric eye xmitter/receiver mounted on the floor....no visible wires...no moving parts.........gets closer to that wireless carriage thingamigig........thanks Mike...............jimmy
     
  2. jbigler1986

    jbigler1986 Active Member

    Joined:
    Feb 13, 2015
    Messages:
    534
    Likes Received:
    128
    Jim I twisted the far right led and readings are still inconsistent. Sometimes it doesn't even trigger at all now. Guess I screwed it up.
     
  3. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Justin, It's tough to get it right...........just requires a nano-touch...........I'll post something this morning......pics or short video........If you look at the sensor.......try to envision both LEDs parallel to each other at the 45 angle. Then, if you blink or triggering far from the bed....grab that far LED, right side....and twist slightly.....If you go too far cw or ccw, you will experience blinkin'..........I should have 4 or 5 complete with correct firmware & calibrated properly today........I'm hoping to ship some today.......shoot for around 5mm trip from bed....if you can get that.........hope you still have your z limits installed in case the led snaps.........thanks JB
     
  4. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    @jim3Dbot I have been following this thread with interest and now reading the few registration issues, I have an idea. If it is out of line then tell me it couldn't work. What if there was a 3D printed holder that the LED and IR Receiver were held in then attached to your board (or a stage 10 board if a slight modification is required) the registration distance and angles would be less hit or miss and your success rate would go up.

    Is something like that possible?
     
  5. KAS3D

    KAS3D New Member

    Joined:
    Nov 13, 2015
    Messages:
    4
    Likes Received:
    0

    Just wanted to jump on real quick to give updates. I knew going in that I had to make changes on the smoothie or the sensor board ( I bridged the sensor) and that all work perfectly as long as I never reverse the connection by accident :)

    I adjusted the outer most emitter and that seemed to do the trick. When the sensor detects a surface, it stops and the LED stays on. I'm not getting that flicker anymore. I've ordered a Duet controller for a new printer I'm building, that's the planed home for this IR sensor. I'll un-bridge the connection and install, hopefully soon.

    Just wanted to say thank you again.


    KAS.
     
  6. jbigler1986

    jbigler1986 Active Member

    Joined:
    Feb 13, 2015
    Messages:
    534
    Likes Received:
    128
    Thanks Jim. I will try to turn it back a little bit. Think I twisted it to far. If that fails I can just leave the printer idle until you ship the new ones. Not a huge deal. Thanks for your time and effort so far. Don't mind being a beta tester
     
  7. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Waldo, you have been a great help, keep up the contributions............You are right on with the 3d printed light guides.....LED emitters may be replaced with SMT type with light guides, maybe fiber & large cap may be reduced in physical size.............That is a direction I want to head...see page 7 remark #128..........Initial calibration is tough....but once achieved....you are done......variances will only be the reflective properties of the bed; aluminum, what's under the glass, tape, etc....Personally, I wanted the feedback I am gettin'.........IR's need to be calibrated during board assy & not on printers machines...........Hey, as always...pleasure to hear from you.................
     
  8. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Man, I'm glad that smoothie is runnin' smooth.............you are correct in your understanding that the bridged, "shorted out" resistor R4?.......will no longer protect the atmel micro from a reversal/miswire of the connector..........that resistor real function is to act like a voltage divider if the IR brd is operating in analog mode....with your smoothie...it's not a concern....... warranty on that if you break it, just let me know...........
     
  9. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    JB, Thanks for your betameister contribution.... Still working on the cali & firm thing.....I have realized a pair of diagonal cutters, carefully handled, does a better job than long-nosed gripping that IR....can't wait to NFO to gets his...then the shit starts.......hope he don't read this...this is on the QT...........Take Care.........
     
  10. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Oh BTW WW, The short amount of time I expended....thinkin' about this.....back whenever #128 was posted....I believe you may need to implement three lenses, to focus the IR.....maybe fiber installed in the printed guides....interesting...I know quality fiber will pass 'near IR' in the 950nm range....I have removed the IR internal filter from a security camera and easily see the purple IR emitted by the LEDs.....thinking a new thread should be created after stage 10 completion...Take Care..........jimmy
     
  11. jbigler1986

    jbigler1986 Active Member

    Joined:
    Feb 13, 2015
    Messages:
    534
    Likes Received:
    128
    Ok so after twisting the LED back some more. I get better results. I may twist it a tiny bit more to see if I can get them even closer. Here are my 4 numbers from 4 autolevels. (9th probe point isn't there as it's to fast on the lcd to read).

    1.) 5.0, 5.0, 4.9, 4.9, 5.2, 4.8, 4.9, 5.1
    2.) 5.0, 5.0, 4.9, 4.8, 5.0, 4.8, 4.8, 4.8
    3.) 4.9, 5.0, 4.7, 4.7, 5.0, 4.8, 4.8, 4.9
    4.) 5.0, 5.0, 4.7, 4.7, 4.9, 4.7, 4.6, 4.9
     
  12. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Doing some more experimentation I think I understand what is causing the inconsitency between homing distance and G29 distance.

    The white on the R logo is acting as an IR mirror causing the sensor to get bad readings.

    When it's over the black area it homes fine/doesn't mishome, but when it's over the white it stops homing significantly higher.

    I can see now why disabling safe homing would remove this problem.
     
    jim3Dbot likes this.
  13. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Mike,
    Thanks for the post..........I have been watching the trickling IR feedback in the shoutbox, with interest. I have been working exclusively with the firmware.......which sucks...........want to get back into the hardware end of the project. I noticed a few days ago & I paraphrase, "Is it me or what, the IR seems to take a minute to boot up?" Actually takes 30 seconds, consistently.....When that is fixed, I want to experiment less power from the IR emitters, two resistor change. Anyone that is not USB tethered to there computer will see boot-up each time the rear rocker is switched, you SD operators........

    Oh....Thanks Puff for your suggestions on possible alternative firmware methods....AVR Studio 6.2.....I dunno...avrDude next...

    I have a video, I should post that validates exactly what you remarked,................Here's the scenario, Homing, than autolevel.

    Nozzle in center of bed.
    Send 3 axis Home.
    Begin AL, nine points.
    Ist point......good
    2nd point.....triggers much higher...BUT led no blink
    3rd point.....triggers high again.........no blink again
    4th thru 9th point......same as 1st point....triggers good & low with LED lit

    Repeated this a dozen times....all consistent. With numerous troubleshooting attempts....I finally realized problem....
    The IR on this machine strikes the white on the front, center..."Hot Zone" & the "Convection hot bed symbol". As you noticed this white reflects the IR much more than the black.....Best fix would be to make the bed all black, one way or another...that's not going to happen or adjust firmware to avoid those white spots, easy..... OR...........

    Sidebar: You mentioned to me last week to shorten your AL time by lowering the 15mm 1st probe & the 5mm, two thru nine probes Z lift....well never got to it........BUT......I figured the 2nd & 3rd probe high stops with no LED on may be related to the increased trigger height of the IR, due to the white markings, SO...........I reduced the 15mm & those 5mm all to 3mm z lift......Guess What......works..... damn..........re-flashed didn't work......re-re-flashed worked......so what is happening with the LED not lit........The minis circuit sends a quick glitch trigger, the ramp sees it, the LED, not enough on-time to be noticed......just another variation of the infamous flicker.................Thanks again for the input Mike..........Take Care
     
    Puff likes this.
  14. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    Jim

    Finally got my IR plugged in and first attempt at configuring. Now I don't have your clone so my results might very. I was able to go through and put the nozzle on the bed and measure how far up the trigger point is on the IR. I put a piece of paper on the bed and moved the nozzle down until the tip gripped the paper. That part wasn't easy since the controls wouldn't let me move Z past the trigger point. I ended up removing the IR from its mount so and leaving it plugged in so it wouldn't trigger as I moved the Z. Must be a better way since I seem to be the only one in that boat. With that done, I set the Z to zero as it gripped the paper. Then moved the Z up little at a time until the IR no longer was triggered (after mounting it again of course). Moved it down again until it triggered. Looks like that is at about 1.74 mm. Now the base of my IR board sits about 1.4 mm up from the tip of the nozzle. Considering the paper is about .1 mm. Adding that all up would mean I am about 3.24 mm from base of IR to the build plate when it triggers. Back to that later.

    I changed Z_MIN_ENDSTOP_INVERTING from true to false so Z would lower when IR was not triggered vs the stock endstops as directed. My IR is mounted off the right side of the carriage at about 25 mm from the center of the nozzle. So I changed X_PROBE_OFFSET_FROM_EXTRUDER to 25 from 0. I left Y alone since it is pretty close to the same as the middle of the IR board. Now has anyone changed Z_PROBE_OFFSET_FROM_EXTRUDER? Figuring the IR board base is 1.4 mm higher than the extruder, I am thinking it should be valued at -1.4 instead of 0. Leaving at 0 for now. Thoughts?

    I left the BACK_PROBE_BED_POSITION and the FRONT_PROBE_BED_POSITION alone unlike what Jim stated in post #125 because my IR is on the left side and not the front of the nozzle. I did change LEFT_PROBE_BED_POSITION from 15 to 40 since my probe is 25 mm from the nozzle now. Otherwise I would hit the X endstop. I'm thinking of changing that to 30 to get the reading closer to where the old position was and it shouldn't hit the X endstop still. I'm also thinking of changing RIGHT_PROBE_BED_POSITION from 205 to 220 or so. Maybe it's better for it to read at the original spot as stock. Not sure how the program calculates the algorithm for auto level when the probe is away from the nozzle.

    I also left the Z_SAFE_HOMING alone. Jim, you commented out where it is defined and the #ifdef and #endif lines. I read that part of code as if you define Z_SAFE_HOMING then #define Z_SAFE_HOMING_X_POINT and #define Z_SAFE_HOMING_Y_POINT else don't. I think the lines you commented out does the same as leaving them in, but I am pretty new to this type of code. Again, please set me straight for those that have successfully got this going if I am wrong here and why.

    Now the only thing left to do is to define my Z offset. Based on my findings in the first paragraph, should that be -1.74? No remember I am thinking about setting Z_PROBE_OFFSET_FROM_EXTRUDER. I ran through the start gcode manually to see what G29 came back with. Not sure what a safe start for Z offset would be. Don't want to gouge the plate or print spaghetti.

    > G21
    > G90
    > M82
    > M107
    > G28
    > M119
    < Reporting endstop status
    < x_min: open
    < y_min: open
    < z_min: TRIGGERED
    > M114
    < X:95.00 Y:127.00 Z:0.00 E:0.00 Count X: 95.00 Y:127.00 Z:0.00
    > M565 Z-1.74
    > G29
    < Bed x: 40.00 y: 20.00 z: -0.61
    < Bed x: 122.00 y: 20.00 z: 0.07
    < Bed x: 204.00 y: 20.00 z: 0.44
    < Bed x: 205.00 y: 125.00 z: 0.54
    < Bed x: 123.00 y: 125.00 z: -0.32
    < Bed x: 41.00 y: 125.00 z: -0.48
    < Bed x: 40.00 y: 230.00 z: -0.27
    < Bed x: 122.00 y: 230.00 z: 0.35
    < Bed x: 204.00 y: 230.00 z: 0.68
    < Eqn coefficients: a: 0.01 b: 0.00 d: -0.88
    < planeNormal x: -0.01 y: -0.00 z: 1.00
    < echo:endstops hit: Z:0.68
     
  15. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Ho...Danz,

    Glad to see you have time to work with the IR..........Doesn't seem that you are using slicer, matter control.......so I'll have to write generically......... I'm sure it will work out, in the end.

    Your first & fifth paragraph concerning the Z-offset.......I may be makin' this too simple or not understanding your question.....but....what I did to come up with the Z offset from extruder, which is the nozzle tip is:

    As you did, grab the .1mm paper.....send a G92...........that's zero now.
    Now grab a paper & pencil......as you did with the Z axis..... observe when the LED extinguishes.......by commanding a Z+ in 1mm first step, (since you already know, it may be out in the 1.74mm distance, you can cheat).
    Then, move in Z+ 0.1mm steps......record.......(.1+.1+ .etc)....LED extinguishes at some distance...write down that number, (1.8mm maybe)........Forget 'bout the board & all else..........your Z offset number is ( -1.8mm, revise in firmware or +1.8mm in G code), I revise in firmware...........Since your heated up already.........go ahead and print a 10mm square 1 layer and check results...tweak z offset to your liking.......squish more/less........If your LED is triggering too far from bed.....you may be sensing a white area from robo's bed....move somewhere else and repeat set-up. sidebar: Hairspray does not change your Z offset, however, painters tape, buildtak, etc....that alters the reflectivity of the surface will require Z offset change.

    Paragraph two, says the IR located 25mm from the right side of the carriage, that makes, X_PROBE_OFFSET_FROM_EXTRUDER +25mm, probe, is correct.

    Paragraph three, again is correct...you certainly should tweak as required to probe in the extremes, if possible...keeping in mind to sidestep those white spots.......just saying again.....after Z home & autolevel the IR is just going for a ride.......

    Paragraph four, My knowledge of C++ is F++, I should refer you to Wheres Waldo for a better answer......I knew safe probing was preventing my set-up to home, so I checked the code, found this and commented out...fixed it but may not be the only solution or even implemented correct.............Thanks Danz...........let me know if I side-stepped, evaded or misunderstood your post...take care
     
  16. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Danz,

    < x_min: open
    < y_min: open
    < z_min: TRIGGERED
    > M114
    < X:95.00 Y:127.00 Z:0.00 E:0.00 Count X: 95.00 Y:127.00 Z:0.00
    > M565 Z-1.74
    > G29
    < Bed x: 40.00 y: 20.00 z: -0.61

    I noticed you have M565 as a negative number....G code rev's should be +, and firmware Z offset should be -1.74......I don't revise with M565...I think JB does...you may want to ask JB.....Later..........
     
  17. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    I actually thought of that on the way in that I would need a positive number in the Gcode now that the probe is triggering off the bed and not on it. Thanks for the reply Jim. Looks like I was pretty close last night then. I just didn't want to start an actual print without a second set of eyes to look over what I did. I fear the nozzle printing into the bed instead of on it :) I guess I will put the big boy pants on tonight and git-r-done. The IR works so nice compared to having the nozzle do pushups off the plate. I can't wait to finally just remove the two Z endstops for good. The reading I am getting are very repeatable. The old AL method would change each time by a noticeable amount. I hope to get more reliable first layers with this mod. Your awesome Jim. Thanks for the reply and your dedication to this project. It should be standard equipment on these things someday.

    BTW, I do use hairspray on my plate. I've noticed it changing my offset with the old method. So I clean it plate regularly to avoid the buildup. Nice to know that the IR won't change its trigger point from buildup. Still plan on keeping things cleaned up regularly. Also, I actually played with triggering over the white spots of the bed. Didn't seem to change anything, but I was trying to avoid it in the firmware where possible. Thanks again man.
     
    jim3Dbot likes this.
  18. bruce356

    bruce356 New Member

    Joined:
    Nov 30, 2015
    Messages:
    1
    Likes Received:
    0
    Hi Guys, the comment by danzca6 " Nice to know that the IR won't change its trigger point from build up." I would have thought that one would want the trigger height to change with build up, as the nozzle needs to be the same distance from the printing surface not necessarily the glass other wise the nozzle may end up too close the surface of the material you are printing on, be it blue tape or PVA or whatever you use to make your prints stick.

    danzca6 which IR are you using.

    Regards - bruce
     
  19. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    124
    Hi Bruce, With blue tape or any deviation from the black reflective robo bed, one would need to calibrate for that change, true, with any IR....however hairspray, doesn't really change the print height a significant or noticeable amount. However, again, as Danz said...keep that bed clean...with any IR used.........Hey, Thanks for the input..........appreciate.........jimmy
     
  20. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    Jim, sorry for keep posting issues with setting my z offset when I technically don't have your IR. I am just hoping to get someone to explain why I am getting the results I am. I seem to going in a circle. So if ANYONE can please help, I would really appreciate it. I can take my issue and start a new thread, but maybe one of your folks ran into this or will run into it.

    Here is my method of troubleshooting what the z offset should be with my IR. Now the sensing of the IR is very repeatable. I get the same values everytime +/- .01 mm. I've already posted my changes I made to the firmware above. My expectations for what the value should be for M565 is M565 Z1.6, but that hasn't been working. 1.6 mm is what the distance was from the nozzle to grip a .1mm paper directly after doing a simple G28 to home Z. The biggest oddity to this frustrating journey is that I get the nozzle closer to the bed when I get closer to M565 Z0.0. I thought a positive direction in gcode gets you closer to the bed and a negative direction in gcode gets you farther off the bed.

    Ok, so I setup to print the calibration cube and would start the print. When it would start printing, I would cancel the print. Using Cura 15.04 of course. Once the print canceled, I would do G92 Z0 to zero out Z. Then I would M114 to verify. I would then take a .1mm piece of paper and put under the nozzle. Then I would lower the nozzle by bits to get it to grip the paper. I would then M114 one more time to see the Z location. I would finally raise it 10mm, unplug USB, turn off printer, unplug printer, count to 5, plug in the printer, plug in the USB, turn on the printer, and go again. I did this with various offsets and the pattern below is making me put a dent in my desk with my head. Anyone have any next step suggestions to get the z offset to work? Yes, I did try M565 Z+1.0 and so forth for positive numbers with no luck. I think I am being punished for not buying Jim's IR.

    Offset gcode = Distance moved down until grip paper
    -----------------------------------------------------------
    M565 Z2.0 = 3.8 mm
    M565 Z1.0 = 2.8 mm <- Odd, but ok maybe I misunderstood how gcode works
    M565 Z0.0 = 1.8 mm
    M565 Z-1.0 = 2.8 mm <- WHAT? WHY?
    M565 Z-2.0 = 3.8 mm <-- I'm going to start drinking now
     

Share This Page