Skip to content

Shaische/opengrab_epm_v3

 
 

Repository files navigation

OpenGrab EPM v3

Join the chat at https://gitter.im/Zubax/general

OpenGrab EPM v3 is an electropermanent magnet, combining the advantages of electro and permanent magnets. It has been developed by NicaDrone in collaboration with Zubax Robotics.

Useful links:

Building the firmware

Prerequisites

  • Python 2.7+ or Python 3.2+
  • ARM GCC Embedded 4.9+

Building

After cloning this repository, execute the following:

git submodule update --init --recursive
cd firmware
make -j8

The build outputs will be available in the directory build/.

Flashing the firmware

Useful info

  • If you do not cycle the EPM you cannot get zapped.
  • Don't zap your computer it will not survive.
  • HV section to avoid touching during debug, see fig. 1.
  • Solder Jumper settings see fig. 1 and 2.

V3 Rev 4B and earlier

Figure 1

V3 Rev 5C

Figure 1

Via UART

Connecting USB-UART adapter

FTDI cable is the recommended USB-UART adapter. 5 V and 3.3 V FTDI cables work fine, 3.3 V is recommended. Use the following pinout when connecting:

Wire Signal
Orange RXD
Yellow TXD
Black GND

Flashing with NXP Flash Magic (simplest method)

Get the flashing tool from http://www.flashmagictool.com/. Start the tool, then configure it as follows:

Parameter Value
Select Device LPC11C24/301
Baud rate 115200
Interface ISP
Oscilator 12 MHz
File Prebuilt .hex available here **
  1. Connect the USB-UART adapter.
  2. Close J3 to select serial bootloader.
  3. Close J4 to force the LPC to start the bootloader.
  4. Power up the board.
  5. Run the flashing tool.

** .hex is also created in the build output directory firmware/build or a .hex file can be created from .bin:

arm-none-eabi-objcopy -I binary -O ihex firmware.bin out.hex

Via DroneCode Probe

DroneCode Probe is a generic JTAG / SWD + UART console adapter compatible with most ARM Cortex based designs and in particular with hardware maintained by the DroneCode project.

In order to flash the board using this tool, simply connect the debugger and execute the script blackmagic_flash.sh.

Via 8devices USB2CAN and embedded CAN bootloader

Note to Windows users: In order to use USB2CAN in a VM the drivers have to be installed on the host and driver signature enforcement has to be disabled in some versions of Windows.

Register the CAN interface with SocketCAN:

sudo ip link set can0 up type can bitrate 100000 sample-point 0.875

Uploading binary using LPC11 embedded CAN bootloader:

tools/drwatson/lpc11c00_can_bootloader.py can0 firmware/build/firmware.bin

Licenses

Firmware

Copyright (C) 2015 Zubax Robotics [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Hardware

The hardware sources are distributed under the terms of CC BY-SA 4.0.

Packages

No packages published

Languages

  • C 79.8%
  • C++ 19.2%
  • Other 1.0%