Jump to: navigation, search

Difference between revisions of "Replicape rev B"

(Steppers)
(How to wire up the board)
Line 22: Line 22:
  
 
== How to wire up the board ==
 
== How to wire up the board ==
The Fritzing board below shows how to wire up the board.
+
The Fritzing board below shows the most basic setup for connecting the board.  
 
 
 
<img src="http://wiki.thing-printer.com/images/Replicape_bb.svg" width="100%" /><br>
 
<img src="http://wiki.thing-printer.com/images/Replicape_bb.svg" width="100%" /><br>
Up to ten Dallas 1-wire sensors can be connected on the sae bus.
 
  
 
=== Steppers ===
 
=== Steppers ===
 +
Only Bipolar stepper motors are supported with these stepper motor drivers (SMD). If unipolar stepper motors are connected, they will give off a loud pitch noise and get very warm. They will appear to work, but they may very well burn do to the large heat being produced. Unipolar stepper motors can be identified by having three wires pr. coil, so 6 wires coming out of the motor in total. For more info on the difference, Google it!
 +
 
With the board oriented as in the above image, the wires for the steppers are: <br>
 
With the board oriented as in the above image, the wires for the steppers are: <br>
 
A1, B1, B2, A2<br>
 
A1, B1, B2, A2<br>
 
This might be different than what the steppers come mounted as as standard, but changing the order of the  
 
This might be different than what the steppers come mounted as as standard, but changing the order of the  
 
connectors in the housing is pretty straight forward.
 
connectors in the housing is pretty straight forward.
 +
 +
=== Heaters ===
 +
The heater output on the Replicape have rugged connectors, with the heat bed having double connectors for redundancy (in case one wire comes loose) and for handling the power load. These are brand Molex connectors that have both screw terminals for easy fitting and slot in connectors for easy disassembly.
 +
All the heaters are controlled with PWM. The power MOSFETs controlling the output are AON6758 that are rated at 30V, 32A. For a 12V PSU, this means that the maximum power that can be used on the heated bed is 32 A x 12 V = 384 W. Please remember that there is a 20 A fuse preventing such a large power use on the heated bed. The 20 A fuse is installed to keep the traces on the PCB from over heating.
 +
 +
=== Thermistors ===
 +
The thermistor inputs on Replicape have been designed for 100 K NTC thermistors. These are the typical type used for desktop 3D-printers. 10K thermistors can also be used, however the voltage divider setup makes the 100 K thermistors more ideal since the area of most change will be around 100 degrees. TODO: add charts for 10 K and 100 K thermistors showing their ideal temperature for most significant bit change.
 +
 +
=== DS18B20 temperature sensors ===
 +
The connector marked Dallas W1 can be used for connecting temperature sensors of the type DS18B20. These are relatively low temperature sensors that can handle up to 125 degrees Celsius and are typically used for monitoring the cold end of the extruder which should never reach more than around 60 degrees when printing with PLA. The great thing about using a cold end monitor is that the temperature measurements can be used to regulate the fan on the extruder. That way, the noise level can be lowered further than when using the thermistor as a trigger for enabling the extruder fan.
  
 
== Hardware source files ==
 
== Hardware source files ==

Revision as of 22:49, 9 September 2015

Replicape is a high end 3D-printer electronics package in the form of a Cape that can be placed on a BeagleBone Black. This page is about the Major revision B. It has five high power and low noise stepper motors with cool running MosFets and it has been designed to fit in small spaces without active cooling and without the need for physical access to the board once installed. That means no potentiometers to trim or switches to flip.

This page is about the hardware. It explains how to install the board and wire everything up. If you are looking for software that will run, have a look at the Kamikaze CNC image. There are other options as well, but that is the standard that will work for most people.

Availability

There will be a Kickstarter for Replicape Rev B. Once the Kickstarter is done, Replicape can be ordered from the thing-printer web store: http://www.thing-printer.com/product/replicape/

Mounting the Replicape on the BeagleBone.

This should be pretty straight forward, just make sure the notch in the cape goes around the Ethernet connector so it makes a.. cape!

Errata Rev B2

Replicape Revision B2 has a hardware error. This board was only manufactured for beta testing and has "developer edition" clearly shown on the board. The error is that 470K resistors were mounted instead of 4.7K for the thermistor voltage divider. The resistors were manually changed to 5.1K resistors. The thermistor voltage divider resistance value needs to be updated in software to reflect this. Add the following section to the file /etc/redeem/local.cfg

[Heaters]
resistance_e = 5100.0
resistance_h = 5100.0
resistance_hbp = 5100.0

How to wire up the board

The Fritzing board below shows the most basic setup for connecting the board.

Steppers

Only Bipolar stepper motors are supported with these stepper motor drivers (SMD). If unipolar stepper motors are connected, they will give off a loud pitch noise and get very warm. They will appear to work, but they may very well burn do to the large heat being produced. Unipolar stepper motors can be identified by having three wires pr. coil, so 6 wires coming out of the motor in total. For more info on the difference, Google it!

With the board oriented as in the above image, the wires for the steppers are:
A1, B1, B2, A2
This might be different than what the steppers come mounted as as standard, but changing the order of the connectors in the housing is pretty straight forward.

Heaters

The heater output on the Replicape have rugged connectors, with the heat bed having double connectors for redundancy (in case one wire comes loose) and for handling the power load. These are brand Molex connectors that have both screw terminals for easy fitting and slot in connectors for easy disassembly. All the heaters are controlled with PWM. The power MOSFETs controlling the output are AON6758 that are rated at 30V, 32A. For a 12V PSU, this means that the maximum power that can be used on the heated bed is 32 A x 12 V = 384 W. Please remember that there is a 20 A fuse preventing such a large power use on the heated bed. The 20 A fuse is installed to keep the traces on the PCB from over heating.

Thermistors

The thermistor inputs on Replicape have been designed for 100 K NTC thermistors. These are the typical type used for desktop 3D-printers. 10K thermistors can also be used, however the voltage divider setup makes the 100 K thermistors more ideal since the area of most change will be around 100 degrees. TODO: add charts for 10 K and 100 K thermistors showing their ideal temperature for most significant bit change.

DS18B20 temperature sensors

The connector marked Dallas W1 can be used for connecting temperature sensors of the type DS18B20. These are relatively low temperature sensors that can handle up to 125 degrees Celsius and are typically used for monitoring the cold end of the extruder which should never reach more than around 60 degrees when printing with PLA. The great thing about using a cold end monitor is that the temperature measurements can be used to regulate the fan on the extruder. That way, the noise level can be lowered further than when using the thermistor as a trigger for enabling the extruder fan.

Hardware source files

If you want to extend, build or modify Replicape, for the repository: https://bitbucket.org/intelligentagent/replicape

Replicape Revision A4A
The schematic and layout has been done in Eagle V6. The changes from Rev A4 are these:

  • Re-did the layout so top layer is vertical and bottom is horizontal
  • Swapped B1 and B2 on all the steppers so they do not cross in the layout.

Routing and noise
The top layer is mostly vertical traces and the bottom layer is mostly horizontal. Since the board is only two layers, it's important to try to keep with this rule so that both layers can have good ground return. Early designs were troubled by high levels of noise, probably due to insufficient ground return paths, but also due to bad DC-DC converter layout.

Component placement
All components are placed on the top layer to reduce cost of manufacturing. There are two fiducials on the top side to aid in pick and place placement of components.

Board extensions
Revision A4A introduced an extension header for adding more extruders. An extension board would then stack on top of the Replicape. No extension board has been made as of this writing, but the header is kept for future expansions. A total of 3 additional extruders should be possible in addition to three more fans. There is also the MOSI pin from the last serial to parallel converter to enable programming of microstepping etc. for the second board. Look at the schematic to determine the pin-out.

Hardware details

Pins on the BeagleBone used by replicape
Below is a diagram of the pins that have been used on the BeagleBone.

Stepper Motor Controllers
Replicape has 5 stepper motor controllers of the type DRV8825. These can handle up to 2.5A peak current and 1.75 RMS. They are also very immune to short circuit and over heating compared to the A4988 which is much used for 3D printer electronics.

High power MOSFETs
There are also 3 high power MOSFETs for controlling two heater cartridges and one hot bed. The MOSFETs are of the type AON6758 which can handle up to 30V and 32A. The MOSFETs are driven by MOSFET drivers MCP1402 to ensure they are running cool. For a (somewhat dated) discussion, look here: http://hipstercircuits.com/switching-it-up-using-a-comparator-as-a-level-shifter/ A blue LED is mounted next to each of the MOSFETs to indicate when they are on or off. All mosfets on the board are controlled with a single PWM driver of type PCA9685PW.

Low Power MOSFETs
There are 3 low power MOSFETs of the type NIF5002 that can be used for either fans or LED strips etc. The NIF5002s can handle ~4A each at 12V. There is however a limitation in the DC-DC buck converter (RT8268) of 2A.

Thermistor inputs
There are 3 inputs for NTC thermistors. Each input has a filter to suppress high voltage noise spikes coming from the MOSFETs. There is also a separate pin to ground for shielding the cables of the ADCs. All the thermistor inputs have low pass filters for removing noise so normally, there should not be a need for using a shielded cable, but in particularly noisy environments, it might help. Here is a discussion of the problem: http://hipstercircuits.com/noise-on-the-analog-pins-causes-the-adc-sampler-to-go-out-of-whack/

Power management
There are two voltage converters on the Replicape rev A2. Both are of the type DC-DC buck step down converter. One of the converters is based on MCP16321 and is used to supply the 5V necessary for the BeagleBone to function properly. Below is an image of the 5V startup sequence:

On the Rev A3A design, the switching noise on the buck step down regulator can get quite high. If the noise is too high the under voltage protection of the TPS2051 kicks in and disables power on the USB. A quick-fix to this is to add a large value electrolytic capacitor across VDD_5V and ground. Depending on the input voltage (12..24V) anything from 0.1uF up to 1000uF has been tested and worked with 12V input. A somewhat more elaborate, but better approach is to add a ~100R resistor in series with the boost capacitor (C51). This limits the slew rate of the internal N-MOS and lowers the efficiency with approximately 1%. This workaround has been done on the A4 revision.

The 12V step down converter is used to supply 12V to the fans/LED strips.

There is thus no need for any additional power sources beyond a single 12..24V power supply. Below is an image of what the 12V startup sequence looks like:

LC power spikes
This has reportedly been a problem for some stepper motor drivers that use low ESR capacitors as decoupeling capacitors. See pololus discussion of the topic: http://www.pololu.com/docs/0J16/all
Replicape has a high quality electrolytic capacitor mounted on the board to remedy this problem. Here is what the startup looks like. One of the two power pads were probed:

Stepper motor max speed
Todo: measure this.

Power consumption
The following are some sample values for power use with Replicape mounted:
Board booting @24V: 80..130mA
Board running with replicape @24V (5% CPU) 110..120mA
Board booting @12V 110..190mA
Board running with replicape @12V (5% CPU) 150..160mA

MOSFET rise and fall times
Power MOSFET
with a standard 40 W heater element (Hexagon hot end).
rise time: ~60 ns
Fall time: ~250 ns

Troubleshooting

Failed to load slot-0

Depending on which image and kernel you have on your BB, you might see something like this in dmesg:

 [   63.652815] bone-capemgr bone_capemgr.9: loader: failed to load slot-0 BB-BONE-REPLICAP:00A4 (prio 0)

That means there is no device tree overlay for Replicape in /lib/firmware. You can fix this by installing the replicape-devicetree package:

 opkg install replicape-devicetree

This should put the right device tree overlay in your /libs/firmware folder. You need to reboot after that.

Update EEPROM

The EEPROM on the Replicape should be updated when it arrives. If not, here are the instructions on how to update it.

Angstrom

If starting from the [Thing image http://wiki.thing-printer.com/index.php?title=Thing], you need to install nodejs:

 opkg install nodejs

You also need these files:

 wget --no-check-certificate https://bitbucket.org/intelligentagent/replicape/raw/a2b195880014c7c27aabd7c0a8d140c5564007ad/eeprom/replicape_00A4.json
 wget --no-check-certificate https://bitbucket.org/intelligentagent/replicape/raw/a2b195880014c7c27aabd7c0a8d140c5564007ad/eeprom/eeprom.js
 wget --no-check-certificate https://bitbucket.org/intelligentagent/replicape/raw/a2b195880014c7c27aabd7c0a8d140c5564007ad/eeprom/bone.js

Then, make the eeprom content:

 node ./eeprom.js -w replicape_00A4.json

Finally upload the content to the eeprom:

 cat Replicape.eeprom > /sys/bus/i2c/drivers/at24/1-0054/eeprom

Debian

On the Debian/kamikaze image:

 sudo apt-get install nodejs-legacy
 wget https://bitbucket.org/intelligentagent/replicape/raw/f623a0304134b3effcc427a82de1ebbf7cee82bb/eeprom/replicape_0A4A.json
 wget https://bitbucket.org/intelligentagent/replicape/raw/a2b195880014c7c27aabd7c0a8d140c5564007ad/eeprom/eeprom.js
 wget https://bitbucket.org/intelligentagent/replicape/raw/a2b195880014c7c27aabd7c0a8d140c5564007ad/eeprom/bone.js
 node ./eeprom.js -w replicape_0A4A.json
 cat Replicape.eeprom > /sys/bus/i2c/drivers/at24/2-0054/nvmem/at24-1/nvmem

Please note the address on the I2C bus, it might be 55, 56 or 57 depending on your settings.

Testing Replicape

A script is available for testing the board. This is inteded for manufacturers, but could be useful for end-users as well. To install the test script do the following. Install the test script package:

 opkg install replicape-test

Use the "testing" config file for Redeem:

 cd /etc/redeem
 ln -s Testing.cfg printer.cfg

Finally, since the boards to test/flash do not have eeprom when plugged in, it must be enabled through the command line.

 mkdir /media/mmc1
 mount /dev/mmcblk0p1 /media/mmc1/
 echo "optargs=drm.debug=7 capemgr.enable_partno=BB-SGX,BB-BONE-REPLICAP:0A4A consoleblank=0 vt.global_cursor_default=0" > /media/mmc1/uEnv.txt