Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    3D Printer Noob
    Join Date
    Mar 2018
    Posts
    20
    Post Thanks / Like

    Cube printer hack, my approach

    I just want to explain an approach that I have been working on to solve the problem with the chip in the filament. I am working on a CubePro that I picked up used for a good price and want to ensure that I can print with any ABS or PLA materials that I wish regardless of what 3D systems wants to sell.

    So here is what I am attempting, maybe someone else has tried this and failed or maybe someone else can get it working quicker than me.

    I simple want to emulate the 1 wire EEPROM, the DS28E01-100 that is in the cartridge with a micro-controller. There is a library on GitHub called OneWireHub that can emulate a DS2502 (1k EEPROM without the SHA-1 engine), so I am adapting to add the necessary pieces for the SHA-1 emulation.

    Once a micro-controller running a program can emulate the EEPROM then we can have that emulation do what ever we want. One simple example is that it reads and writes just as if it where the DS28E01, and page 1 would continue to be decremented by the printer but all that is happening in the RAM. Once you power cycle the device it comes back up and initializes the simulated contents back at 100% again.

    Another option is for some switches, or maybe a rotary encoder that would allow you to select what material you want to emulate to the printer on the fly. No more reprogramming EEPROMs to fake various materials.

    I believe both of these ideas are certainly possible.

    Here is what I have done so far. I started with an Arduino Nano, the OneWireHub code and a logic analyzer and have been testing this on my printer. The printers talks back and forth with the emulated device just fine until the printer changes to Overdrive mode. At this point the poor crappy micro on the Arduino just isn't fast enouhg to meet the timing requirements and the printer will reset the communication. I hacked the Arduino IDE to force -O3 compiling and I remove a ton of checks and balances to speed things up. I can get into the secure memory read from page 1 but the controller just isn't fast enough to complete the SHA-1 calculations and CRC checks. In fact the controller isn't fast enough to return a CRC-16 in 2ms time. So brick wall hit and I think that is it for the Arduino.

    Next up is an ESP32. I have several sitting here on my bench and have been using them to do some amazing high speed things. It has dual 160MHz cores and should be able to do this easily, the problem is that the IO is 3.3V, so I need to slice and dice the OneWireHub to dive with one pin, through a FET to create an open collector drive and read back through a different pin where I clamp the input to 3.3v. Again all this is possible, however it will probably take 40 plus hours of work to get this running.

    And finally I don't know anything about the private key that is stored in the device and how that is managed. If I knew that then I would feel much better about what I am trying to do. It seems Mr Tomuro has fingured this out. Perhaps the key is hard coded in the firmware, or maybe it is based off the EEPROM serial number and mathmatically derived. Anyway that portion is unknown to me but maybe if my code gets 90% of the emulation right then that might be good enough. It is possible that the printer firmware doesn't even care about some of the returned codes from the EEPROM.

    So if anyone knows anything that might help, let me know.

  2. #2
    3D Printer God(dess)
    Join Date
    Nov 2016
    Posts
    1,478
    Post Thanks / Like
    Can a single controller manage more than one channel?

    I'm thinking you could plug in the Nano and easily program whatever state you need for the pending print.
    That way, the unit could easily be installed within and the cost should still be reasonable.

  3. #3
    3D Printer Noob
    Join Date
    Mar 2018
    Posts
    20
    Post Thanks / Like
    The OneWireHub project is designed to emulate many 1 wire devices at the same time, so in the Cube Pro Trio, 3 should not be a problem. From what I have observed with a scope the controller only reads the cartridges one at a time anyway so the timing demands to emulate up to 3 would not be difficult.

    For reference, I purchase 3 Arduino Nano clone boards for $12 from Amazon so that included shipping. So about $4 each.

    The esp32 developer board is about $9.

    None of these solutions are expensive compared to the cost of 3D printing.

  4. #4
    3D Printer God(dess)
    Join Date
    Nov 2016
    Posts
    1,478
    Post Thanks / Like
    Interesting approach. Plug-n-play would mean mating the chip connectors inside, find 5V (available USB), and communications (new USB)?

  5. #5
    3D Printer Noob
    Join Date
    Mar 2018
    Posts
    20
    Post Thanks / Like
    Quote Originally Posted by TommyDee View Post
    Interesting approach. Plug-n-play would mean mating the chip connectors inside, find 5V (available USB), and communications (new USB)?
    The printer already has a USB port, so that can be tapped for 5V. The ESP32, if I where to use that, has bluetooth and wifi, so if you needed to interact with the device you could possibly do it wirelessly, haven't go that far yet.

    Of course all this is speculative, based on providing a good enough emulation. I had to put my work on hold until a knock out a few other projects.

  6. #6
    3D Printer Noob
    Join Date
    Dec 2017
    Posts
    7
    Post Thanks / Like
    Quote Originally Posted by boilerbots View Post
    the problem is that the IO is 3.3V, so I need to slice and dice the OneWireHub to dive with one pin, through a FET to create an open collector drive and read back through a different pin where I clamp the input to 3.3v.
    What about using a using a bi-directional Logic Level Convertor? I've used them before for 5v i2c communications with an ESP8266. Looks like it should support OneWire. https://learn.sparkfun.com/tutorials...r-hookup-guide

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •