Pen Up / Pen Down

edited January 26 in AxiDraw
Can I get a 5V signal from the ebb board (or elsewhere) that corresponds to either pen up or pen down?

New Axidraw woks fine, by the way.

Comments

  • Not directly; the EBB operates at an internal logic-level voltage of 3.3 V, and its I/O pins are just below this. If you need 5 V, you'll need to provide an external logic-level shifter.
  • OK, that's easy enough to do.

    Is there a 3.3V signal that corresponds to pen up or down?

    That would get me 99% of the way to my goal.


  • edited January 26
    There is not, but you can add one. The EBB has four three pin "servo outputs" available. The lowest of them (B1) is used for the pen lift servo. The other three (B0, B2, B3) are available for your use.

    What you will need to do is to modify your software to add the command to turn the output on or off at the same time as you raise or lower the pen. If you're using the standard Inkscape-based software, then you'll want to open up and edit the script called "ebb_motion.py" in your Inkscape extensions directory. In that file, look for the sendPenUp and sendPenDown command definitions. There, you can add another line to send the I/O pin on or off command. Depending on what you're actually doing, you may prefer to replace the pen up/down movements with just the pin on/off commands.

    You might want to look at the "sendDisableMotors" command definition to see how we set up a one-liner command with no variables, as ebb_serial.command( portName, 'EM,0,0\r').

    For the actual command to send, look at the PO command in the EBB command set documentation: 
     http://evil-mad.github.io/EggBot/ebb.html#PO , and note that you will need to send a PD command beforehand.

    You may also want to refer to this discussion about adding a laser control: http://forum.evilmadscientist.com/discussion/comment/1992
  • Thank you very much.

    I was thinking that I could simply hijack the output to the servo, but wasn't sure just what was sent to it.

    Replacing pen up/down with pin on/off would be great, if that gets me 3.3v/0v on the pin.

    In that case, all I would need to do would be to convert the 3.3v level to 5v.


  • Oops, should have read your references before writing my response.

    It looks like everything is there.

    Thanks
  • The servo control signal is not an "on/off" signal-- it's a command to move to a particular angle. If you need an on/off, I'd recommend putting it on a second I/O port, just so that you can always switch back and forth with software alone.
  • So, take it off of B0, B2 or B3, while leaving the pen up/down servo on B1?

    That sounds fine.

    Thanks again.
  • Yes, that would be best practice.
  • edited January 29
    Well, it's not exactly your issue, but you probably know the answer:

    All I need to accomplish is to close a switch (that carries 9vdc) when a pin on the EBB board goes high, and open it when it goes low. (as discussed above)

    That sounds like a job for a relay.

    I see stuff about triggering a 5v relay from a 3v signal, but why introduce extra stuff if there is a simple solution?

    I, however, don't see that simple solution. (I don't need, or want, ten surface mount relays....)

    Please point me in the right direction.

    Thanks again.

    This is the closest thing that I can find:





  • There are quite a few different solutions. The right one for you will depend upon factors including the speed that you require, the current carrying capacity, and so forth.

    Depending on your application, you might be able to just use a transistor instead of a relay.
    You could use a solid state relay, that can be driven directly from 3 V.
    You could use a mechanical relay, that can be driven directly from 3 V.
    You could use a transistor to drive the coil of a relay that requires higher voltage and/or current.
  • edited January 29
    So, truth be told, I don't know how much current the closed 9v circuit would draw.

    I'm assuming it's not much, as it's likely just triggering another relay inside the device (I can probably check this).

    EDIT: There is no electrical schematic, but they do show a 24vdc solenoid in the parts list. I could pop the cover and see if that's where the foot pedal goes, but there isn't another likely candidate for the switch to trigger. 

    EDIT #2: The electrical schematic is under the hood (bless them) and calls for a mechanical relay.

    If I can figure out how to post a picture, I'll include that.

    From your perspective, speed isn't an issue: 500ms should be plenty fast enough. I don't think I need to worry about timing, but could actually adjust your software to compensate, if that turned out to be necessary.




  • I received my 3.3 volt relay today, and mounted it to a board to connect to the EBB.

    If I understand your numbering system, B1 is the bottom three pins, B0 above that, then B2, with B3 on the top.

    I expect to take 3.3v off of B3, as the connector that I have that fits that pin spacing won't easily fit the inner connectors.

    To check that I had the relay pins correct, I tried to check by hooking it up to B1, since I know B1 works, as the pen lift operates properly.

    Not knowing the polarity ahead of time, I metered the pins and was surprised to find +5V center pin to the rearmost pin and -5v from the center pin to the frontmost pin. I was expecting 3v.

    If my 3.3v relay will be happy with 5v, then no problem. I figured I should check first. Am I reading this wrong? 

    And, assuming I'll be using B3, which pins should I use to trigger my relay?


  • Yes, the 5 V center pin is there to provide power to the servo motor, which does require 5 V. The signal pin is a "3.3 V" logic signal.
  • OK, I looked at the schematics and board layout, and my best guess is that the 3.3v signal should come across the two outboard pins on B3 (assuming I tell the software to use that).

    The numbering system used in those diagrams is not consistent with what is on the board, if I'm reading it correctly.

    Also the labeling ground pins with a "+" sign is not a usage I am familiar with.

    So, should I look for a 3v signal across the outboard pins of B3 (if I set up the software properly)?

    In other words, which is the "signal pin"?

    And, if so, which side should be positive? (The relay coil specifies a positive terminal, but I suspect that it shouldn't really care.) 

    Thanks
  • I'm not sure what "outboard" means in this case.

    I'm looking at the schematic diagram now, and I don't see anything that is inconsistent with the actual circuit board. If you think that there is, please specify exactly what diagram you are looking at, what it is that you are seeing, and how that is inconsistent with the hardware.

    I don't think that the ground pins are labeled with  "+" sign-- where are you seeing this? Is this on the schematic or the circuit board?

    As it shows on the schematic, each of the relevant I/O connectors (with signals B1, B0, B2, B3) is arranged as three pins. Ground (labeled "GND", not "+"), 5 V (the middle pin), and the signal line.  If you look at your AxiDraw, the 3-pin connector that is there has three wires that are black (GND), red (middle, +5 V), and white (signal). The other 3-pin connectors are wired up exactly the same way: Ground towards the edge of the board, 5 V power in the middle, and signal furthest from the edge of the board. If you look closely at the circuit board itself, you may (depending on exactly how the screw heads and connectors line up) also be able to see some very small labels there, labeling the vertical row on the edge as "GND", the middle row as 5V, and the inner pins as B1, B0, B2, B3.

    As far as how to hook up your relay, you should follow the manufacturer's recommendation. There is probably a reason that they specify one terminal as positive.



  • In looking at at http://www.schmalzhaus.com/EBB/EBB/EBB_v23/EBB_v23_brd.pdf the pins for rows B0 through B7 appeared to me to be  unnumbered (see below). Each of those pins labeled as ground have a "+" sign inside the circle, so I figured that I should check to make sure I was looking at /looking for the right thing. 


    So, not having pin numbers to go by there, I used “outboard” to mean the ground and signal pins, and not the (“inboard”) 5v pin. Sorry I didn’t come up with a better description.


    What was not clear to me was that B0 through B7 number individual pins, and not the row of three pins as a unit.


    My confusion on the schematic was that the pins are numbered RB0 through RB7 rather than B0 through B7. I should have picked up on that.


    Anyway, I think your last response takes care of my hardware questions.


    I’ll try to get the Python changes made over the weekend and test it out.


    Thanks for your help.

  • Ah-- I see. You were looking at the board layout picture, rather than a schematic. The crosshairs there ("+") is where the center of the hole is drilled. I do see how that could be confusing.  

  • I probably would have recognized it as that, if it weren't a pin rather than a hole, but note that not all of the holes have crosshairs in that drawing (note the 5v holes), so it seemed safer to ask.
  • OK, Axidraw now paints:


    Thanks for the help, Windell.
  • Cool-- glad to hear that you've got it working. Neat application, too.
  • I've started a hackaday project to document this:

Sign In or Register to comment.