My adventures with a Raspberry Pi and Arduino programming

Posts tagged ‘pins’

AJ Arduino pin usage

I need to ensure I have enough oomph in my hardware. For this I need to know that I have both enough PINs for all my hardware, and enough power for my application.

PINs in use on my Arduino Pro Mini

  • 0 Serial RX – SD card
  • 1 Serial TX – SD card
  • 2 INT0 – Software serial radio RX
  • 3 INT1 PWM – Ascent/descent
  • 4 T0 – Software serial radio TX
  • 5 T1 PWM – Forward / aft
  • 6 AIN0 PWM – Turn port/starboard
  • 7 AIN1 – free
  • 8 CLK0 – free
  • 9 OC1A PWM – free
  • 10 I2C SS PWM – free
  • 11 SPI MISO – free
  • 12 SPI MOSI PWM – free
  • 13 SPI SCK LED – free
  • 14 A0 ADC0 – free
  • 15 A1 ADC1 – free
  • 16 A2 ADC2 – free
  • 17 A3 ADC3 – free
  • 18 A4 ADC4 I2C SDA – I2C rangefinders x 6, 9 DoF sensor (accelerometer, gyro, magnetometer)
  • 19 A5 ADC5 I2C SCL – I2C rangefinders x 6, 9 DoF sensor (accelerometer, gyro, magnetometer)
  • A6 ADC6 Analog only – charging current
  • A7 ADC7 Analog only – low voltage

Power usage

Item Min Typ Max
Sharp 10cm-80cm sensors (6) ? 30 mA * 6 40 mA
 SparkFun I2C Rangefinders (6)  0.3 1.7 mA * 6  ?
 9 DoF sensor  Accel’ 0.4 mA (10Hz)

Gyro 6.5 mA

Magne’ 0.1mA

 Arduino (hi power mode)  0.5 mA  4.13 mA  4.13 mA
 Current monitor  0 (on arduino)
 Low voltage monitor  ? TBD
 SD card reader/writer  2 mA  5 mA  6 mA
 Radio tx/rx (BLE Nano)  4.7 mA  8.0 mA  11.8 mA
 Copter circuitry itself (max)  ?  3258 mA (3.3A)  ?
 Totals    Elec: 214.33
Copter: 3258
Total: 3473 mA
 

The above default power usage stats with a modified 2000mAh/3.7V battery give a fully operating flight time of at least 34.5 minutes.

We can probably halve the electronics’ power usage, but this would only get us to 35.6 minutes flight time – so what’s the point? We will have to test the actual flying at low speed to see how long the copter will fly itself around. I’m guessing the actual flight time will end up nearer an hour with the bigger 2000mAh battery I’ll be using.

Eventually if the bot ends up performing tasks without the rotors on (observation from a static point perhaps?) then looking at power savings in the electronics begins to make sense. As a bare minimum I’ll shut the sensors off when the bot is stationary. (landed)

Advertisements