I finally got my PIC programmer working, and programmed myself a PIC, but now I'm having trouble with my stepper control circuitry!
When the comms board is not plugged into anything (or plugged into itself), the voltage seems to register fine (11.xx and 4.95-5.05) coming off the main/connector lines.
Whenever I plug the stepper control into the comms board (doesn't matter which cable (in vs out), or if i plug both in vs just one)) the voltage drops (9.xxish and .95-1.05), and the comms stops working... if I unplug the stepper control, it starts working again...
I've checked over a couple of the connections/etc and haven't found anything that looks wrong, but it's getting late and I'm not seeing anything...
I'd suggest that you photograph both sides of the controller board and blog them plus the problem statement and your voltage observations so that we can actually see what you're talking about.
First off, have you closed the loop on your comms board and checked to see that you can echo text to it and get it back?
I suspect that Simon is going to have to help you debug your board since he designed it, but I did build two that worked after a fashion so I'll be glad to give it a look, too.
It could just have been me... or someone recently changed the picture for it... but i seemed to have every single 5v / ground connection reversed on it... (and i was missing a wire that i don't recall being there before)...
It now seems to run (I get proper voltage on it when i plug it in, and the java app pretends to exercise the motor)... i just have one small problem...
I built the unipolar controller... and just found out my steppers are bipolar!
At least I know the PIC works... and that i can, somewhat, put together a board... now I just have to decide how to fix my problem!
***At least I know the PIC works... and that i can, somewhat, put together a board... now I just have to decide how to fix my problem!***
I'm glad to see you've found your silver lining. I had loads of trouble getting as far as you have. :-)
While waiting for parts to arrive, I'm back to planning out my 'simple single circuit board' to run the whole thing (instead of a bunch of different boards with connectors/wires going between them)...
I'm wondering about the 2 wire sync bus that goes between the three xyz stepper controllers... The bipolar doesn't mention it, but the unipolar board mentions that you don't need the R1 and R4 on the Y axis, only the X and Z (resistor between the line and the 5v) Is that accurate? does it really mean I only need 1 resistor per line? (so 3 in all , one for x->y, one for y->z and one for z->x) or what? Also, is my assumption correct that I want to 'ring' those connections between the three? and does it matter what pin connects to what? and does all that hold true for the bipolar as well?
Also, I'm wondering what that C1 is? I've got a 100µF eletrolytic capacitor in that 'spot' on the comms board, and am wondering how many I would really need? is that just to clean up 'interference' on the power?
***Also, I'm wondering what that C1 is? I've got a 100µF eletrolytic capacitor in that 'spot' on the comms board, and am wondering how many I would really need? is that just to clean up 'interference' on the power?***
I think that you see that sort of replication because each of the boards in the system is able to stand along.
One more thing... R5 10kΩ Resistor... it's in the schematic for the unipolar, but not the parts list or the stripboard layout... it's in 'everything' for the bipolar controller... it seems to be connecting the 5v line to the middle pin of the max detector...
I can guess where it goes on the unipolar controller, but is it correct that it is only on the max and not the min? and is this required if you're not using min/max sensors and are just putting the 200-300Ω Resistor in their place?
Sounds like you're going to be well-placed to sort out some of the confusion in those schematics. :-D
The 2-wire sync lines are a bus, which means they do not form a ring (unlike the comms, which really is a ring). So essentially you have a wire that connects RA2 from the X axis to RA2 on the Y axis, and on to RA2 on the Z axis. The same for RA3, which is separately connected between all of them.
The resistors on the sync bus go only on the end points of the bus, which would typically be X and Z (with Y sitting in the middle). The purpose of those resistors is to terminate the bus, which basically means it suppresses echos on the line and keeps the signal clean. It is not needed on the intermediate connections (the Y module). If you wired your bus differently so Z was in the middle, for example, then you would need the terminators on X and Y, but not Z, etc.
The sync bus works the same way on all the controllers, which means you can mix controllers and motor types freely throughout the machine if you like.
In terms of the sync connectors, you have a two-point plug that goes into each of the axis controllers. The plug on the Y controller acts like a T, so it has two wires going to each of the socket pins (4 wires in total), while the end points (X and Z) just have a single pair of wires.
On the 754410 bipolar controller, C1 is 0.1uF as shown on the schematic, as is C2. It is unrelated to anything on the comms board.
Something not currently shown on that page, but which is highly recommended is an extra capacitor to smooth out the power on each board. The schematic on the wiki needs to be updated to reflect that (it's in the repository but not on the web site yet). For that, a 100uF capacitor between +5V and GND is sufficient.
R5 on the motor controller acts as a weak pull-up for port RA5. It is not needed on RB0 because the PIC has its own internal pullup resistors that can be used on port B. Adding one probably wouldn't hurt too much, but it's already in the PIC so there's no need.
As you say, if you're not using min/max connectors you can just put a resistor in there to pull the line low. In which case, the pullup resistor wouldn't be needed either. However, I would *strongly* recommend using the min/max sensor as the controller software expects it to be there and uses them to move the head to a known position prior to fabrication. The min sensors are the only really essential ones. The max sensor is only currently used for the software to determine available space. In the future it may be used for other purposes too (measuring backlash for example).
I would recommend holding off making the 754410 board that is shown on the wiki. There is a better controller based on the L298N which is in the repository but not yet on the web site. The main advantage of this controller is better heat dissipation. The 754410 controller works just fine too, particularly with lower current motors. I'm using it on my "repstrap" without problems so far. If you're using something really powerful, the L298N controller would definitely be worth considering instead.
Thanks... I'm trying to make this a 'basic repstrap' board, and not get too fancy... the 754410 should be enough to get the job done, though I'll look at the L298N controller once it's up (I've already ordered parts for the 754410 and the ULN2803 controllers, so the L298N will have to wait a bit...)
In the interestes of 'not getting fancy'... i'm trying to come up with a simpler 'stand in' for the min/max photo sensors... The software should know the 'workspace size' so it can alert the user of any oversized objects, and that should be set both automatically (min/max) and by user (values relative to the min). Manually setting that eliminates the max, but you still need to somehow find the min to 'reset' the extruder (especially after a crash/power outage/improper shutdown where the head is at an unknown location).
I'm thinking of replacing the min photosensor with just a pair of wires/metal contacts that 'hit' and 'bridge'(? or is it break?) the connection between, i'm guessing pins 1 and 2, on the min connector... (and the max sensor with just the resistor) Maybe bend one side out like on an AA battery holder, to put a little spring/give in it to compensate for any lag between the connection and the motor stopping. (or just use a conductive spring as the contact!) at the very least, I want to reduce it to one pair of wires per axis, instead of the 6-8 wires per axis (both the led and the photo transistor need the ground, and they need to be located on different physical objects, right? that's 4 pair per axis)
That seems to be a lot of trouble to go to to replace a $2 part.
now i'm really confused... that thing's got 5 leads on it!
is that a single part that that comprises of both the led and the photo transistor? (working off reflection off the other object) or would i still need a second part (led?) and which leads do i use on there? (or is it really 3 leads and 2 of them just come out the other side?)
It's not the part I'm trying to avoid... it's the extra wires... I was under the impression that I needed a photo transistor on one piece, and the led on the other piece (end vs moving part)... if that's a single component i place on the stationary end, and don't need one on the moving part, then that solves the problem!
(i haven't actually seen any min/max sensor components on any of the wiki pages, so I have no real reference asto what it's supposed to look like or be... just that it's got a ground, a photo transistor, and a led...)
LOL! Try to relax. I'm hooking some up to Tommelise and I built a test board to make sure that the circuit that acroname gives you...
...really worked some months ago. I'll be more than glad to help you debug that part of things when you get to that point.
If you look there are really only 3 leads that go into the chip, viz, 5v, gnd, and output. The resistor pair shown in the circuit is only there to adjust the response speed of the chip. You can see the more complete charts for sizing the resistors at...
I doubt seriously, though, whether you're going to need the chip to respond any faster than the acroname nominal circuit allows.
If you have trouble finding those fool 6.8K ohm and 470 ohm resistors, let me know. I've got about a hundred of each and will be happy to put some in an envelope for you.
I am relaxed... i'm just enthusiasticly dangerous :) I know the basic principals from back in high school... (and I know how to shoot out vacuume tubes with disc cappaciters and a rubber band...) but i have no practical experience/knowledge... and the wiki isn't exactly 'complete'...
I'm guessing the .1u cap is the one on the bipolar board, and would go on the unipolar board in the same manor... and then you'd just hook up to 3,4,5 and point the thing at a surface to reflect off of...
next question: is this 'head on' like a headlight? or 'sideways' like tripping a beam?
also, is there a reason we're not using a physical connection? (ie: button/limiting switch thingy)
and finally... is there anything else i need to get with the photoreflector that i'm forgetting/missing/not knowing?
***next question: is this 'head on' like a headlight? or 'sideways' like tripping a beam? ***
I'm lost. Could you put some more words with this? I'll give it a try, though. The p5567 chip has two little red dots on the top side of the chip. They look like spider eyes. One is the IR source and the other is the detector. The IR source puts out a signal that reflects off of the target. The detector picks up it's reflection off of the target. If you vary the reflectivity of the target in the IR range you the chip sends out a voltage change as it crosses the zone where the reflectivity changes.
Why I mention the IR range (about 0.8-1 micron) is that some things that are very dark or very bright in the visible radiation range have very different characteristics in the 0.8-1 micron IR range. You have to be careful and make sure that whatever your marking your boundary with works in that IR range.
***also, is there a reason we're not using a physical connection? (ie: button/limiting switch thingy) ***
I asked the same question many months ago. As I recall the feeling was that a mechanical switch was less accurate and reliable.
doesn't quite clarify what i'm wondering...
By the description of the chip, I see it mention the 'sideways' technique i was trying to describe; constantly pointing at a target, with that target being 95% 'white' with a 'black' strip on the end (in IR colors)...
I don't have anywhere on my rep(st)rap to put a target like that, so I'm looking for a 'head on' approach; I guess it would be using the p5567 as a proximity sensor. No target (close enough) for the p5567 for 'regular running', and then when it gets to the 'end', it gets physically close enough for the target to reflect the IR back to the p5567. It sounds to me like this could be a 'gradual change in voltage', and could possibly be lost due to 'noise reduction routines' or something...
I'm still not sold on this being any better/easier (at least for my current rep(st)rap) then a pair of conductive springs and a metal plate... but i'd definatley want the accuracy on a 2nd or 3rd generation reprap... (1st generation I'm just worried about stripping the motors/linkages or ramming the extruder into the ground)
***I don't have anywhere on my rep(st)rap to put a target like that, so I'm looking for a 'head on' approach; I guess it would be using the p5567 as a proximity sensor.***
I suspect that it would work that way just fine. I haven't tried that though. I noticed that I had to get the chip pretty close (4-5 mm) to the calibration strip before it would read when I was testing the chip some months ago.
BTW, there is nothing to stop you from using a reflective strip to mark the boundaries of your axis movement and then nothing whatsoever in between. That might be easier to accomodate on your reprap design.
***I'm still not sold on this being any better/easier (at least for my current rep(st)rap) then a pair of conductive springs and a metal plate... but i'd definatley want the accuracy on a 2nd or 3rd generation reprap... (1st generation I'm just worried about stripping the motors/linkages or ramming the extruder into the ground)***
This is the builder's blog, not the developers. You have no obligation whatsoever to stick with the specs that they have over in the developers' blog. If you want to try a microswitch or something like that, there's absolutely nothing stopping you.
Just tell us how it works out for you, though, even if it is a failure. Negative information is just as valuable as positive because there will be a lot of other reprap builders who can benefit from your work, however it comes out. :-)
***This is the builder's blog, not the developers.***
actually, this is sourcefourge :) but when i do get some completness to what i'm doing, i will be posting on the builder's blog... (I need to find a place to mount the thing before i try and take any pictures of it... i'd also like to get at least one motor working on it!) I think i'm going to mount my spring/plate sensor onto one of my axis while I wait for my parts to arrive...
My next problem is getting good pcb software working... I've been working with ExpressPCB... but I don't think it's got any fancy rendering, nor is it any good at non-straight jumper wires... I've had no luck at all with eagle or kicad (i'm convinced that kicad's windows version uses a different format than the linux version, given that every single file i try to load from the repository comes up as invalid in kicad!)
Yes, you can configure the max range in software manually so the max sensor is certainly not so important. But the min sensor is used to get the extruder into the right place. Without it, the head will crash into the frame and other such fun things.
There's a picture I put on the wiki a while back of the optointerrupters I'm using, which you can see at
They are not reflector based, they have a photo-transistor and LED pointing directly at one another, with a gap between them. You arrange it so that when it reaches the limit, something passes between the gap to trigger it. This is the type of device most printers and things use for limit detection, so it's pretty appropriate.
If you're looking for simple though, just use a little microswitch (one of the little ones with a small spring steel level on the end). When it gets to the end, the lever will depress and signal the end of travel. They'll cost you a couple of dollars too so you won't be saving much, but you can buy them at any hobby shop. You can also find them in quite a lot of old equipment if you feel like salvaging them. If you pull apart some old printers, you're bound to find one or the other or most likely both. They're also a good source of stepper motors, etc.
To connect up a microswitch instead of an optointerrupter, just connect it between pin 1 and 2 of the sensor connector, leaving pin 3 disconnected (that's the line that drives the LED).
Most microswitches have 3 pins. One is common (usually in the centre), one is normally open and one is normally closed. You want the common and normally closed pins -- you can tell which is which with a multimeter. DO NOT WIRE ALL 3 PINS TO THE SENSOR INPUT :)
Had to make further modifications to the unipolar controller board though... When I first hooked it up, the motor only ran in one direction, and not very well. I sort of had to 'spin start' it to get it going, then it would run forward 'just fine', though with very little torque. It didn't really run backwards, it just sort of spasmed, and I could 'coax it' to turn in either direction with my fingers, but it wouldn't actualy 'catch' and start running. After a bunch of messing with the wires to the motor, I reversed pins 5 and 6 ('not connected' and the 12v power i believe), and got the opposite effect (it ran backwards, spasmed forwards, still no torque). I got out the soldering iron, bridged pins 5 and 6 so they both gave the 12v power, plugged it back in, and it worked! Ran both forwards and backwards, and with torque! I was also able to successfully 'calibrate' the axis by removing the resistors i've got on the limiter connections to simulate the limiter going off.
Next step: figuring out how to mount this motor to my frame/threaded rod and seeing if it'll move!
Had further problems...
I got the microswitches in that I'm using for limiters, and hooked them up, but the max wasn't working right... It had been acting hokey all along, and was actually more responsive to my finger over the three prongs than the switch (or simulated switch) i setup...
I then rememberd reading something about the pic, and recalling more discrepencies between the unipolar and bipolar controllers, and decided the R5-10k resistor on the bipolar controller was probably missing on the unipolar controller... (i recalled reading how the pin on the min limitor had a 'feature' built in that the max pin didn't have and i guessed it was the 5v power that my finger/skin kept touching when i was messing with it...)
I put R5 into my unipolar controller, and it worked like a charm...
I'm guessing that i'm the only one using unipolar steppers...? (i've got both motors, i just like how much neater the unipolar controller looks!)
I've got the horozontal axis secured and lengthened the wires to all the motors... I've still gotta install the limiters, add two more controllers to my board, and figure out how to mount the lego axis & its limiters... Then try and get the thing not to wobble so much!
Are you going to make up a corrected schematic for the unipolar board?
I would like to... but have had no success at all in that area... I don't know the state of the files that are checked in, but I've never successfully opened any circuitry schematics/boards/etc from reprap... the only version of kicad I can find seems to be incompatible with all the files on the site, and it's not too intuitive to 'easily' make a stripboard circuitboard (that I can figure out)
If someone can point me in the right direction (software to use, existing files to edit, where to put it when i'm done/edit the wiki, etc), I'd love to... but at the moment all i've got working is ExpressPCB, and it doesn't produce pretty pictures...
I'll tell you what. I've got KiCad working and know how to use it after a fashion. If you can mark up the original schematic that you used and show what you've changed. Scan that and send me a copy. I'll recast it in KiCad. It's about time tht we got around to regularising our schematics and I understand that KiCad is the standard that we're supposed to use.
Log in to post a comment.