this week i wanted to prepare for my final project so i decided to try to reproduce neil's DC motor with H-bridge and then play around with the code. i wanted to test the waters a bit before making my skateboard. some key questions: what kind of (DC) motor would i need to carry a person? is a brushed motor fine for my purpose? how can i create effective braking? will i need some kind of feedback look? hopefully this will all work with the pressure sensor (which, rob explained to me, could be made from scratch using some foamy material within a capacitive system) as an input device that regulates the speed of the motor through pulse width modulation (PWM).


milling, soldering . . . no problem! except by accident i vacuumed up my chip but found it right on top of a large pile of machinable wax shavings inside.

used ribbon cable and 2x2 headers to connect to a desktop power supply and to the DC motor. programming was successful but the motor did not spin! in fact, as i raised the voltage, i could actually feel a light throbbing within the motor and hear clicking sounds if i brought the motor to my ear, but no revolutions! with debugging help from rob, i confirmed that the power distribution was as it should be, 5V to the ATtiny44 and all of the power supply to the motor; the oscillascope also showed that the program was indeed working and we could see the PWM working and the changing wavelengths streaming across the screen! apparently, the H-bridges are a common problem so the next step is to replace it and hope that it works.

used the hot-air gun to remove the h-bridge. replaced it twice . . . still unsuccessful! but everything on the board seemed to be in the right place and connected in the right way. i tried bypassing ribbon cables to make sure the connections were good. the motor works when directly connected to a power source. finally, rob suggested that i try writing a simple program without PWM. and the motor spun! all i did pretty much was to replace the huge while loop with this:

so then my next steps should be: (1) to tweak around with the code, slowly reintroduce PWM effects, and hopefully find what is incompatible, (2) test the effects of the motor on a homemade wheel, as a kind of prototype for my skateboard, with something like this:


FIXED! embarrassingly enough, i had used the wrong DC motor for Neil's code. i hope none of my friends ever find this page and read it. please see next week's assignment where i integrate input and output devices (the correct motor, ahem).