Welcome! Log In Create A New Profile

Advanced

How do i use the spare printrboard pins to drive a transistor

Posted by oldmanbeefjerky 
How do i use the spare printrboard pins to drive a transistor
February 02, 2013 02:20AM
Hi

im currently working on a program to generate 2 dimensional g-code from any bitmap convertable image file, e.g jpg, png, bmp and gif.
the purpose is to power a laser engraver, or a super heated pin, to engrave a single layer of texture and text into the plastic.
Suddenly it occured to me, i cant use the heated beds mosfet to operate my laser, as the laser driver would require modification to work on 12v instead of 5v, also, i want this function permanently plugged into the printrboard, and lastly, i really want to know how to use these pins for powering other things, for later projects.

On the printrboard, between the endstop pins and the micro sd card slot, theres 20 unused pins, next to the power inductor next to the thermistor pins, theres 14 unused pins also.

How do i utilize these? How do i get one to emit useable current which i can use to switch a transistor on?
i have no idea how, in marlin, to access and operate these pins.
Please help!
Without laser control , my only other alterntive is to raise the z axis several centimeters very quickly, in order to unfocus the dot then have the axis move, and that is unprofessional and will also leave a mark with each movement.
Re: How do i use the spare printrboard pins to drive a transistor
February 02, 2013 05:23AM
Depends if you want to interrupt / switch the high side of a circuit or the low side.

Switch circuits on high side are bit more complicated and perhaps expensive, at least in case of p-fets.

Because n-fets are cheaper and can interrupt the low side (gnd line) of a circuit easy, reprap uses low side fets to interrupt extruder and bed. I guess you might use the same? In the simplest circuit you take the pin and tie it to the gate of the mosfet directly. See circuits for bed and extruder. Should probably take care that the mosfet is logic level compatible that is it requires lover voltages, in logic level range, to be fully on. If it isnt expressly "logic level" probably should check datasheet to confirm that at 5v it gets triggered fully on. And also that it can hold the current required. Perhaps most of reprap choice of bed mosfets might be suitable, i doubt your laser requires more amps than the typical heated bed. For example IRL3803 should work, search datasheet and note "logic level" there.

Again just to be clear this type of switch interrupts a ground line. What exactly is the voltage you feed to your device on the high side doesnt rly matter, can be 5v, 12v, 24v, etc, as long as its in mosfets parameters and it triggers fully on and hence it works correctly in its linear region of operation. So if you have an atx psu with both 5v and 12v, you can use mosfet to interrupt a circuit on its ground line, and as high side use either 5v or 12v as you like.
Re: How do i use the spare printrboard pins to drive a transistor
February 02, 2013 05:31AM
Just to note that one disadvantage of interrupting circuits on the gnd line is, that the V+ side the load remains connected all time, even when the fet is off and circuit is normally interrupted. Sort of speaking, if it happens to to find another alternative path to gnd through a short, your laser will activate coz through that path to ground it can have its current flowing.

This is from an safety perspective. So perhaps avoid tieing its heatsinks to ground, and generally speaking avoid having grounding points near the device, through which it can complete its circuit even when off.
Re: How do i use the spare printrboard pins to drive a transistor
February 03, 2013 12:20AM
ok ,thanks.

One other thing, im having difficulties identifying which pin is which, so far, random pins output either +5 or -0.07v. So far, using the m42 code i havent been able to get any pins to change their state, or at least make it noticeable by my multimeter.
So far, i have not been able to verify functionality or identify a single pin. Im going on the assumption that something like M42 P1 S255 is 100% on and the same, S0 is 0%.
Is this right?
first thing i want to do, is drive an LED as the load, just to test it out, but so far i havent gotten anything, am i doing this right?
Re: How do i use the spare printrboard pins to drive a transistor
February 03, 2013 07:26AM
The -0.07v can easily be multimeter error, but a pin that is defined as output yes, can be either high (5v) or low (0v). Only a DAC pin could have anything in between, but arduino has no such pins. If a pin is connected to a fet gate pin and is 5v then fet is on, and when its 0v then fet its off.

I suppose you use marlin/sprinter to switch gpio pin. If not, in firmware before using a certain pin you need to define it, make it input or output, have the gcode command be able to switch it ... etc. Otherwise you shouldnt use a pin that is not properly supported in firmware coz might easily burn something. I dunno that m42 command for marlin/sprinter so cant help you further on it, but if i were you i would double check it. But to put it simple, if you can use m42 to change the state of a pin from 0-5v and back, that is all you have to do, and if you can do it then it means it works.
Re: How do i use the spare printrboard pins to drive a transistor
February 03, 2013 05:37PM
OK, i decided to go through every pin until i got it, finally found the output pins. Ironically my laser driver stuffed itself somehow, right before i had it all ready to wire up, so i have to build a new one.
VDX
Re: How do i use the spare printrboard pins to drive a transistor
February 04, 2013 03:04AM
... what sort of lasers and drivers are you using?

I've changed to simple current regulators (LM317, LM338, LM350) with set currents of some Milliwatts up to 9 Watts, depending on the laserdiodes.

Have some analog drivers too, but until now PWM-driving the LM-drivers was enough for all my laserworking ... but this could change, when going to XY-scanning with galvanometers ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: How do i use the spare printrboard pins to drive a transistor
February 04, 2013 05:21AM
1W 808nm in a TO-5 housing. im also using LM317
VDX
Re: How do i use the spare printrboard pins to drive a transistor
February 04, 2013 06:28AM
... have you the LM317 as voltage- or as current-regulator? - and which currents are you driving ... and will it overheat?

I'm using them as constant current drivers with max. 1Amp for the LM317, max. 2Amps for the LM350 and max 3Amps for the LM338.

For higher amperages I'm 'paralllelizing' ans averaging several of the LM's so the sum will give the end current (actually up to 9 Amps).


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: How do i use the spare printrboard pins to drive a transistor
February 04, 2013 12:20PM
How about an L200, one can set the current limit, easier to use safe npn external pass transistor in current mode, or to set the curent output with a voltage reference, perhaps use the uC to control high side directly, as bangbang (or even current lvl with a DAC output which arduino lacks).
VDX
Re: How do i use the spare printrboard pins to drive a transistor
February 04, 2013 02:42PM
... the L200 is more expensive (-), has more pins (-), 2Amps max (+). and in currents regulating mode identical behaviour to the LM's (~).

For singlechip drivers below 1A it's not the big difference, but for drivers with higher amperages parallelized LM's are much cheaper and simpler to use ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Quote
oldmanbeefjerky
OK, i decided to go through every pin until i got it, finally found the output pins. Ironically my laser driver stuffed itself somehow, right before i had it all ready to wire up, so i have to build a new one.
hi, i was thinking of adding an eject function for my printrbot and found your post. Could you point out which pins are output? i think it could prove useful for anyone trying to add something extra to their printers.
Thanks
Sorry, only registered users may post in this forum.

Click here to login