rq3
Senior Member
First, Happy New Year to all, and I trust everyone is staying sane and in good health!
I have a 3D printer, which uses a microswitch to physically probe the printer bed location. The microswitch gets fed +5 volts (approximately, it's actually about 4.2 volts) through a 4.7K pullup from the printer microprocessor board. The switch is normally closed, so the microprocessor sees logic low. When the switch contacts the printer bed, it opens, and allows the pullup to pull the signal high (+5 v), telling the microprocessor that contact has been made.
The printer control board is closed source, so I have no firm data on which ports it is using, and how the port and pullup is physically configured.
I have been playing with a piezoelectric disc and a Picaxe 20M2. The intent is that when the printer nozzle itself contacts the printer bed, a signal is generated. This is an old idea, and there are actually commercial products that do this, so as to negate the need for an actual physical switch, and the knowledge of the switch's physical offset from the nozzle.
My question is, what is the fastest possible way to have a Picaxe pin go from active low (switch closed) to "open" (or a high impedance state, NOT active high), based on an ADC input (or maybe comparator input, or even logic input) on another pin? I've done the obvious (setfreq M32, etc.), and don't want to have the pin go active high, as the Picaxe is on its own 5 volt supply, and I don't want to risk "back driving" the printer's logic line.
Ideally, I'd do this with an 08M2, rather than the 20M2's I have on hand, so any tricks to invoke a comparator function (if that would be faster than an ADC or logic input) would be very welcome. I'm looking at you, AllyCat ;-) but welcome any and all thoughts!
I have a 3D printer, which uses a microswitch to physically probe the printer bed location. The microswitch gets fed +5 volts (approximately, it's actually about 4.2 volts) through a 4.7K pullup from the printer microprocessor board. The switch is normally closed, so the microprocessor sees logic low. When the switch contacts the printer bed, it opens, and allows the pullup to pull the signal high (+5 v), telling the microprocessor that contact has been made.
The printer control board is closed source, so I have no firm data on which ports it is using, and how the port and pullup is physically configured.
I have been playing with a piezoelectric disc and a Picaxe 20M2. The intent is that when the printer nozzle itself contacts the printer bed, a signal is generated. This is an old idea, and there are actually commercial products that do this, so as to negate the need for an actual physical switch, and the knowledge of the switch's physical offset from the nozzle.
My question is, what is the fastest possible way to have a Picaxe pin go from active low (switch closed) to "open" (or a high impedance state, NOT active high), based on an ADC input (or maybe comparator input, or even logic input) on another pin? I've done the obvious (setfreq M32, etc.), and don't want to have the pin go active high, as the Picaxe is on its own 5 volt supply, and I don't want to risk "back driving" the printer's logic line.
Ideally, I'd do this with an 08M2, rather than the 20M2's I have on hand, so any tricks to invoke a comparator function (if that would be faster than an ADC or logic input) would be very welcome. I'm looking at you, AllyCat ;-) but welcome any and all thoughts!
Last edited: