Here's a data sheet for the joystick. But it's really quite simple if you examine the undersides... the two I bought have a pushbutton switch which is easy to find and easy to figure out which pins belong to it... that leaves six other pins (2 pairs of 3) - and knowing these things work like potentiometers, it's also easy to see how the 3 pins for each potentiometer (each pot is an axis for a joystick) work. Of course, I now need to solder some lead wires onto the ends so I can make them work with the breadboard... so I'll do that tonight and try to get to Project 27 tomorrow.
Thursday, April 7, 2011
Project 27 - Joystick Servo Control
Here's a data sheet for the joystick. But it's really quite simple if you examine the undersides... the two I bought have a pushbutton switch which is easy to find and easy to figure out which pins belong to it... that leaves six other pins (2 pairs of 3) - and knowing these things work like potentiometers, it's also easy to see how the 3 pins for each potentiometer (each pot is an axis for a joystick) work. Of course, I now need to solder some lead wires onto the ends so I can make them work with the breadboard... so I'll do that tonight and try to get to Project 27 tomorrow.
Wednesday, April 6, 2011
Project 26 - Dual Servo Control
One thing I like about all these servo motors I'm seeing is how much standardization there is with wiring and mounting options (screw sizes and such).
I've got another project I'm working on right now - co-authoring a book titled "Printing in Plastic: Build Your Own 3D Printer" with Patrick Hood-Daniel. The book should be out in mid-May (just in time for Maker Faire in California where Patrick and I will be demo'ing the 3DP and showing off copies of the book... maybe selling copies if MFaire lets us) and I can't wait to start using it to prototype mounting brackets for my own robot...
Anyway... Project 26 worked - the video will show you how you use the Serial Monitor to send L and R (left and right motors) values, 0 to 180, to rotate the servos. Fun stuff.
Monday, April 4, 2011
Half Way!
Well... I just finished Project 25 which puts me at the halfway mark. Plenty more left to do, but I'm happy to say that I'm learning a lot, especially when it comes to programming. I certainly don't expect this book to teach me every aspect of coding with this language, but I'm amazed at what I'm picking up from the author's explanations of the code - I have to give the author large praises for taking the time to really go over the code - so many books (not just Arduino ones) that I've used in the past simply give you the code and you're just to trust that it works and not get curious about diving into it.
Project 25 is an interesting halfway point for me, as well... I like humanoid robots like the Robonova-1 and I have this itch to design my own one of these days using servos... I could totally see building a custom robot using an Arduino and servos... could be fun.
So, thumbing through the book I see I have some more interesting projects ahead - the RFID and Ethernet chapters are of interest, too, as I have some ideas for some home monitoring activities that I'd like to investigate.
So... thanks for sticking with me as I continue to work through the book. I haven't heard from very many of you about whether you've got the book and are working your way through the projects... let me know if you are and where you are! If you're ahead of me, I think it might be nice to have some guest commentary for some of the later projects... just a thought.
(And, well... because it's just my way... I'm already hard at work trying to figure out what to do next when I finish this book - what can my next hands-on project be? There are some front-runner ideas, but I'm open to suggestions, too...)
Project 25 is an interesting halfway point for me, as well... I like humanoid robots like the Robonova-1 and I have this itch to design my own one of these days using servos... I could totally see building a custom robot using an Arduino and servos... could be fun.
So, thumbing through the book I see I have some more interesting projects ahead - the RFID and Ethernet chapters are of interest, too, as I have some ideas for some home monitoring activities that I'd like to investigate.
So... thanks for sticking with me as I continue to work through the book. I haven't heard from very many of you about whether you've got the book and are working your way through the projects... let me know if you are and where you are! If you're ahead of me, I think it might be nice to have some guest commentary for some of the later projects... just a thought.
(And, well... because it's just my way... I'm already hard at work trying to figure out what to do next when I finish this book - what can my next hands-on project be? There are some front-runner ideas, but I'm open to suggestions, too...)
Project 25 - Servo Control
With the delay set to 15ms, the response of the servo turning is almost simultaneous with the turning of the potentiometer. In a second video I set the delay to 1000ms (1sec) and the delay is noticeable... turning the potentiometer in small increments can cause large jumps in the rotation of the servo... not sure when this would be beneficial, so I understand why the author chose a short delay. (But why not a 0 second delay? Hmmm....)
I have a very small servo that has a see-through plastic case... it has the same size motors I used back in Chapter 5 but it has gears that increase the power (or torque?) substantially... pretty cool to see gearing this small driven by such a small motor.
Project 24 - LCD Temperature Display
I consulted the data sheet for the temp sensor but the calibration instructions are confusing and also they're for the "can" version of the sensor and not this extremely tiny sensor I purchased from Sparkfun... not sure if the sensor is defective but I know it's not 211F in my house.
I'd like to figure out why it's not working but without a way to verify the accuracy of the sensor, I'd rather move on to the next project. I'm going to leave the circuit alone for a day and see if anyone has any suggestions... I may also consult the data sheet again to see if I missed anything.
Sunday, April 3, 2011
Project 23 - Basic LCD Control - Error in Book - Fixed
After some frustrating time spent looking over this circuit, I finally figured out the problem. Figure 8-1 does NOT show pin5 on the LCD being connected to GND. I'll take partial blame for this, however, because on page 172 Table 8-1 clearly shows to connect pin5 (R/W) to GND. I had to consult the data sheet to confirm that pin5 was R/W, but after doing that it was a simple matter of using a jumper wire to get it connected to GND.
Video is below - as you can see, I got the contrast to work by adding in the recommended potentiometer. That's a 5k, btw, not a 10k. Also the resistor for pin16 on the LCD is brown-black-black - a 10 ohm resistor. I got this 16x2 from Sparkfun, part # LCD 09054
So... Project 23 works... which gives me hope for Project 24 since it simply builds on this circuit a bit.
Video is below - as you can see, I got the contrast to work by adding in the recommended potentiometer. That's a 5k, btw, not a 10k. Also the resistor for pin16 on the LCD is brown-black-black - a 10 ohm resistor. I got this 16x2 from Sparkfun, part # LCD 09054
So... Project 23 works... which gives me hope for Project 24 since it simply builds on this circuit a bit.
Saturday, April 2, 2011
Project 23 - Basic LCD Control
Apologies for the long delay in posting... I'm currently writing 3 books and all of them seem to have had major chapters due on the same day this past week... and before you say "Are ya crazy?! 3 Books!" - I've got a fourth book that started yesterday and a fifth book looking to start in a month. It's insane. (Fortunately 2 of my current books are looking like they'll finish in the next week or two... but still...)
I've also been working on a "very special project" - Arduino-related, of course - but I can't talk about it just yet... probably will be able to announce something in a week or so, but you'll understand why I've been slow to getting to Project 23.
And I've been looking forward to this project! I have various ideas for Arduino projects of my own, and many of them involve being able to read text on a screen. I read over the code for this project and it makes sense... I really like being able to use an existing library to call on functions rather than code them...
In a previous project, the code was provide for scrolling text on the 8x8 LED display... that's a lot of code to sift through, and I understand it (sort of)... that's what makes this library so useful - rather than have to code the part myself for moving text left to right ... or right to left... the LiquidCrystal library has functions you can call on that take your text and perform these same operations, but you don't have to reinvent the wheel.
One thing you need to know about Project 23 - if you buy a similar 16x2 LCD you'll need to solder some wires onto the open hole leads in order to make it work with your breadboard. I soldered only the wires I needed (to match Figure 8-1) and left the rest open...
That said... I still can't get the project to work! Learning electronics has likely taken at least 1 year off my life expectancy... it can be SO frustrating. I've gotten good at not getting stressed after the first time running a project... over time, I've figured out that 90% of the time it's an error on my part. And it may very well still be an error I'm overlooking, but I just cannot get text to display on the 16x2... it's getting power... the backlight is lit, and I've played with half a dozen resistor configurations trying to find the right contrast... but no luck.
Suggestions are always welcome! Video below showing my circuit and the lack of progress... I'll keep messing with it for a day or two before moving on...
I've also been working on a "very special project" - Arduino-related, of course - but I can't talk about it just yet... probably will be able to announce something in a week or so, but you'll understand why I've been slow to getting to Project 23.
And I've been looking forward to this project! I have various ideas for Arduino projects of my own, and many of them involve being able to read text on a screen. I read over the code for this project and it makes sense... I really like being able to use an existing library to call on functions rather than code them...
In a previous project, the code was provide for scrolling text on the 8x8 LED display... that's a lot of code to sift through, and I understand it (sort of)... that's what makes this library so useful - rather than have to code the part myself for moving text left to right ... or right to left... the LiquidCrystal library has functions you can call on that take your text and perform these same operations, but you don't have to reinvent the wheel.
One thing you need to know about Project 23 - if you buy a similar 16x2 LCD you'll need to solder some wires onto the open hole leads in order to make it work with your breadboard. I soldered only the wires I needed (to match Figure 8-1) and left the rest open...
That said... I still can't get the project to work! Learning electronics has likely taken at least 1 year off my life expectancy... it can be SO frustrating. I've gotten good at not getting stressed after the first time running a project... over time, I've figured out that 90% of the time it's an error on my part. And it may very well still be an error I'm overlooking, but I just cannot get text to display on the 16x2... it's getting power... the backlight is lit, and I've played with half a dozen resistor configurations trying to find the right contrast... but no luck.
Suggestions are always welcome! Video below showing my circuit and the lack of progress... I'll keep messing with it for a day or two before moving on...
Subscribe to:
Posts (Atom)