- wk10
- ∨ phototransistor breakout board
- ∨ design a motor driver board
- ∨ burnt photoresistor
- ∨ no serial print
redesign phototransistor circuit
breakout these phototransistors onto their own boards
goals:
• more flexibility with board
• more pin outs
• can place sensors anywhere with jumpers
how to hook up phototransistor source
V2 motor driver board
v2 motor driver board with pinouts
redesign driver board
• see A4950 driver chip
• refer to neil's A4953
• installed schottky diode on 5v line, so that it doesn't reverse into my computer
• forward voltage / side for diode (pointy direction of triangle) is the cathode, has a line on the component.
i didn't look at the pinout diagram when i designed the board. whoops.
i designed them around "convenience" and "location".
motor driver traces png
pin-out southside:
pin 22 > PA23
pin 20 > PA19
pin-out northside:
pin 1 > PA00
pin 3 > PA02 - ANALOG
pin 5 > PA04 - ANALOG
pin 7 > PA06 - ANALOG
motor driver pins:
pin 12 > PA09 - ANALOG
pin 14 > PA11 - ANALOG
motor driver outline png
SAMD21 datasheet 33.8.8 (pg 804) lists Analog pins (0-19 ?)
quentin's SAMD21 pinout
mtm SAMD21 pinout
v1, v1.1, v2
phototransistor breakouts
breadboard
reflowed only mcu and swd, used heat gun
v2 motor driver
edbg on linux
openocd didn't work again (same error)
doing it wrong (trying to boot thru usb)
edbg worked on linux over ATMEL ICE
debugging phototransistors
since i can't bootload both v1 and v2
debug with leonardo
aren't burnt out
Leonardo: I can read voltage on the phototransistor breakout board,
but not through phototransistor
only use ANalog pins
phototransistor doesn't work, only resistor values
phototransistor breakouts
debugging with a Leonardo
no serial print
able to upload on IDE
compiler settings - are fine
Arduino IDE (v18) able to load sketches
but weird that the board doesn't run the sketch.
serial print doesn't work. (nothing shows up)
board probably doesn't save sketch
serial print works on the Leonardo.
Get Board Info
doesn't see sketch, or serial number
debugging:
• not plugged in: Multimeter shows no shorts.
• plugged in: Multimeter shows ~5V from 5v to GND, and ~3.2V from 3.3V to GND.
• plugged in: voltage across vddcore capacitor reads ~1.2V
• baud rates are the same on sketch and serial monitor
• tried different baudrates
• changed 'Serial' to 'SerialUSB' in sketch. nothing
probably a board issue:
(Not a Mac M1 issue. Tried it on another Macbook with Intel core.)
quentin suggests booting again.
burn bootloader
• need 2 usb ports !
• 2x5 JTAG SWD cable (thnks anthony)
• arduino 1.8
quentin and the ebdg guy fixed the edbg issues with Mac M1 this week!
"Removed MacOS dependency on hidapi library, native APIs are used"
• update "fab sam" library to v1.11 on arduino board manager
"burn bootloader" - success!
D11C bootloader via SWD to D21
serial test
number count - serial test sketch
keep counting!
simple h-bridge
one pin HIGH
one pin LOW
h-bridge sketch
motor runs!