Sunday 30 December 2018

The proximity sensor cometh!

Having a night with nothing happening, I decided to finally move towards getting the proximity sensor on my printer. It's been lying around for a while (actually I burned one because the supposedly 12V power supply was actually 16V), and it's really the last thing missing on my printer. So onwards!

First thing I need is a voltage splitter so I can use the 12V signal in the 5V inputs on the Melzi board. Easy peasy, just two resistors and some jacks. That's what I have all this stuff lying around for. Solder it all up, and... find that I has placed the jacks wrong. Whoops. Remove, replace, resolder, not a problem. And then... find that the one resistor was 100Ω, not 100kΩ. Whoops. Remove, replace, resolder, not a problem. And then... notice that some of the soldering wasn't really that good and needed to be redone. Resolder, not a problem. And then I managed a simple circuit that should have taken 10 minutes but ended up taking more like 2 hours due to mistakes and misplaced things. Hopefully once my work table is in place the misplacings will be fewer. I don't expect they will ever stop.

The voltage splitter on the left, being tested. I like the little hooky test wires. 
With that prepared, I need to figure out exactly where to hook it up. The best information I have to go on is this thread on reprap.org, in which nophead as usual points out a number of subtle mistakes one can make with the most straight-forward approaches, though the solutions are not as obvious to me as they are to him. The "P" connections mentioned I'm already using for the e3d fan, but there's also four KRGB outlets (wait, is that a more colorful version of the Soviet-era secret intelligence agency?) that are not used. What do they do? Well, if I had done my fitting properly, they would have gone to the motor, but because the D connector was slightly off in the ribbon cable connection, I had to re-route those around the PCB. Thus those four are not used for anything, and I have no free connectors. Bother. Back to reading the specs.

Now the FAN+ pin has 12V on it, and would not be adversely affected by a bit more draw occasionally. But that's not connected to the ribbon cable. Wire 5 of the ribbon cable is unused and marked 'Probe', so that's probably a good one for the return signal. I suppose I can leech some 12V off the heater (HOTEND+), that won't disturb any readings, and for symmetry take GND from HOTEND- (or is there a reason it's HOTEND- and not GND?). So where is that Wire 5 going right now?


Here's the Melzi as it stands. There are three wires (#6, 7, and 8) going together into the second larger block, that's HOTEND+, and 3 more (9, 10, and 11) for HOTEND-. Wires 1 and 2 are the X stop, as can be seen from the red wires. 3 and 4 are for the thermistor. 5 and 12 go into the same block, the first larger one, with the top (12) marked as "FAN" on the cable, "FAN-" on the schematic. "FAN+" of the schematic isn't supposed to be wired to anything, and that's the wire 5 I could steal for signal.

My thinking is I can bring that one over to the contacts on the far side of the board. Whereas some builds show a 10-pin connector there, one mine it's just loose pins, free for the taking. Any of pins 2, 4, 6, and 8 (right row, from the top) on the lower section would go to EXT-A{1,2,3,4} on the chip.

On the top right: Pins enough to skewer a small mouse!
Not entirely sure about the HOTEND-. The schematic confuses me a bit. There's a HOTEND_BYPASS named JS2 that connects to ground through a resistor and that controls a power resistor. So that's probably how it's turned on and off. No, upon further inspection the HOTEND shown there is the connection. Slowly learning basic electronics here: that's an active low. In other words, no good for ground.

Having investigated these things, the original forum thread makes more sense. So I can take +12V from the heater, GND from the thermistor (though double-check if there's an influence on the reading), and bring the signal through wire 5. Great! Putting the appropriate connector on the voltage splitter and attaching it to the proximity sensor, it's all ready to go on.

By starting the hotend heating and measuring the voltage drop over it, I have determined that th right-most of the H sockets on the small PCB is HOTEND+ (12V), and the right-most of the T sockets is GND. But actually plugging them in will need to wait a bit. After spending about 15 minutes looking for a small enough screwdriver to unscrew Wire 5, I now need an even smaller one for unscrewing H and T. And it's late.

No comments:

Post a Comment