Mechaduino servo - group-build?

I will be at the space this Thursday evening. Come by and get your kits.

If @rsim and @packetbob are up for it, maybe they’ll try one with the solder paste, stencil, and toaster method.

Otherwise @LoialOtter and I will be hand-soldering a couple boards. We started on Tuesday and are about half-done.

1 Like

Thanks for getting those together. I can’t make it this Thursday but
looking forward to building this sometime next week.

I think I can make it this Thursday…
If nothing else I can drop off the oven for you to use…

1 Like

I’ll do one of my boards if you bring the oven.

Did @rsim leave his solder stencil jig at VHS?

I will be there around 7:00ish…
Keep in mind I only have leaded solder and these boards are double sided…
So the second side may have to be done by hand…

1 Like

There’s a lot of debate about this on the openpnp lists. The general consensus seems to be that any parts 0805 or less will remain in place with the surface tension if inverted. People seem to recommend supporting the boards by the corners in the oven.

https://groups.google.com/forum/#!searchin/openpnp/glue|sort:relevance/openpnp/8_KoQ2A673o/Vbi5_QnDBgAJ

I have some of the red glue avail if you want to try it.

1 Like

Okay - I programmed a few units with their bootloaders.
The bootloader can be downloaded from: ArduinoCore-samd/bootloaders/zero/samd21_sam_ba.bin at master · arduino/ArduinoCore-samd · GitHub

I used J-Link Commander (My J-Link is left in the locker for now - I’ll grab it in a week or two - mine’s modified to directly program with 3.3V applied and uses a custom connector)

the following sequence of commands were used in the JLink Commander interface:
connect
(Device): ATSAMD21G18
(Interface): S (for SWD)
(Speed): (for default)

To which it replied with some info about the chip ending with “Cortex-M0 identified”
then:
erase
loadbin (Absolute location of file) 0x08000000

It’ll say status ending with “O.K.”
After this you can program it using the Arduino application.

These probably aren’t the best directions but I need to go to bed and still have to drive to surrey - hope it helps someone else figure it all out too.
J-Link Commander is part of the Segger J-Link application. There are alternatives such as OpenOCD or using Atmel Studio ( Restoring Bootloader | Proper Debugging of ATSAMD21 Processors | Adafruit Learning System covers most of this)

Thanks for an awesome project!

1 Like

A couple of photos showing how the JLink is hooked up to a board to program the bootloader,

So I used the OSH solder stencil and baked my board in the reflow oven.

Reflowed top layer only.

I still have to do the bottom layer by hand but it has minimal components on it. Also connectors still to be done.

Thanks to @packetbob for reflow oven, @LoialOtter and @lukecyca for help cleaning up the few solder shorts between the chips pins.

smd 402’s are small but not impossible.

Mark

3 Likes

Finished soldering the second side of my board. Plugged it into my USB port.

Output Power levels from the AP2112k-3.3 Regulator Chip is reading about 4.4 volts instead of 3.3V. Not sure if this is an issue? Thoughts?

I was able to connect to my board via USB and program the Mechaduino Firmware. Will do motor test once I get board mounted to motor with magnet.

Output from Arduino compile and upload to board.

Sketch uses 96,408 bytes (36%) of program storage space. Maximum is 262,144 bytes.
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v2.0 [Arduino:XYZ] May 9 2016 16:06:46
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.590 seconds

Write 96668 bytes to flash (1511 pages)

[= ] 4% (64/1511 pages)
[== ] 8% (128/1511 pages)
[=== ] 12% (192/1511 pages)
[===== ] 16% (256/1511 pages)
[====== ] 21% (320/1511 pages)
[======= ] 25% (384/1511 pages)
[======== ] 29% (448/1511 pages)
[========== ] 33% (512/1511 pages)
[=========== ] 38% (576/1511 pages)
[============ ] 42% (640/1511 pages)
[============= ] 46% (704/1511 pages)
[=============== ] 50% (768/1511 pages)
[================ ] 55% (832/1511 pages)
[================= ] 59% (896/1511 pages)
[=================== ] 63% (960/1511 pages)
[==================== ] 67% (1024/1511 pages)
[===================== ] 72% (1088/1511 pages)
[====================== ] 76% (1152/1511 pages)
[======================== ] 80% (1216/1511 pages)
[========================= ] 84% (1280/1511 pages)
[========================== ] 88% (1344/1511 pages)
[=========================== ] 93% (1408/1511 pages)
[============================= ] 97% (1472/1511 pages)
[==============================] 100% (1511/1511 pages)
done in 0.571 seconds

Verify 96668 bytes of flash with checksum.
Verify successful
done in 0.070 seconds
CPU reset.

Are the kits in the dropbox?

If the output from the regulator is not 3.3 you very likely have a problem somewhere. A lot of parts are 3.3 to 5.0 tolerant which may explains why smoke hasn’t escaped yet. I would look into it before applying power again just in case.

2 Likes

So doing a bit more research here it looks like the 3.3V regulator spec’d in the Mechaduino Schematic is

AP2112K-3.3

The regulator that was supplied with this kit is

AP2202. Pin 4 is a Bypass/Adjust circuit which is currently not connected on the circuit board .

As the AP2202 needs some additional circuitry on pin 4 my guess is that the input for the bypass circuitry is floating and Vin is being passed directly through to Vout.

Sooo… careful of that magic smoke folks :slight_smile:

Does anyone have any AP2112K-3.3’s kicking around?

Mark

1 Like

Looks like the version of regulator we have is AP2202K-ADJ, which is an adjustable version. It could be replaced with an AP2112K-3.3, or AP2202K-3.3, or deadbug soldered to set the voltage. This is what I’ll probably do, if the fixed voltage versions don’t materialise. (They’re common parts, so someone might have them, or they might be in our parts bins)

image

image

So R1 and R2 will have to be deadbug soldered to the proper pins. Acceptable values could be:
R1 = 2K
R2 = 3.3K

2 Likes

As I mentioned on slack I have 6 x AAT3221IGV-3.3-T1 that we believe are pin compatible (enable is the same polarity too). They’ll need to be picked up from my place near the PNE, am around until Wed night. 50c ea if that’s ok.

I’ve ordered 40 pieces of AP2112K-3.3TRG1DICT-NDfrom Digikey.

Total cost with shipping is $28.60.

I think there will be some tax added to that as well.

So Approx. $0.72 per regulator.

2 Likes

Usually not with Digikey if you’ve ordered in CAD.

1 Like

40 3.3V regulators have arrived. Replaced the regulator on my board and voltage reading is now reading 3.28v so all good.

I’ve put them in with the rest of the Mech parts in the bin. If you need your parts mailed to you leave a note here and we shall see what we can do. I’ve taken 2 so 38 left.

Total with shipping and taxes was $31.07 or 78 cents each. I don’t have time to collect cash from folks so consider making an equivalent donation to VHS.

2 Likes

I am fairly certain that SAMD21 microprocessor on my first Mechaduino board has been fried.

The SAMD21 Data sheet says max voltage is 3.8V and it had 4.4V with previous the regulator.

Clock is getting to it. Voltage levels are now correct at 3.3V. There was no response from running the standard Blinky sketch (updated with the correct pin to match the board). I’ve verified that the board LED is working by shorting source to drain on Q2. Also tried a few digital writes to a few other pins with no results showing on the scope.

So today I’ve assembled my second board which brings me to Bootloaderz!

I’m guessing the Bus Pirate can do it. We have one at VHS.

I am wondering if anyone has a bit of time to walk me through this? I’d like to learn more about this.

@LoialOtter left his bootloader last week in the Mechaduino locker. It’s connected to the hacky pogopin setup I made, which has pins that can be pressed into the corresponding unpopulated holes on your board. I believe with that you can simply program the bootloader using the Arduino IDE. You will need to download board support for Arduino Zero if you haven’t done so already.

That’s too bad about your first board. Mine came to life and I could communicate with it over serial. It did appear a bit flakey though which could be the same voltage issue.

Thanks for purchasing new regulators. I’ve added this to my list of small issues that I plan to send back to the Mechaduino folks to update their BOM.