I chose to use the Arduino Due at a very early stage of this project. Partly I fell into it from curiosity after previously using an Arduino Uno, but there were a few concrete reasons too:
- Cheap. Through injudicious application of 12 volts, I've killed two boards already. Blowing up $100 equipment would be stressful, but since the Due can be had for 20AUD (ebay, aliexpress), it's more nuisance than disaster.
Five Dues. Two dead. One in use. Two more ready to go.
- Range of peripherals. The Due's SAM3X8E (link to 1459 page pdf datasheet) has peripherals I need and a bunch more that are just convenient.
- ADC: To digitize the incoming signal.
- PWM: For output of the 40kHz, variable duty cycle signal.
- USB: For programming and debugging.
- SPI: Desirable for running all kinds of peripherals.
- DAC: outputting an audio signal is a useful debug tool.
- Timers: useful for generating audio tones.
- GPIO: The Due has loads of GPIO pins for reading user input and flashing the odd LED.
- And more I won't use for this project: CAN bus, Ethernet, IIC, external RAM, external Flash, SDCard reader/writer.
- ARM Architecture. I've been wanting to work with ARM for a while.
- Fast enough. The 84MHz system clock allows the duty cycle of the 40kHz PWM signal to be varied in increments of 1/84,000,000's of a second. This allows for 2100 settings of the duty cycle, approximately 11 bits of precision.
- Ease of use. The community (arduino.org) is great and vendor tool support (Atmel Studio IDE, Atmel Software Framework) is more than adequate. There's lots of example code, and the ability to program via USB makes it simple to get get started.
Maybe the Due wasn't the best choice for this project, but it's working out pretty well none-the-less.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.