Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find an Eggbot on any serial port. :( Error reading serial data. #7

Open
Ianmcmill opened this issue Aug 16, 2015 · 19 comments

Comments

@Ianmcmill
Copy link

@cocktailyogi
Even after the fix in eggbot.py I still get this error.
Am I supposed to have serial access without Inkscape? Using the Arduino Serial Monitor or Putty I am not able to get any connection. Still the servo runs hot. 55°C.

[SOLVED]
I have found that hardcoding the USB VID into eggbot_scanwin32.py make everything working!
You have to replace in line 6 in eggbot_scanwin32.py:

hKey = _winreg.OpenKey( hReg, r"SYSTEM\CurrentControlSet\Enum\USB\VID_2341&PID_0043" )
//this line above has already been modified with my Arduino Hardware ID
with your Arduino VID which can be obtained from Device Manager - Arduino - Details - Hardware ID

@bartebor
Copy link
Contributor

It's great you have your eggbot working :)
Your servo should remain cool - probably its shaft was blocked in a way that it could not reach desired position. You can reattach servo lever in correct position or make adjustments in inkscape extension (Setup tab). New settings will be stored in microcontroller's eeprom.

@Ianmcmill
Copy link
Author

Yes you are right. I realized that the servo had a hard time holding the pen in the raised position.

@pseddon
Copy link

pseddon commented Jan 20, 2016

I also have struggled with the same error when using the Eggbot extensions on Inkscape. I also have modified eggbot.py and eggbot_scanwin32.py to use the VID and PID of my arduino board (I am using a UNO clone with a CH340 USB/Serial chip). I can drive the UNO+Adafruit motor driver V2 with Spherebot on board using serial commands but can't get Inkscape to do its stuff - any suggestions?

Peter

@caravanserei
Copy link

To get my Eggduino communication to work with Inkscape I made all of the following changes:

  • Change the VID/PID in the script as mentioned above. Make sure that this really is the ID of your Eggduino-USB-Device by doublechecking in the device manager. My UNO has an Atmel 16u2 and the ID is OK.
  • Use the delay-function (time.sleep(2) and don't forget to "include time") in the eggbot.py-script like Rick_S suggested in his comment April 2015 (please look in the regular comments for details) or, as an alternative, disable Arduinos Auto-Reset by hardware as cocktailyogi himself suggested. Up to now I got along completely without hardware patch, but, true, the delay before eaxh manually entered command is a little bit irritating.
  • Not really neccessary but useful: you may want to limit the access of Inkscape to Eggduino only and prevent it from accessing other Arduinos with different functions on different COM-ports that may be attached attached at the same time and - of course as Arduinos - all showing the same USB-IDs. So I manually assigned port 88 (EIghty-EIght - sorry, this joke might be understood by german speakers only because EI is our word for EGG ;-) to my Eggduino-Arduino (all other Arduinos automatically would be assigned to different ports of course) and in addtion told the Python-script to accept that port only as Eggduino-port when a device with the mentioned USB-ID is found on exactly this port. Of course you could omit the search completely and just check if COM88 (which ist port number 87 within the script!) is attached AND shows the correct USB-ID AND answers on a version query properly.

But most important: Before using Inkscape you first of all may want to make absolutely sure, that your Eggduino responds at all: Start with simply asking "v" (small v for Version) using Arduinos serial monitor: You should get an answer string like "Egg.... modified..." before even try to look for other tools in the chain. This is because your Eggduino simply must respond to any legal command entered on the serial line indepentently of the caller-tool. Another example: Toggle Pen "TP" (capital letters) gets an "OK" and the particular action. Only if this goes well you should proceed.

Arnd

@caravanserei
Copy link

And by the way: if things don't go well, check with a different USB-port. I have two UNO-clones (with 16u2) that both show unreliable communication with the USB-ports build in into my TFT-monitor. My NANOs with FTDI- or WCH-chips are running smooth there.

@urs8000
Copy link

urs8000 commented Mar 17, 2016

here a short overview how I get it running ... [SOLVED]

My environment:
Win10/64
Arduino UNO (1.6.7) auto_reset blocked with 100 ohm resistor to 5V after loading
Two Pololu DRV8824 on breadboard
EggDuino commit of 15. Nov 2015 (1.6a)
Inkscape 0.91 / EggBot Software 2.7.1
portable Inkscape 0.91 / EggBot Software 2.6.3 / modified egg-bot.py --> I used this combination, because it has the closest release date to EggDuino 1.6a

ALL of them came gave me the error, that no EggBot could be found
BUT when I connect directly with Termite_3.2 (COM11, 9600bps, 8N1) I receive with "v" --> EBBv13_and_above Protocol emulated by Eggduino-Firmware V1.6a
AND I could execute manually EggBot-commands as SM,2000,0,-200, which makes exactly one turn

with an USB monitor I see clearly, that Inkscape sends twice "v", but did not receive any string back!
So I'm confused why this happens with Inkscape and on the other hand I can emulate commands with a terminal program.
Replacing hkey in eggbot_scanwin32 made no change.
b.t.w. I could also connect via the Serial Monitor of 1.6.7. to get the correct answer sending "v" & CR.

finaly I made the modifications in egg_bot.py (portable inkscape) as suggested from Rick_S (THANKS!!!) and so I could connect.
-> I asked the EBB for its version info, and it replied:
-> EBBv13_and_above Protocol emulated by Eggduino-Firmware V1.6a

trying to plot something I've recognised that the schemtic @ SphereBot for micro-stepping is not correct (all low set full step).
M2 must be set HIGH for 1/16 stepping.

at the end of the day I could say: Done!

to do: testing with normal inkscape 0.91 & 2.7.1

@alpe66
Copy link

alpe66 commented Mar 21, 2016

Hello,
@urs8000 wich modifications from Rick_S ? because i could not find anything from Rick_s
Thank you very mutch for your help .... because i have already spent a lot of time on my eggbot ... ;-) ;-(

@caravanserei
Copy link

@alpe66
Please check the THINGIVERSE for Eggduino, too, and you will find that famous Rick_S ;-)
All in all he suggested another, maybe the first, solution for the problem that the INKSCAPE-Extension would not find an Eggduino but an Eggbot only, because the extension (of course as it was made for EggBots) EXPECTS an Eggbot only: Eggduino-Hackers are faced with the problem, that the genuine EggBot Python scripts check for the USB-PID/VID of an EiBotBoard and not that of an Arduino, that they search a serial device named EiBotBoard (or was it EggBot-Board?) instead of an ARDUINO UNO and so on...

@H3nk
Copy link

H3nk commented Mar 27, 2016

Well, I've got it working (at last), but with the modded Eggbot extensions version 2.5 it works, although the letter A and R are really trashed (see pics).
So now I've tried 2.7.1, and changed the VID, but that doesn't work,
and the time.sleep mod seems to be for the 2.5 version, am I correct?
Oh, and I disabled the auto-reset, coz. it works with 2.5
Any suggestions?
img_3882
img_3883

@Yura80
Copy link

Yura80 commented Mar 28, 2016

It looks like your steppers skip steps. Try to increase the current: http://reprap.org/wiki/Pololu_stepper_driver_board

@Yura80
Copy link

Yura80 commented Mar 28, 2016

To make 2.7.1 work, you should change VID/PID in ebb_serial.py, or just hard code your port number by replacing EBBport = None with EBBport = "COMxx" in function findPort()

@H3nk
Copy link

H3nk commented Mar 28, 2016

Hi, thanks for the reply. The steppers are ok, because when I use Spherebot, it works flawlessly.
I will try to change that, because it's easier to have everything integrated in 1 program, instead of creating the gcode with 1, and sending it with another.

@pseddon
Copy link

pseddon commented Mar 28, 2016 via email

@H3nk
Copy link

H3nk commented Mar 28, 2016

I changed the none into COM4, and it worxx with 2.7.1, but the same distorted effect.
But there are Nanos and Nanos, I've got another one with a FT-232 (fake), and that one "hangs" while sending gcode to the bot with Spherebot_UI.
pseddon, you could try http://www.thingiverse.com/thing:201052

@caravanserei
Copy link

@H3nk
@pseddon
@Yura80
As I stumbled in probably all of the traps of this Project by now, resolved them step by step and am a proud owner of a fine working EggDuino for some days by now (just in time for Easter 2016 ;-), you may want to take a look in my fork to see how I got things running at the end. It is no real fork because I only collected changed or newer files, but I think such a lean repo helps to keep the overview of what has to be done - and what could be done freestyle when the duty is done ;-).

And no, I think that you don't need to be an experienced Python programmer to understand what happens in the function find_port() in ebb_serial.py: All of the art is simply identifying an Arduino instead of an EiBotBoard. As of today I was even successful to add a connection to a CH340G-based Arduino clone as well and found it not too complicated.

Concerning the very special problem with Arduino NANOs that suffer from faked FTDI-Chips (Arduino Uno cannot be concerned because of different USB-devices) you better check the basic function from the Arduino IDE first of all. The Eggduino/EiBotBoard answers to any command you type into the Serial Console. There is no Python and no Inkscape involved at this time. Type 'v' (with CRLF) and your Eggduino will answer with a string "EBB...somewhat". Only NANOs with faked FTDI will answer here with that annoying "NO GENUINE DEVICE...". This is the reply of newer genuine(!) FTDI-drivers when detecting a faked USB-chip. You may want to make absolutely sure that this basic communication works before first-time trying to connect with Inkscape.

Concerning crude lines, I faced similar problems first and excluded Python first hand, because the main-script does nothing but sending pen-moving commands to be interpreted by EggDuino itself. But yes, I had to do some tuning on the following topics to get rid of it:

  • Make sure that no parts are loose and double- or better triple-check the lash of the pen and the pen-arm.
  • Slow down the drawing speed (by Inkscape EggBot Extension) AND the idle speed.
  • Check the friction of the egg-coupler. My first version was too smooth and the egg/ball slipped a little bit each time the egg-motor accelerated while the pen-motor worked fine.

@Yura80
Copy link

Yura80 commented Mar 28, 2016

@H3nk
Spherebot may be working because it has slower speeds or acceleration. Just try to increase the current by slightly rotating the trimpot clockwise (A4988) or counterclockwise (DRV8825).
I don't have any problem with this firmware at all. Once I followed all steps of the instructions, it just worked. I've already printed a few dozen of eggs with it.

@caravanserei
I didn't have to slow it down. In fact, I increased the speeds to 500/600.

You may try my fork as well, it implements some missing features like pen raising/lowering speed and engraver control..

@miodukic
Copy link

I had the problems of connecting the Arduino nano clone with CH340 but I managed to solve it. I went in to device manager and found the name of the device on Arduino port. It was named USB-SERIAL CH340 and I used just the first word of it and used it ebb_serial.py on line 49:

The original line is:
if port[1].startswith("EiBotBoard"):

PawArmy's code is:
if port[1].startswith("EiBotBoard") or port[1].startswith("Arduino"):

and my changed code looks like this:
if port[1].startswith("EiBotBoard") or port[1].startswith("Arduino") or port[1].startswith("USB"):

And now it works on both Arduino Uno and Nano clones with CH340.

@ememem13
Copy link

ememem13 commented Mar 7, 2017

The pen arm just want to rotate in one direction.
Do you have any idea?

@ronnylulu
Copy link

I have the same problems.
The pen arm moves only ion one direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests