Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Feb 21, 2015, 02:55 AM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

Arduino begins






10 years after everyone else, it was finally time to get the Arduino going. It was decided that a totally silent fan can be made, using the motor in stepper mode, driving a continuous sine wave on all 3 phases. It wouldn't be very efficient, but it would be guaranteed to work.

The atmega328 has a huge number of PWMs, enough to drive 6 MOSFETs independently. Getting this number of PWMs requires locking them to the CPU clockspeed, so the CPU clockspeed needs to be adjusted. Completely independent frequency would reduce the number to 3 PWMs.

At 16Mhz, PWM goes at 64khz. Using the 8Mhz internal oscillator, PWM goes at 32khz. The clockspeed can be adjusted in powers of 2 & would have to be 8Mhz or below. Changing the PWM frequency also breaks all the features of the Arduino libraries, since they use the timers for other functions.

The rest of the required functionality is standard for microcontrollers, an ADC to control speed, an ADC to detect stalls.

The mane problem is the arduino IDE offers little to program a bare atmega in a circuit. The IDE can't program an atmega without a bootloader. It requires connecting the bare atmega's SPI pins, programing the Uno's atmega to program a bootloader into the bare atmega, then connecting the bare atmega's UART pins, removing the atmega on the Uno to program a main program on the bare atmega. This has to be repeated for every bare atmega.

The IDE also can't write a new bootloader on the Uno's atmega. That requires buying yet another programmer & connecting it to the ICSP header on the UNO.

The IDE & Arduino libraries have more likely served their purpose in bringing up a PWM test program. The UNO has to be reprogrammed for programming bootloaders in bare atmegas. The bootloader source has to be modified to be a main program.
Last edited by Jack Crossfire; Feb 21, 2015 at 02:32 PM.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools