tuna55
MegaDork
2/9/16 1:11 p.m.
ok, good info guys.
So, as far as hardware, other than the Amazon list I showed earlier, I need a camera, right? To do a line-follower, I also need an analog board and those bits which GameBoy was referring to up there?
http://www.amazon.com/Three-pairs-Infrared-Emission-Receiver/dp/B00EFOQEUM
http://www.amazon.com/uxcell-Round-Infrared-Receiver-Photodiodes/dp/B00NQ6S50M
I'd recommend two of the line-following sensor boards I linked earlier if you don't want to put in an ADC - it'll be easier to build but it won't give you as much flexibility in reading the sensors, so you'll need a track with good contrast and a plain surface.
Here's the line-following sensor board:
https://www.sparkfun.com/products/9454
And here's the camera:
https://www.raspberrypi.org/products/camera-module/
You can probably find the same units on Amazon.
tuna55
MegaDork
2/9/16 1:39 p.m.
Tell me about the validity of this Amazon review of the camera:
This is the "official" Raspberry Pi camera, and it works pretty well for what it is-- small, relatively inexpensive, and easy to set up.
However, I'm not using it anymore. I set up OctoPrint for my 3D printer and wanted to use the timelapse feature. This camera works and image quality is ok, but there are mounting issues that you have to solve and the ok quality is just that-- only ok. With only a little bit more configuration, I was able to set up OctoPrint with a Logitech c900 series USB webcam. I was really surprised at just how easy it was to set up-- it seems that many USB cameras are basically at the plug-and-play level of compatibility with Raspbian. I just needed to point OctoPrint's streaming service to the correct device, and it worked.
Benefits of using a USB camera instead of this one:
- Image quality can be much better (especially in low light),
- Mounting is easier,
- It's in a more rugged/sealed enclosure, and
- Because USB cameras usually come with a cable attached, your Pi can be several feet away from the camera. In my case, having the camera mounted to the print bed and placing the Pi a few feet away is a much nicer solution than I could have achieved with the official RPi Camera.
Benefits of using THIS camera instead of USB:
- If you want a camera and Pi integrated into the same case, this camera is probably the best (only) choice
- Power consumption is probably lower. (USB cameras might need to be connected to the Pi through a powered hub)
- It is likely to be cheaper, depending on the USB camera that you're considering
- In my experience, this camera was SLIGHTLY easier to set up (although USB camera setup was not really difficult at all)
Uh, I have one of these. I make it dance and do karate moves.
tuna55
MegaDork
2/9/16 1:48 p.m.
What about this guy for line following?
https://www.sparkfun.com/products/13582
That can work. It's 8 line-sensors on a wide board with an i2c interface. With that many sensors you can have very fine line-following control.
tuna55
MegaDork
2/9/16 2:15 p.m.
GameboyRMH wrote:
That can work. It's 8 line-sensors on a wide board with an i2c interface. With that many sensors you can have very fine line-following control.
They are all digital, right? Do I still need analog IO?
Also, what about that camera review, should I be looking to a USB camera instead?
How about power supplies? Should I get a battery power supply for the Pi itself?
You can use a regular usb webcam, but the raspberry pi people seem to think their camera is better. Either way, if the camera is working, you should be able to talk to it with whatever programming language you settle on.
You'll definitely want a battery power supply for the pi, otherwise you'll have to run a really long usb cable for robobrain power ;)
tuna55
MegaDork
2/9/16 7:50 p.m.
So we are signing the kids up for various summer camps. One for tunakid 1 is programming a sphero robot.
I had to look it up. Wow. This is higher level than what we played with in college. I have a high bar for this project now.
The 8-sensor bar uses i2c which is a digital 2-wire bus.
tuna55
MegaDork
2/16/16 8:38 a.m.
What do people typically use for battery packs for these Pis? There are approximately 4,902,511,493 battery packs out there. Tell me which one is cheap and will go for an hour or so.
I don't know what people "typically" use...as you said there are a million options. This one's not a bad price for its capacity, and it's as easy to use as you could hope for:
https://www.adafruit.com/products/1566
tuna55
MegaDork
2/16/16 9:24 a.m.
DO I need any special motor driver, or is this a matter of just switching a separate power supply on the breadboard?
You just need to switch a separate power supply for the motors, since nothing on the RasPi (or Pibrella) can drive the motor directly. You could use solid-state relays to control the motors. If you were using brushless motors, then you'd need ESC boards.
Edit: Keep in mind you'll want to be able to drive the motors with reverse polarities as well, so you might want to whip up a simple direction-switching device like this (one for each motor) to keep the number of output pins needed to control your motors to a minimum:
http://www.instructables.com/id/Super-Easy-Reversible-Motor-Control-for-Arduino-/
tuna55
MegaDork
2/16/16 11:49 a.m.
In reply to GameboyRMH:
I'm reading this: http://letsmakerobots.com/node/43201 and I see this graphic
and realize that I have no driver.
I can't find what kind of motors that robot is using...but basically, the brushed motors you're using just need power to run. Reverse polarity and they spin the other way. So you don't need a control board that senses the motor's position and controls when & where the magnetic fields are applied like with a brushless motor. You just need a way to control when those motors get power and in which direction. If you put all those parts on a separate board you could call it a "controller."
tuna55
MegaDork
2/22/16 2:31 p.m.
We bought some stuff, and some parts are rolling in. No pics of the kids, but believe me, this had a lot of math in it.
They learned that this was not a gearbox, but a multiplication and division box, and how it worked to trade speed for torque. Fun! Science!!
tuna55
MegaDork
3/4/16 10:32 a.m.
It's all here.
Please point me in the appropriate direction for some basic programming boilerplate. I got a starter kit from Sparkfun, so I would like to start with flipping switches and having LEDs come on, so the kids can see what programs do.
But I'm a dummy, and don't actually know how to do that.
tuna55
MegaDork
3/4/16 10:37 a.m.
For motor drivers:
https://www.sparkfun.com/products/13204
or
https://www.sparkfun.com/products/9571
or
https://www.sparkfun.com/products/9457
And why? I am driving two motors, variable speeds would be best.
Also, is there a way to get the battery voltage from the input of the Pi? I have an aux battery, so I want to power both the motors and the Pi with it.
Any of those can work, but if you're not already using the serial port for some part of the robot, I'd use the serial controller. The others will take a little more programming work to interface with.
Went down this road awhile back with my 5 year old, here's the thread:
https://grassrootsmotorsports.com/forum/off-topic-discussion/robotics-project/99256/page1/
We ended up getting a kit from http://www.makeblock.cc/ via https://stacksocial.com/ for like $70. We had a great time, the kid loves his robot and still plays with it. The only recommendation I have is keep the the Loctite handy.
tuna55
MegaDork
7/22/16 7:58 a.m.
tuna55 wrote:
It's all here.
Please point me in the appropriate direction for some basic programming boilerplate. I got a starter kit from Sparkfun, so I would like to start with flipping switches and having LEDs come on, so the kids can see what programs do.
But I'm a dummy, and don't actually know how to do that.
Hey, so the new house isn't falling down, and although I still spend 2-4 hours fixing random junk on it every night, I did get the robot chassis together with the kids, and do intend to follow through with this. They are signed up for Junior Lego League in the fall, so I have to hurry!
Can anyone help with the real basics of programming? To give you some background, I have written some programming before. I know basics about how to structure and execute commands and such, but most of my work is on already-existing systems. That is, someone wrote this program to do stuff, and I need it to do something differently, so I already have the framework of what command does what physical thing.
I have no idea how to start that. How do I get some basics so I can make programming on the Pi do actual physical things? Once I get the basics, I thing the rest of it will fall into place.
Help?
Here's some basic LED-blinking stuff in Python, an easy and very modern language that will be great for doing just about anything on your robot:
http://www.thirdeyevis.com/pi-page-2.php
BTW if you get some kind of little speaker on your raspi you can make it the robot talk (with espeak if nothing else).
Edit: The pyttsx library takes care of it:
https://code.activestate.com/recipes/578839-python-text-to-speech-with-pyttsx/
tuna55
MegaDork
7/25/16 8:12 a.m.
We made lights blink on and off!!!
Now I still have to pick up those motor drivers to get the kids really interested in something.
tuna55
MegaDork
12/5/16 1:03 p.m.
I am still stuck on motor controllers. The stall current on those motors is 2.1A, and they are 5V. I need something forward/reverse via PWM optimally, but all I can find is a package that's really hard to breadboard that I can't get a socekt for.
Help?
http://www.mouser.com/ProductDetail/ON-Semiconductor/STK681-300/?qs=sGAEpiMZZMuleuVm2ofeXyW%2fsDjL9EAh