Skip to content

Commit

Permalink
update current reading note
Browse files Browse the repository at this point in the history
unlike pololu/dual-vnh5019-motor-shield we include ATmega1280, and ATmega2560 in the note for this library
  • Loading branch information
photodude authored May 12, 2018
1 parent b8b0a5d commit 5e86ecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Returns 1 if there is a fault on motor driver 4, 0 if no fault.
### Current readings

The current readings returned by `getM1CurrentMilliamps`, `getM2CurrentMilliamps`, `getM3CurrentMilliamps` and
`getM4CurrentMilliamps` will be noisy and unreliable if you are using a PWM frequency below about 5 kHz. We expect these readings to work fine if you are using a board based on the ATmega168, ATmega328P, or ATmega32U4, since this library uses 20 kHz hardware PWM on those boards.
`getM4CurrentMilliamps` will be noisy and unreliable if you are using a PWM frequency below about 5 kHz. We expect these readings to work fine if you haven't remapped the PWM pins and you are using a board based on the ATmega168, ATmega328P, ATmega328PB, ATmega32U4, ATmega1280, or ATmega2560 since this library uses 20 kHz hardware PWM on those boards.

On other boards, this library uses `analogWrite` to generate PWM signals, which usually means that the PWM frequency will be too low to
get reliable current measurements. If `analogWrite` uses a frequency of 490 Hz or more on your board, you can add a 1 µF (or larger) capacitor between each current sense line you are using and GND. To make `getM1CurrentMilliamps` work well, you would add the capacitor between M1CS and GND. To make `getM2CurrentMilliamps` work well, you would add the capacitor between M2CS and GND.
Expand Down

0 comments on commit 5e86ecc

Please sign in to comment.