FRCTeam3206 / Electrical

Container for Electrical team. Includes to-do, issues, shopping, coordination and communication.
3 stars 1 forks source link

Mini Bots - Zumo Bot #19

Open RajGandhi opened 7 years ago

RajGandhi commented 7 years ago

To do: archive some of the code here.

Add to do list for improvements / add-ons. (with priority)

RajGandhi commented 7 years ago

Buzzer works. It only required a jumper to be soldered.

Try Eval_Zumo_Speaker.ino example.

RajGandhi commented 7 years ago

(Update, it works now. Hardware cut and jump required.) SD card (CAN shield) doesn't work on the Zumobot. There's a conflict with DIO pin 8 "CS" on the SD card (CAN shield) and the Zumobot. Zumobot uses DIO pin 8 for motor control. See ref docs: https://www.pololu.com/docs/pdf/0J57/zumo_shield_for_arduino.pdf Zumomotors.cpp and Zumomotors.h

The example Eval_Zumo_SD_Cardinfo.ino works when disconnected from Zumo (only Arduino and CAN shield connected).

CAN shield (SD Card) schematic. http://cdn.sparkfun.com/datasheets/Dev/Arduino/Shields/SparkFun_CAN-Bus_Shield_v13a.pdf CAN product link https://www.sparkfun.com/products/13262. Link has other resources including schematic, datasheets, hookup guide, github links for software library.

RajGandhi commented 7 years ago

Not many IO lines are available after Zumo. DIO6, DIO11 are available. Maybe DIO2. Probably DIO 0 and 1 are available.

Now using DIO6 for SD Card. Now using DIO11 for laser pointer.

A0, A2 and A3 are available.

RajGandhi commented 7 years ago

Vbat monitor is challenging because it can't be tested while plugged-in to a USB port. Try this:

RajGandhi commented 7 years ago

Try to make a better and battery saving laser driver using a DRV8838 dc motor driver.

The DRV8838 likes a PWM input. Look at Arduino spec to determine which pins have hardware PWM output. Pin D11 probably doesn't. :/ Look at Arduino specs to see if it is same "PWM". If so, it would be nice and possibly reduce sw overhead.

Hardware PWM is available on pin 11.

Connections (DRV8838 breakout || Zumo shield) GND || GND VCC || Arduino +5V regulated Enable || DIO11 Phase || GND (possibly put a switch or jumper; it determines output polarity) Sleep || open Vin || Vbat Out2 || LED - Out1 || LED + Vmm || open

RajGandhi commented 7 years ago

Laser Software.

  1. Try to output 10% duty cycle constant. Check polarity and voltage. Voltage will probably be high no-load.

Works. Default is dim. Level-change is tied to button press. There's an interaction the tones emitted for battery voltage. It works but not quite as expected.

To do: move input for Laser level change to a different DIO and control it remotely (transceiver).