Welcome! Log In Create A New Profile

Advanced

SAM4S MINI board

Posted by Dev00 
SAM4S MINI board
November 17, 2019 10:03AM
I intended to make a small 3D printer/CNC board with network connectivity from quite some time. The current version size: 82x60 mm:



Features:
- 4 Stepper motor divers
- 2/3 Analog inputs (depending on network connectivity)
- Analog or digital Z-probe support
- 1 heated bed, 1 extruder, 1 fan control
- Micro SD-card
- I2C and I2S expansion ports
- USB 2.0 interface
- 4 End-stops including end-stops via current measuring on every stepper motor driver
- Network connectivity: Ethernet (W5500 module) or WiFi (ESP8266)
- 2 layer board, inexpensive to order (it might require applying additional solder on some power tracks and vias depending on desired current requirements)
- Firmware: RepRap, Klipper

This is intended as DIY project … It has not been tested yet. I ordered 10 PCBs from China have to wait probably a month to receive them. Do not really need so many if anyone is interested I can provide for free some bare PCBs for testing, fw development etc.

The design files need some rework, cleaning etc. Any interest to make them publicly available ?

Edited 2 time(s). Last edit at 11/18/2019 09:00AM by Mitko.
Re: SAM4S MINI board
March 11, 2020 06:25AM
After a huge delay associated with the procurement of PCBs and parts from China, the first prototype was completed. The pictures bellow show the Ethernet version. Unfortunately the PCB contains some errors, that need to be fixed in the next versions.





The board is currently being tested and RepRapFirmware porting is in progress.

Edited 3 time(s). Last edit at 03/12/2020 03:28AM by Dev00.
Re: SAM4S MINI board
December 06, 2020 07:32AM
WiFi version - external antenna



Edited 1 time(s). Last edit at 12/06/2020 07:32AM by Dev00.
Re: SAM4S MINI board
December 07, 2020 02:28AM
Is it working?



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: SAM4S MINI board
December 07, 2020 06:54AM
@dc42,

It is currently being tested. It works, except some minor issues: ESP8266 firmware upload. I use for the WiFi version KineticaG2 RRF. With the mainstream RRF, getting some errors:

Invoking: Cross G++ Linker
arm-none-eabi-gcc -L"C:\Eclipse\RRFLibraries\SAM4S_RTOS" -L"C:\Eclipse\FreeRTOS\SAM4S" -L"C:\Eclipse\CoreNG\SAM4S" --specs=nosys.specs -Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m4 -T"C:\Eclipse\CoreNG\variants\sam4s\linker_scripts\gcc\flash.ld" -Wl,-Map,"C:\Eclipse\RepRapFirmware\DuetM_RTOS/DuetMaestroFirmware.map" -o "DuetMaestroFirmware.elf" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\Eclipse\CoreNG/SAM4S/cores/arduino/syscalls.o" ./src/libcpp/eh_alloc.o ./src/libcpp/vterminate.o ./src/libc/memcmp.o ./src/libc/memcpy.o ./src/libc/memmove.o ./src/libc/memset.o ./src/libc/nano-mallocr.o ./src/libc/strptime.o ./src/Tools/Filament.o ./src/Tools/Spindle.o ./src/Tools/Tool.o ./src/Storage/CRC32.o ./src/Storage/FileInfoParser.o ./src/Storage/FileStore.o ./src/Storage/MassStorage.o ./src/ObjectModel/ObjectModel.o ./src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/W5500/w5500.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/WizSpi.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/wizchip_conf.o ./src/Networking/W5500Ethernet/MdnsResponder.o ./src/Networking/W5500Ethernet/W5500Interface.o ./src/Networking/W5500Ethernet/W5500Socket.o ./src/Networking/FirmwareUpdater.o ./src/Networking/FtpResponder.o ./src/Networking/HttpResponder.o ./src/Networking/Network.o ./src/Networking/NetworkBuffer.o ./src/Networking/NetworkInterface.o ./src/Networking/NetworkResponder.o ./src/Networking/TelnetResponder.o ./src/Networking/UploadingNetworkResponder.o ./src/Movement/StepperDrivers/DriverMode.o ./src/Movement/StepperDrivers/TMC22xx.o ./src/Movement/StepperDrivers/TMC2660.o ./src/Movement/StepperDrivers/TMC51xx.o ./src/Movement/Kinematics/CoreKinematics.o ./src/Movement/Kinematics/FiveBarScaraKinematics.o ./src/Movement/Kinematics/HangprinterKinematics.o ./src/Movement/Kinematics/Kinematics.o ./src/Movement/Kinematics/LinearDeltaKinematics.o ./src/Movement/Kinematics/PolarKinematics.o ./src/Movement/Kinematics/RotaryDeltaKinematics.o ./src/Movement/Kinematics/ScaraKinematics.o ./src/Movement/Kinematics/ZLeadscrewKinematics.o ./src/Movement/HeightControl/HeightController.o ./src/Movement/BedProbing/Grid.o ./src/Movement/BedProbing/RandomProbePointSet.o ./src/Movement/DDA.o ./src/Movement/DDARing.o ./src/Movement/DriveMovement.o ./src/Movement/Move.o ./src/Movement/RawMove.o ./src/Movement/StepTimer.o ./src/Movement/StraightProbeSettings.o ./src/Libraries/sha1/sha1.o ./src/Libraries/Fatfs/diskio.o ./src/Libraries/Fatfs/fattime_rtc.o ./src/Libraries/Fatfs/ff.o ./src/Libraries/Fatfs/ffunicode.o ./src/Heating/Sensors/AdditionalOutputSensor.o ./src/Heating/Sensors/CpuTemperatureSensor.o ./src/Heating/Sensors/CurrentLoopTemperatureSensor.o ./src/Heating/Sensors/DhtSensor.o ./src/Heating/Sensors/LinearAnalogSensor.o ./src/Heating/Sensors/RemoteSensor.o ./src/Heating/Sensors/RtdSensor31865.o ./src/Heating/Sensors/SensorWithPort.o ./src/Heating/Sensors/SpiTemperatureSensor.o ./src/Heating/Sensors/TemperatureSensor.o ./src/Heating/Sensors/Thermistor.o ./src/Heating/Sensors/ThermocoupleSensor31855.o ./src/Heating/Sensors/ThermocoupleSensor31856.o ./src/Heating/Sensors/TmcDriverTemperatureSensor.o ./src/Heating/FOPDT.o ./src/Heating/Heat.o ./src/Heating/Heater.o ./src/Heating/HeaterMonitor.o ./src/Heating/LocalHeater.o ./src/Heating/RemoteHeater.o ./src/Heating/TemperatureError.o ./src/Hardware/Cache.o ./src/Hardware/CanDriver.o ./src/Hardware/DmacManager.o ./src/Hardware/I2C.o ./src/Hardware/IoPorts.o ./src/GPIO/GpInPort.o ./src/GPIO/GpOutPort.o ./src/GCodes/GCodeBuffer/BinaryParser.o ./src/GCodes/GCodeBuffer/ExpressionParser.o ./src/GCodes/GCodeBuffer/GCodeBuffer.o ./src/GCodes/GCodeBuffer/StringParser.o ./src/GCodes/GCodeException.o ./src/GCodes/GCodeFileInfo.o ./src/GCodes/GCodeInput.o ./src/GCodes/GCodeMachineState.o ./src/GCodes/GCodeQueue.o ./src/GCodes/GCodes.o ./src/GCodes/GCodes2.o ./src/GCodes/GCodes3.o ./src/GCodes/GCodes4.o ./src/GCodes/ObjectTracker.o ./src/GCodes/RestorePoint.o ./src/GCodes/Trigger.o ./src/FilamentMonitors/Duet3DFilamentMonitor.o ./src/FilamentMonitors/FilamentMonitor.o ./src/FilamentMonitors/LaserFilamentMonitor.o ./src/FilamentMonitors/PulsedFilamentMonitor.o ./src/FilamentMonitors/RotatingMagnetFilamentMonitor.o ./src/FilamentMonitors/SimpleFilamentMonitor.o ./src/Fans/DotStarLed.o ./src/Fans/Fan.o ./src/Fans/FansManager.o ./src/Fans/LocalFan.o ./src/Fans/RemoteFan.o ./src/Endstops/Endstop.o ./src/Endstops/EndstopsManager.o ./src/Endstops/LocalZProbe.o ./src/Endstops/RemoteZProbe.o ./src/Endstops/StallDetectionEndstop.o ./src/Endstops/SwitchEndstop.o ./src/Endstops/ZProbe.o ./src/Endstops/ZProbeEndstop.o ./src/DuetM/Pins_DuetM.o ./src/Display/ST7920/glcd11x14.o ./src/Display/ST7920/glcd7x11.o ./src/Display/ST7920/lcd7920.o ./src/Display/Display.o ./src/Display/Menu.o ./src/Display/MenuItem.o ./src/Display/RotaryEncoder.o ./src/CAN/CanInterface.o ./src/CAN/CanMessageGenericConstructor.o ./src/CAN/CanMotion.o ./src/CAN/CommandProcessor.o ./src/CAN/ExpansionManager.o ./src/Logger.o ./src/OutputMemory.o ./src/Platform.o ./src/PortControl.o ./src/PrintMonitor.o ./src/RepRap.o ./src/RepRapFirmware.o ./src/Roland.o ./src/Scanner.o ./src/SoftwareReset.o ./src/Tasks.o -lRRFLibraries -lFreeRTOS -lCoreNG -lsupc++ -Wl,--end-group -lm
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/Networking/FirmwareUpdater.o: in function `FirmwareUpdater::IsReady()':
FirmwareUpdater.cppsad smiley.text._ZN15FirmwareUpdater7IsReadyEv+0x10): warning: undefined reference to `WifiFirmwareUploader::IsReady() const'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/Networking/Network.o: in function `Network::Init()':
Network.cppsad smiley.text._ZN7Network4InitEv+0x18): warning: undefined reference to `Platform::IsDuetWiFi() const'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: Network.cppsad smiley.text._ZN7Network4InitEv+0x2c): warning: undefined reference to `WiFiInterface::WiFiInterface(Platform&)'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/Networking/Network.o: in function `Network::HandleWiFiCode(int, GCodeBuffer&, StringRef const&, OutputBuffer*&)':
Network.cppsad smiley.text._ZN7Network14HandleWiFiCodeEiR11GCodeBufferRK9StringRefRP12OutputBuffer+0x3a): warning: undefined reference to `WiFiInterface::HandleWiFiCode(int, GCodeBuffer&, StringRef const&, OutputBuffer*&)'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/RepRap.o: in function `RepRap::GetConfigResponse()':
RepRap.cppsad smiley.text._ZN6RepRap17GetConfigResponseEv+0x11c): warning: undefined reference to `Platform::IsDuetWiFi() const'
collect2.exe: error: ld returned 1 exit status
makefile:80: recipe for target 'DuetMaestroFirmware.elf' failed
make: *** [DuetMaestroFirmware.elf] Error 1

Is there a G-code command that can be used for UART debugging, custom UART commands or UART monitor ?

Had quite decent file transfer rates with this WiFi module – above 600 kB/s.

Edited 2 time(s). Last edit at 12/07/2020 07:38AM by Dev00.
Re: SAM4S MINI board
December 09, 2020 05:11AM
This looks awesome and is exactly what I'd want to ressurect some old printers. I have one request, can you break out the CAN bus lines of the CPU onto a header? It would be great if one could talk to the duet CAN expansion boards. Are the paneldue tx/rx lines broken out somewhere too? they are handy for hacking.

If you have extra PCBs I would be happy to build one up and test it in a corexy or a gus simpson that could use new controller boards.
Re: SAM4S MINI board
December 09, 2020 08:36AM
Quote
John Meacham
I have one request, can you break out the CAN bus lines of the CPU onto a header? It would be great if one could talk to the duet CAN expansion boards.

I don’t think a CAN interface is available on SAM4S, there is a topic on Duet3D forum - Creating a CANBUS adapter for Duet 2.
Probably @dc42 might be able to provide more clarifications about the Duet expansion board requirements. Duet3D announced some time ago a new product: based on ATSAME54P20A - Duet 3 Mini 5+ with CAN bus.

ATSAME51J19A might be an appropriate upgrade for such type of board. The prices of SAM4S and SAME51 are the same.

Quote
John Meacham
Are the paneldue tx/rx lines broken out somewhere too? they are handy for hacking.

UART0 – RX/TX signals are connected to connector J25. When an ESP8266 module is installed, RX/TX signals are used just for the firmware upload. They could be disconnected from the WiFi module and used for other purposes.

Quote
John Meacham
If you have extra PCBs I would be happy to build one up and test it in a corexy or a gus simpson that could use new controller boards.


I have some. They need some minor mods. One of the Erase button signals needs to be rerouted and make stronger the wiring of the power supply to the heated bed MOSFET. Depiced bellow on the picture. If you would like to build some, send me a PM with your address, I can send you by postal service some. Will post on this topic the schematic, PCB layout ... later.



Edited 5 time(s). Last edit at 12/09/2020 12:56PM by Dev00.
Re: SAM4S MINI board
December 10, 2020 01:53AM
Quote

I don’t think a CAN interface is available on SAM4S

Correct. The SAM4E used in Duet 2 does support CAN, but not CAN-FD.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: SAM4S MINI board
December 12, 2020 07:37AM
Would it be possible to use a MCP2518FD daughterboard on the SPI header? It's a full CAN-FD implementation in a 2 dollar chip. looks pretty neat. If that works I'd love to add it to the duet 2 in my toolchanger as well. I'd be willing to do dev work on the firmware to support it if needed. Hmm.. I can't see if the SPI port is broken out on the MINI board though.
Re: SAM4S MINI board
December 12, 2020 10:49AM
Quote
John Meacham
Hmm.. I can't see if the SPI port is broken out on the MINI board though.

There is a SPI header. It can be accessed via wires or pin header soldered from the bottom side of the board in case ES8266 module, or splitting cable – W5500 module.

I looked briefly at MCP2518FD datasheet, it seems it needs two more input/outputs (this requires additional evaluation) – INT and nCS. Probably - PB14 and Estop (PA17 – J24 pin 4 ) can be used.



Edited 1 time(s). Last edit at 12/12/2020 10:51AM by Dev00.
Re: SAM4S MINI board
December 16, 2020 10:06AM
SAM4S MINI board schematic and PCB layout views – top and bottom:

SAM4S_MINI_V1_sch.pdf
V1_PCB_top.pdf
V1_PCB_bottom.pdf
Sorry, only registered users may post in this forum.

Click here to login