Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

Tuesday, April 25, 2017

Q1 2017 Rocket active stabilization system update; Finally have working PID for positional control of a DC motor! New gear, livestreams and the first program sponsor!

After nearly 4 and a half months of late nights, caffeine fueled jam sessions, one livestream(more on that later!) and more frustration than anticipated I FINALLY figured out implementation of PID for positional control of a DC motor with an encoder. More details after the break including a breakdown of problems I ran into, some shiny response graphs and most importantly; SOURCE CODE!?!?!
Motor control testbed using TB6612FNG motor driver

Wednesday, August 17, 2016

Q3 2016 Rocket active stabilization system update, complete hardware redesign of fin drive system with bonus sketches and a needed disclaimer

The old and new designs, massive improvements to the overall design
Update time has rolled around again now that a good chunk of progress is completed on the Arduino based rocket stabilization system. This has taken a while since I've been busy with not only work but also getting the A+ certification in computer repair and completely reworking my current workstation. After much discussion with several other rocket tinkerers, the conclusion was reached that stresses on the servo spline itself would be quite considerable and may result in damage or inoperability. Based on force distribution I surmised that flanged bearings embedded in the system shroud tube would function as not only supports but also as smooth rotation points. With the challenge of a new fin drive train in mind, I set to brainstorming. My first thought was to use linkages connecting the servo to the actuation shaft, though it would increase the diameter of the system unless the servos were staggered which would also increase the overall height of the system. Stepper motors were considered, however as I was unable to find suitably sized units and the common 28byj-48 had too low precision and torque this too was eliminated from consideration. After those two ideas were discarded, it was relegated to the back burner while I had work. The breakthrough was about a week later, while browsing patents looking at missile fin drives I noticed an old Raytheon control segment used bevel gears to transfer the motion and that became the seed for the new design. 

Friday, March 11, 2016

How to theme and change the font of the Arduino IDE (Tutorial)

You've probably had this problem before; Writing code late at night trying to get new features to work but the bright white of the default IDE is burning your eyes and giving you a headache even with F.Lux installed, and/or you've mistaken a "l" for a "1". Well, there are solutions to those problems, but not the other well known problems (autocomplete, not enough debugging features, etc etc) after the break.
Original on left, rethemed and refonted on right

Sunday, February 14, 2016

Q1 2016 Rocket active stabilization system update, now with fins, nose cone and a mockup

With 2016 well underway it's time for the first update on the state of the stabilization system!
First off, apologies for the massive delays this post has had, was originally slated for mid-Jan launch but between job hunting and other stuff I've been hitting delays and trouble at every turn. Since last semester ended on Dec 18th, I'd been going to TechShop pretty much every day until Jan 18th making massive leaps and bounds of progress along the way. The most obvious of progress is the completion of the demonstration mockup airframe which will be gone into more in-depth after the break. 
The system's current state on the demonstration mockup

Wednesday, November 18, 2015

Rocket active stabilization system debugging update


Debugging the system on a cheap logic analyzer clone (review coming up soon)
        Ever since I implemented the new control code this system has been plagued with a pair of bugs that frustrated me to no end which I have dubbed "Harlem Shake" and "Mr Freeze." The "Harlem Shake" bug occurs when the IMU outputs seemingly random YPR values suggesting that it is tumbling even when the sensor is kept perfectly still. "Mr Freeze" as the name suggests, is when the system locks up out of nowhere and refuses to respond unless reset which does not prevent the glitch manifesting. After mucking around with the code and a string of long nights with quite a bit of coffee trying to figure out what the heck was wrong with the system, I finally fixed the problem. The following is just inferences based on my limited knowledge at the moment, if anyone has a better theory I'd be glad to hear it. Reading the serial logs led me to believe that the freezing glitch was caused by a FIFO (First In First Out) overflow due to the appearance of that message in the terminal just before the system locked up. Initially, I had messed with the FIFO data speed configuration from 200Khz to 400Khz to no avail before inferring that the data was coming in at a much higher rate than it was being output, being a problem in library implementation. Using a logic analyzer had not showed anything anomalous in the I2C data bus which would have signaled a problem with either the wiring or packet structure. My assumption is that the transcoding of the data  internally was taking up too much processor power or was out of sync causing it to glitch thus causing the system to grind to a halt. This is a library-level issue that I'll be investigating and attempting to fix. Googling around proved library wonkiness to be the case and the fix was to increase the baudrate to the maximum of 115200. After applying this single line fix, the system ran for 10 hours straight without any bugs or freezing at all. I have no clue as to what causes the "Harlem Shake" glitch but it has not appeared since the freezing fix was applied so I'm not going to complain, though it has me curious as to what the core of the problem is.

Saturday, November 15, 2014

New equipment acquired! [LINKS INCLUDED]

Current haul
What maker does not like eBay? that magical place where you can buy virtually anything you need at dirt cheap prices to boot! The fact that the costs are so low is a boon for the basement makers with very low budgets or just any maker who is just dipping their toes into making but doesn't want to invest too much money in getting started. Over the past few weeks shipments have been coming in from china and the US containing lots and lots of new parts and boards. Overview is below
To start with there is the Neopixels and new MPU-6050s (toasted my old one). The MPUs can be found here for $2.34 and ship very quickly, silkscreen and LED are different though. The specific strip of Neopixels seems to have disappeared from the site for some reason though. Other than that these are exact clones of the Adafruit strips except at $4 instead of $10. Very bright and colorful!

Friday, June 13, 2014

How to get a $3 CP2102 USB-UART bridge programmer to work with arduino

Had some difficulties with getting this cheap programmer to work on my machine to program the pro minis I bought (off the same site). Did some searching and found out that it requires a driver (found here), install and it fixes the issue.
The programmer

Before driver install
After driver install

Electrodragon loot arrived! (workshop storage shelves update too)

Hey guys, made this order on electrodragon, it shipped and arrived in under a week using the lowest cost shipping option. All this loot cost me only $22.45. The pro mini is a genuine sparkfun pro mini at only a third of the cost! Pro Mini
Loot! :D