moonshadow 2 Posted September 22, 2010 Share Posted September 22, 2010 Click for larger photo The two voltage regulators at the front provide 3.3v and 5v from a 12v wall wart I had lying around. A gearmotor is driven by a TB6612FNG (the red breakout board in the photo; PWMA is tied high, A0IN/A1IN are tied to P1.6/P1.7 on the msp430, vcc/vmotor/gnd/reset are connected as appropriate). The IR receiver demodulates at 38khz (it was surprisingly difficult to find one that operates at 3.3v, 5v seems to be standard); it is connected to P1.5 on the MSP430. The circuit was built on a breadboard initially, with the launchpad attached and reporting infrared samples to the PC via the USB serial port emulation; this enabled me to reverse engineer the protocol of a spare remote control I had lying around, and cause appropriate buttons to rotate the motor one way or the other. The final source code (for mspgcc) contains separate modules for decoding the infrared signal and sending debug data over USB; the latter might be of use to someone perhaps I guess. Either of the processors supplied with the Launchpad will work. A very simple result for all of you I'm sure, but I'm a software guy - this is the first bit of serious electronics I've done in my life! So quite exciting for me bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted September 23, 2010 Share Posted September 23, 2010 That is sweet! Thanks for posting and sharing your code.. I'll update the main blog with this. Its backlogged by a few days. Submit to hackaday too. Its bound to get featured! Any pictures of your setup? Visitors love pictures. Ah! crap.. link for the pic is right on top of the post. Quote Link to post Share on other sites
moonshadow 2 Posted September 23, 2010 Author Share Posted September 23, 2010 Sorry, link wasn't very obvious Edited to add a thumbnail. Quote Link to post Share on other sites
GeekDoc 226 Posted September 23, 2010 Share Posted September 23, 2010 Well done! These are the cool little tinkering projects that solve some little problem that we all like! Heavy price for the motor controller. Could you have done it directly from the MSP430 with a transistor or two? (Okay, I'm cheap.) Thanks for sharing the code. (BTW: I'm a software guy too. This stuff is fun!) -Doc Quote Link to post Share on other sites
moonshadow 2 Posted September 23, 2010 Author Share Posted September 23, 2010 @GeekDoc: thanks It wasn't clear to me how to make the motor able to reverse direction, so I went for the component that solved the problem instead. However, it's not really so much of a waste - I want to have a go making a logo turtle next, so I will be reusing the controller in that (it's mounted via headers/sockets so I can unplug it); at that point being able to arbitrarily control two motors, and their speeds, easily will be very useful. Quote Link to post Share on other sites
jsolarski 94 Posted September 23, 2010 Share Posted September 23, 2010 Sweet hack! Quote Link to post Share on other sites
gatesphere 45 Posted September 23, 2010 Share Posted September 23, 2010 This is the kind of thing I love. Great project! Also, I second the HAD comment. You'll be featured for sure! Either that, or there is something wrong with the HAD editors. Quote Link to post Share on other sites
moonshadow 2 Posted September 23, 2010 Author Share Posted September 23, 2010 Oooh, didn't know about Hackaday. So much win on that site! Quote Link to post Share on other sites
GeekDoc 226 Posted September 23, 2010 Share Posted September 23, 2010 Worst that could happen is that they don't feature your hack. They're not featuring it already, so you have nothing to lose! -Doc Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.