[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Search] [Home]
Settings Home
/diy/ - Do It Yourself

Thread archived.
You cannot reply anymore.

File: harp.jpg (8 KB, 275x183)
8 KB
I am a CS major (programming background) and want to get into hobby robotics, should I be getting an arduino or just get a rasberry pi? What are some good places to learn about interfacing with hardware?
Depends on what you want to do really. A raspberry pi is just a $40 computer running Debian. So if you want to do stuff that you would ssh into then that'll work. Arduino is just an atmel chip with some libraries that make it easy to program
Pi's weren't made for realtime applications in mind but I've heard someone ported a rtos to it. Not sure how mature that project is.

Depends what the robot's doing but I'd probably go with an esp8266 and the arduino environment.
i dont know how advanced you might be but check out the tinker forge stuff, could be interesting
Arduino would be better for this application. With Pi you have an OS layer between your code and the IO pins. You'll have to spend more time fussing with software and not learn as much hardware.
Can arduino do things like vision processing and decision trees? I also thought it might be cool to use my NN library and have it run a genetic algorithm where it defines its own fitness function so it has no preprogrammed goal.

Id probably start with robotic arms, add wheels or something to it to give it more depth and then do some more advanced autonomous drone ideas I've had.

So is arduino the same thing as pi just without an os layer? I'd prefer to stick to common programming languages too if possible; java/c++/python
Tarduino IDE is basically C, if you have chops you should be fine with it. And I agree about tarduino over Pi for the stated reasons. You have direct IO access from the code.

You'll also want to learn about port expanders and MUX/DMUX chips like the 74138 and 74151, handy for expanding out one GPIO to many and vice versa. PWM drivers like the LP5524 and TLC5940 will let you control drive motors and blinkenleds. MOSFETS and line driver IC's will let you drive big current devices (motors, steppers etc) from small current sources.
Porbably no to all of those things. Pi is a full blown computer, an arduino is a microcontroller.
I mean look at the specs
Flash Memory32 KB (ATmega328P) of which 0.5 KB used by bootloader

SRAM2 KB (ATmega328P)

EEPROM1 KB (ATmega328P)

Clock Speed16 MHz
SoC: Broadcom BCM2837

CPU: 1.2 GHZ quad-core ARM Cortex A53 (ARMv8 Instruction Set)

GPU: Broadcom VideoCore IV @ 400 MHz

Memory: 1 GB LPDDR2-900 SDRAM

USB ports: 4

Network: 10/100 MBPS Ethernet, 802.11n Wireless LAN, Bluetooth 4.0

If you want to do image image processing I have successfully used a Webcam with opencv on a raspberry pi before to scan Barcodes, so maybe start with on of those.
I don't really understand why anyone would use arduino then, it seems more like a downgrade than anything.
Probably because you're comparing apples and oranges. You would use the arduino for niche things like specific sensors and timers. For example I have a Temperature sensor that an arduino reads and will trigger a relay to activate a humidifier. I don't need to spend $40 on a raspberry pi for that. Now the actual chip in the arduino can do things that require very precise timing that a Pi will be unable to do. This doesn't work as well with the arduino libraries which is why other anons call it the tarduino because it's just an overlay that makes it easier to write stuff. I also have lights controlled in my house that's hooked up to a Webserver running on a Pi because it's an actual computer
No and the raspberry pi cannot do computer vision very well. It runs openCV pretty slow. Slow is not good for robotics.
>>it's own fitness function
then it will probably set the objective function to time spent doing nothing or something
>>robotic arms
are much harder than they look and the ones made without actuators using harmonic or cycloidal drive gearboxes are absolute trash. For a decent robot arm you need to spend at least $1000
I know that computer vision is quite intensive, my goal was to learn about about it and move out of it into reinforcement learning via adversarial networks eventually.

I don't need a robot arm that can lift 2-3 Kg, just something that I can experiment with, I don't have any hobbies right now and I'm trying to pick one up.

That makes sense but personally I just don't see any kind of fun in building something like that, so I guess I'll get a pi.
You don't understand because you don't know anything about it, say you wanted to get you your boyfriends house, he lives in the next street over, your two choices of transport are a bicycle that you have to assemble yourself from a kit or you can have a ride in a NASA space shuttle but again, you have to build it yourself and also nobody is going to help you fuel or launch or land it either.
Space shuttle right? Bigger is always better?
A microcontroller has a limited instruction set, small number of registers to worry about, typically don't do context switching in any meaningful way so no worry about threads or processes, there is limited and simple peripherals that can (must) all be managed by a single application rather than many drivers, no need for an operating system or any bullshit. Lack of different contexts makes timing very easy you can pretty much rely on wall clock timing of a certain function, race conditions or concurrency aren't really an issue
How long does it take a raspberry pi to boot? Few minutes? Microcontroller jumps into its main loop in a few microseconds? Cost, microcontrollers can be had (from China) literally for pennies. Size? Yes a single chip vs a board, power consumption? Much lower, fractions even because of clock speed.
Lots of reasons.
>should I be getting an arduino or just get a rasberry pi?

Just put ROS and Debian 9 on any 64 bit Computer. ROS on the pi is absolute garbage.
remember the concept of jitter? if you don't, attempting to use the pi to send pulses to a stepper driver will certainly remind you. having experience that, you might then build a stepper motor controller on the arduino and send it commands from the pi to turn the motor at this speed with this acceleration/deceleration ramp, which will yield a smoother and somewhat precise/repeatable movement. it may also deal with limit/home switches etc. giving you plenty of time to do vision on the pi
your CS training doesn't appear to have prepared you very well for the real (i.e. embedded) world, where concerns over individual signal transitions and fractions of a microsecond are your daily bread and butter. if you don't want to deal with low-level concerns, perhaps you're better off buying a LEGO Mindstorms kit

Why the fuck do these stupid kids think an arduino and a raspberry pi are comparable? Yes, they both are electronics, but apples and oranges are both fruit, and that's what you're comparing. This stupid little shit literally told me "I don't really understand why anyone would use arduino then, it seems more like a downgrade than anything." Are you fucking kidding me? Go ahead and spend $40 on a raspberry pi just to read a sensor you entitled pretentious fuck. It's like they think that a microntroller and a computer are the same thing. Arduinos suck anyways because they fuck up the timing of the ATMega chip so you can't do precise timing. Why the fuck would anyone even think that I would want to use 0.5kb of my flash on a shitty bootloader that reads a disgusting chimera of Java and C. "I want to do image recognition and AI on an Arduino". Like bruh this isn't web development you have to give a shit about resource management. These absolute disgraces to computer science need to go back to their NetBeans and get the fuck out of this hobby.
>shitty bootloader
how about a good, no-frills, native USB bootloader like Teensy's "HalfKay"? FTDIchips are rubber crutches
>absolute disgraces to computer science
it's as if comp sci courses don't teach kids anything low-level anymore, and it's all just hyper-advanced Excel. sad!

OP please tell us where you're enrolled so that we can steer other hapless students away from it
If OP's goal is a NN based robot then yeah, RTLinux on the fastest hardware he can physically stick in it would be idea.

Now for the dream crushing. I'm a contributor to the FANN project so have a good amount of experience with NN. Your robot is just going to violently thrash around, twitch, or do some other stupid pointless motion. Assuming you're not using a training algorithm and relying on the randomness of 'evolution' a NN could take hundreds to millions of generations to learn even basic locomotion. That works fine on computers that can run a million generations in a minute but in the world of the real it'd take years.
Thanks anons, i`ve been trying to understand the differences for a while but your reeeeeing solved a lot of my doubts, not enough but at least i have a start point
If your school has a robotics club, join it.
>teleports behind you in a microsecond
>nothing personnel kid

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.