#robotics Logs

Mar 08 2013

#robotics Calendar


01:30 rue_bed wow, its hibernated
01:30 rue_bed (cats unplugged the laptop for me)
01:32 Jak_o_Shadows1 How nice.
03:41 Jak_o_Shadows1 Can't get rid of the speckles the edge detection leaves, so my fill from bottom method is gettng stuck a bit, so it's not working
03:41 Jak_o_Shadows1 but it will
09:00 rue_house despeckaling?
09:34 GuShh3 rue_house: you mean despeckling?
09:34 GuShh3 ie selective denoise
09:34 GuShh3 (sometimes addaptive)
09:34 GuShh3 err adaptive.
17:22 Mahmoud hello, i have pretty easy question on how to control rotors from a PC
17:22 Mahmoud i generally think that i need a controller that's connected to my PC via USB or a serial port, and sends commands to it. is there any other approach?
17:23 Mahmoud another approach that is easier
17:24 GargantuaSauce not really
17:24 GargantuaSauce usb UARTs are ridiculously cheap and pretty much every microcontroller has an async serial interface of its own
17:25 Mahmoud usb UARTs are convertors from serial to usb such that a PC with USB can send serial data?
17:25 Mahmoud e.g. sr-232 to usb converter?
17:26 Mahmoud err, rs*
17:26 GargantuaSauce yes but you probably don't want rs232
17:26 GargantuaSauce http://dx.com/p/pl2303hx-usb-to-ttl-converter-module-149859
17:27 Mahmoud is that a serial interface that is most commonly seen on controllers instead of rs232?
17:27 GargantuaSauce yes
17:27 GargantuaSauce same signalling, different voltages
17:27 GargantuaSauce from the pc's viewpoint it's just a normal serial port
17:28 Mahmoud from my understanding, the PC will send high-level commands to the controller via the USB link, the controller thren translates that into how much voltate to send to the rotors to cause the desired effects, correct?
17:29 Mahmoud s/voltate/voltage/
17:30 GargantuaSauce well what exactly are these rotors
17:30 GargantuaSauce are they spun by DC motors?
17:31 Mahmoud i guess they are DC motors, brushless
17:31 GargantuaSauce brushless motors are not dc motors
17:31 GargantuaSauce what are we talking about exactly
17:31 Mahmoud i never did any robotics or electronics previously. but i do know some AI. would be very fun if i get my hands dirty on some h/w
17:31 GargantuaSauce is this a quadcopter?
17:31 Mahmoud probably
17:31 GargantuaSauce can't give much advice without solid info here :P
17:32 Mahmoud heh
17:33 GargantuaSauce if we are talking about hobby brushless motors + ESCs, you control those with the standard r/c pulse width modulation
17:33 GargantuaSauce a pulse of 1 ms = zero throttle, 2 ms = full throttle
17:35 Mahmoud 2ms worth of high voltage signal full throttle?
17:35 GargantuaSauce yes, and the cycle repeats every 20 ms
17:36 Mahmoud so i guess that's the clock rate?
17:36 GargantuaSauce calling it that is sort of a misnomer, but yes 50hz
17:37 Mahmoud is that signal sent to the controller?
17:37 Mahmoud or the motor directly?
17:37 GargantuaSauce to the motor controller
17:37 GargantuaSauce which has its own onboard microcontroller and switching transistors to do all the hard work
17:38 GargantuaSauce anyway if you are just getting started you'll probably just want to make something simple that drives around with two wheels
17:38 Mahmoud do i send the high/low voltage signal from the usb-to-serial cable?
17:38 GargantuaSauce no, you'd use a microcontroller
17:39 GargantuaSauce which would have hardware timers and pins that do PWM according to their values
17:39 Mahmoud so it's the microcontroller that sends high/low voltage, and the PC sends even a higher-level signal
17:39 GargantuaSauce yes, with the pc you'd send, say "throttle 50%"
17:40 GargantuaSauce and then the microcontroller would process that and set the length of the pulse to 1.5ms
17:41 GargantuaSauce in any case it sounds like you should be starting simpler
17:42 Mahmoud i'm thinking to start lower instead
17:42 GargantuaSauce get a microcontroller dev kit in any case
17:42 Mahmoud now, i know how to make something rotate by electricity and some permanent magnets
17:42 GargantuaSauce lots of people start with the arduino but i do not recommend that
17:43 GargantuaSauce since you are into ai stuff you may as well get to play with something with a reasonable amount of processing power
17:43 Mahmoud but i dont' even know how microcontrollers work
17:43 Mahmoud i mean, i will find it sad to just treat a microcontroller as an API and let stuff work magical
17:44 GargantuaSauce that is a good attitude to hold :)
17:44 GargantuaSauce you probably want to look at digital design and computer architecture then....lots of theory to cover before anything remotely practical happens though
17:45 Mahmoud yeah, but i lack enough brain, so thought an irc boost would be good
17:45 GargantuaSauce a microcontroller is not too far off from a PC except with a much much smaller scale and everything is onboard the one chip
17:45 GargantuaSauce a cpu, memory, flash, peripheral interfaces
17:46 GargantuaSauce have you programmed in c?
17:47 Mahmoud yeah, some serious apps
17:47 Mahmoud but no serious apps in assembly yet
17:47 GargantuaSauce http://ca.mouser.com/ProductDetail/STMicroelectronics/STM32F4DISCOVERY/?qs=%2fha2pyFaduir1kdSGBL9rdaVbLSpsRTA8aCZ8l%2fICcjHFJ0oeUKTFw%3d%3d
17:47 GargantuaSauce this is what i use, i'm quite fond of it
17:48 GargantuaSauce if you ignore the (arguably terrible) APIs that ST provides, all configuration and io manipulation is done by reading and writing memory-mapped registers
17:48 GargantuaSauce (which is the case for most microcontrollers)
17:49 Mahmoud what does it exactly do? i load some binary files into its flash and then sends signals to some serial ports that i should collect to a motor's controller?
17:49 GargantuaSauce you load a binary into its flash and it does whatever the hell you want it to
17:50 Mahmoud i mean, what is the output exactly (assuming i do not connect anything)
17:50 GargantuaSauce if nothing is connected, what are you outputting to? :)
17:51 GargantuaSauce there are some LEDs on that dev board, and an audio output if you're so inclined to use it
17:51 Mahmoud should i solder wires into the many vertical holes?
17:51 GargantuaSauce it comes with male headers
17:52 GargantuaSauce i use female-female jumpers to connect it to stuff but soon i'm going to make protoboards with female headers
17:52 GargantuaSauce anyway it has pretty much every peripheral interface you're going to want to use
17:53 GargantuaSauce lots and lots of GPIOs, timers with PWM outputs, SPI, I2C
17:54 GargantuaSauce what sort of AI techniques are you looking to implement
17:55 GargantuaSauce the f4 is powerful enough so that you may be able to do them without even involving the pc
17:56 Mahmoud AI stuff as in analyzing inputs from sensors and reacting to them
17:56 Mahmoud i'd love if i can do stuff over wifi or any wireless communication such that the robot can retrieve knowledge from a knowledge base
17:56 Mahmoud or if i can use machine learning and model generation on a powerful computer and communicate commands to the cheap robot
17:57 GargantuaSauce well i havent tried this yet but you could probably get reasonable performance doing a feedforward NN+backpropagation learning on this one
17:57 ace4016 lol...machine learning...
17:57 GargantuaSauce anyway as far as wireless goes there are a few options
17:57 ace4016 waste of clock cycles
17:58 Mahmoud yeah, i thought of offloading machine learning into a desktop machine and let the communication over wireless signals
17:58 GargantuaSauce personally i use the nrf24l01+ because modules with it are ridiculously cheap
17:58 GargantuaSauce it has an spi interface so on the pc side you'd want to use another microcontroller + the aforementioned usb uart
17:58 Mahmoud e.g. robot reads sensor values, sends them to desktop PC via wireless, desktop returns actions like what to do
18:00 GargantuaSauce if you want the microcontrollers to just basically be i/o slaves to a pc you could probably use something much less powerful
18:01 GargantuaSauce lots of people in here use AVRs exclusively
18:01 GargantuaSauce just stay the hell away from arduino
18:05 Mahmoud bloated?
18:07 GargantuaSauce on the software side yes, and it hides all the details from you and limits its flexibility to a ridiculous degree
18:07 GargantuaSauce and simply overpriced for what it is in terms of hardware
18:07 Mahmoud i somehow never liked arduino for an unknown reason
18:07 GargantuaSauce well that'd be in line with your attitude of actually trying to learn how stuff works
18:08 GargantuaSauce its use kind of produces the opposite approach in a lot of people i think
18:08 GargantuaSauce which is terrible
18:09 GargantuaSauce this is a field where i feel it is absolutely essential to understand everything that is going on
18:09 Sypheren When using any coding language, (my situation is whatever processing uses), some projects are contained within multiple files of code, is it possible to have all that code in one file? If so, how?
18:11 GargantuaSauce speak of the devil...
18:12 GargantuaSauce you could potentially copypaste it all into one file
18:12 GargantuaSauce i imagine whatever reason you have for wanting to do so is probably pretty ridiculous though
18:59 RifRaf ace4016 did some tests with the colour sensor outdoors before, was way too much for it, all values were maxed out the whole time
19:00 RifRaf i wonder if i use bigger values tha n 65335 for R G and B what would happen
19:16 RifRaf nope thats causes too many isses
20:14 ace4016 i found rue on youtube! http://www.youtube.com/watch?v=jLBDqchND0s
20:25 ace4016 RifRaf, maybe you need sensors more tuned for the outdoors; the ones you have currently might be tuned for lowish light (indoor lighting)
20:26 home I need
20:27 home a nice 9000mah usb li-po battery
20:28 RifRaf ace4016 yep , happy to keep this for indoor use, can machine a cover with ND filter if i do want to use outdoors
20:28 RifRaf rewrote all the code for colours today, still need to do work on the blacks whites and greys but is pretty close
21:14 MrCurious i hear this is going to be the google for robots http://rapyuta.org/rapyuta-the-roboearth-cloud-engine
21:14 MrCurious robots ask it whats this, it says... a cat
21:16 MrCurious anyone here done a balance bot?
21:18 ace4016 nope, but i've been meaning to...
21:18 ace4016 well, i'm sure someone here has but...
21:19 ace4016 figured my controls specialty would go to waste if I never created a balance bot :P
21:19 GargantuaSauce i am working on one as we speak
21:19 MrCurious nice
21:20 MrCurious a friend gave me a pair of hand puppets a boxing nun and a boxing devil...
21:20 MrCurious i figure automate them with servo's, put on a balance bot, and teach them to hate each other
21:20 MrCurious youtube gold
21:20 MrCurious or super offensive. cant decide
21:24 ace4016 heh
21:30 GargantuaSauce ah....nothing like the smell of burning epoxy to tell you you're doing it wrong
21:37 GargantuaSauce oh blew up the vreg
21:37 GargantuaSauce i guess it didnt like having battery on one side and usb on that other...that was dumb
21:37 GargantuaSauce glad i didn't fry the usb port
21:49 GargantuaSauce oooh i popped the mcu too
21:49 GargantuaSauce go me
21:51 Sypheren [17:59] <GargantuaSauce> i imagine whatever reason you have for wanting to do so is probably pretty ridiculous though
21:51 Sypheren Isn't every newbie coder's project ridiculous?
21:51 GargantuaSauce maybe
21:52 GargantuaSauce i suggest you find a better solution in any case
21:52 Sypheren Ah, it wasn
21:52 Sypheren Wasn't a problem* I was just curious
21:53 Sypheren Since I'm looking at a source code that already runs well, I'd just like to modify it a bit so that it can run faster