Captain Cool posted:Stitching images together will increase your field of view, but it won't give you a clearer image. If you can aim the cameras with sub pixel accuracy (or at least calibrate for sensor position/direction with the same sub-pixel accuracy), you can blend the images together to improve resolution. That being said, the parallax introduced by the offset of the cameras will introduce issues with that, and may hose the merge for anything but objects a certain fixed distance from the sensor.
|
|
# ? Nov 10, 2015 20:33 |
|
|
# ? May 30, 2024 02:48 |
|
Not to mention the application code is expecting the mouse sensor to be pre-chewing the data and is acting off of the higher-order drift it's delivering. So beyond porting your image-stitching algorithm onto the arduino, you'd need to replicate whatever that algorithm is doing down to matching it's behavior on SPI somewhere. Now that I write all that snark out it might be possible to grab multiple drift values from different sensors and interpolate them intelligently before delivering the result to the APM, but this is still a big, difficult project that requires digging into a lot of interfaces.
|
# ? Nov 10, 2015 20:48 |
And it all needs to be done in realtime!
|
|
# ? Nov 10, 2015 20:56 |
|
Wow I expressed that poorly. Let me rephrase. First, here's a youtube video: https://www.youtube.com/watch?v=G519KyjFE5c This is a whole bunch of drones being controlled at once via a single laptop. I want to control a single drone and also have it be able to avoid running into trees without me paying too much attention to it. I hoped/guessed that I wouldn't need an entire i7 for that. But also I'd like to be able to say to my flight drone, "Hey drone, go east 600m and then return and land." I can do that right now if I click on things in a software package in my laptop. I specifically don't want to carry my laptop with me wherever I take my flight drone. Instead I'd like to mount bunch of sensors on it so it can look at stuff. I want one pointing down, and then another one that's ether mounted on a gimbal, or a whole bunch of them pointed in every direction. The idea is that when I say "go east," it can first look east, determine whether or not there's a big rock in the way, and increase altitude accordingly. Do you reckon that maybe controlling one mouse sensor on a gimbal might be easier than a whole bunch of sensors pointed everywhere? I've never done anything like this before and I don't know even the right questions to ask. It's like a Dunning Kruger thing except based off your reactions I have surmised that what I'm asking for is likely unfeasible.
|
# ? Nov 11, 2015 04:00 |
DreadLlama posted:https://www.youtube.com/watch?v=G519KyjFE5c Looks more like the 2015 Sydney Light Festival to me. Is there a timestamp we're looking for here?
|
|
# ? Nov 11, 2015 04:05 |
|
gently caress, sorry. My citation game is garbage. fake edit: actually the thread was linked at me in the flight drone thread and I never checked the timestamp. But now that I've gone looking for it, I have a different question: I would like to mimic Intel® RealSense™ Technology and feed its output to my flight drone. Can an arduino do this?
|
# ? Nov 11, 2015 04:23 |
|
DreadLlama posted:... What you're describing is something that's incredibly sophisticated to do in the real world. People are writing entire PhD thesises on the subject and companies like Google, Uber, etc. are spending hundreds of millions of dollars to achieve it. Just determining if there's something in the way is very difficult. You can try a computer vision based approach but then that won't work in bad lighting conditions, it might get confused by shadows, and countless things. You might try to use lidar but then how do you deal with reflective objects like water (that look like a big hole to a lidar system). You could try radar but it's very expensive and heavy to put that kind of equipment in a drone. Even once you have a 3D understanding of the world around you how do you figure out the best path? Like you said you could increase altitude to avoid an obstacle but what if increasing altitude smashes the drone into a power line or even other drone flying above you at the right time? It's a very, very hard problem to solve. And it's an order of magnitude harder to solve on a tiny drone that has to carry its own computing power in the air (I would bet that problem isn't even solvable by anyone yet). That Intel demo is a controlled environment with no obstacles in the way. They can rely on outside sensors, like cameras mounted around the cage, to pinpoint each drone's location and instruct it exactly where to go. They can have beefy computers away from the drones crunching all the computer vision data and sending commands to the drone. Like I said before it kinda sounds like you're pretty new to drones and computer vision, AI, etc. so I'd definitely recommend finding an existing project and working on it or building on top of it until you understand the domain a little better. quote:I would like to mimic Intel® RealSense™ Technology and feed its output to my flight drone. Can an arduino do this? Nope, not a normal Arduino. Remember an Arduino Uno has 2 kilobytes of memory--that's not even enough to store an icon that's on your desktop, much less an entire framebuffer of video and depth data. You're going to need a fast processor with a lot of memory. You're also going to need to find or create some pretty sophisticated image processing algorithms and optimize them so they're fast enough to run at 60+ frames per second. mod sassinator fucked around with this message at 04:56 on Nov 11, 2015 |
# ? Nov 11, 2015 04:52 |
|
Poe's law states that at this point in the conversation it is impossible to tell whether I am trolling or merely naive and optimistic. I do not wish to give off the appearance of hubris. I am merely eager. Also, I do not wish to appear rude, but it seems that arduinos are insufficient for the task I wish to undertake. You seem well-informed. I am not opposed to building an aircraft whose beams are pressure-treated 4x4s and whose motors' Wattage is measured in Horsepower. I am aware that this will be a decade-long endeavour and I am fine with that. Can you please tell me how you would recommend I best begin?
|
# ? Nov 11, 2015 05:12 |
|
DreadLlama posted:Poe's law states that at this point in the conversation it is impossible to tell whether I am trolling or merely naive and optimistic. I do not wish to give off the appearance of hubris. I am merely eager. Also, I do not wish to appear rude, but it seems that arduinos are insufficient for the task I wish to undertake. Yeah I don't mean to come across as snarky, but building the kind of AI to control a vehicle like you desire is not an easy problem. Tesla and Google can't even do it in two dimensions (https://youtube.com/watch?v=MrwxEX8qOxA) and they have hundreds of engineers and millions of dollars invested in it. Adding another dimension and shrinking it down to fit in a flying vehicle is exponentially more difficult. Honest answer on where to begin if you want to do it in the next ten years? Start by getting a PhD in AI from Stanford, MIT, etc. If you just want to have fun and play with drones, which is really cool IMHO, then I'd look at simpler projects to start. The mouse vision sensor is actually kind of neat and a cool thing to try adding to a drone. Trying to stitch a bunch together isn't really going to work, but try with one and see how it improves a drone's ability to loiter in a fixed position without GPS or other aids. Start simple and don't try to boil the ocean before you really know how big it even is.
|
# ? Nov 11, 2015 06:32 |
|
I will complete my MA in my current discipline before undertaking your advice. On the subject of PHd AI etc. : My focus is on linguistics. Specifically, teaching english to people who do not speak English. I got on this path by being a directionless white guy with a degree who moved to asia. That stage of my life is over and I really, really want to work on machine interaction with humans / environment. Thank you for not dismissing me.
|
# ? Nov 11, 2015 06:40 |
|
There's nothing wrong with lofty goals. There's a very large gap, though, between what you want to do and what you appear to currently know about the subject. That's fine, you have to start somewhere...but you should probably be starting somewhere much simpler. Honest suggestion? If you want to play around with autonomous vehicles, start at the ground. Get a radio-controlled rover platform for cheap from HobbyKing, pick up an Arduino and some motor drivers and ultrasonic rangefinders, and see what happens. Sure, you can just buy a quadcopter with a lot of autonomy built-in, but that's not a suitable place for you to start digging through code and trying to understand what's going on. Just making a rover drive around and avoid obstacles will teach you about microcontroller programming, sensor reading, data processing, motor control, and all of the basic algorithms currently used to accomplish various autonomous-vehicle tasks, in a platform that can't flip over and fly full-speed into the ground and destroy itself because of a single-line code error.
|
# ? Nov 11, 2015 07:40 |
|
I have to ship two animals via air, each in a separate container. It's about a 3 hour transit time, plus loading, unloading, probably 6 hours all told I want to put a blinky red LED on the top of each. I'm not super keen on them getting lost or whatever. Probably total paranoia, but whatever. What's the best way to do this. I have a couple of 3.7v 18650s as a power supply. Just feed the 18650 in to the 5v rail, then setup a blink.c sketch?
|
# ? Nov 11, 2015 08:58 |
|
Even if the TSA is somehow okay with you putting a homemade electronic device with a flashing red light into the belly of an airplane, I don't think you're allowed to ship lithium batteries that way. Yes, it will technically work to connect a single 18650 cell to the Vcc pin of your microcontroller. The battery will run between 4.2v and maybe 3.0v from full charge to discharged. However, the Arduino or whatever will continue to run down to like 1.8v, overdischarging the battery and creating a fire hazard. What exactly do you think having a red light on top of the crate will do anyway? Do airlines regularly lose live animals? Sagebrush fucked around with this message at 09:44 on Nov 11, 2015 |
# ? Nov 11, 2015 09:40 |
|
Hadlock posted:I have to ship two animals via air, each in a separate container. Maybe it'd look less sketchy if you used an off the shelf bicycle tail light? I'm not really sure what a blinky LED will do for loss prevention, though.
|
# ? Nov 11, 2015 17:26 |
|
Yeah in retrospect, attaching some homebrew electronics to the outside of the box is more likely to get me a visit by the same jerks that roughed up that muslim clock kid in Texas last month. The bicycle light idea is pretty good and less bomb-y looking.
|
# ? Nov 11, 2015 18:38 |
|
Is there a detailed list of Arduino compatibles? I'm looking for a 32bit Arduino platform the size of the Zero, but with actually 12bit PWMs (the Zero has only 8bit ones, the Due is almost too big). I know of the Teensy, but I'm looking for something with mounting holes and easily accessible headers.
|
# ? Nov 11, 2015 20:31 |
|
Combat Pretzel posted:Is there a detailed list of Arduino compatibles? I'm looking for a 32bit Arduino platform the size of the Zero, but with actually 12bit PWMs (the Zero has only 8bit ones, the Due is almost too big). I know of the Teensy, but I'm looking for something with mounting holes and easily accessible headers. Check out the STM32 Nucleo series: http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847?sc=stm32nucleo Look at the STM32F4 chips for the top of the line ones, like this one has 180mhz, 512kb of flash, and 3 12-bit ADCs: http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF262063 There might be a less powerful one that has a higher bit ADC though so check out their datasheets. They can hold Arduino shields but they don't have Arduino IDE support, so you'll need to use their toolchain and port over Arduino libraries to work with it.
|
# ? Nov 11, 2015 21:35 |
|
Looks certainly interesting, altho I don't think that snap-off programmer module is of advantage for a quadcopter flight controller That said, I'd still like to stick with Arduino (compatibles). Researching some more, the Arduino reference claims that the Zero does 12-bit after all, even tho the product page doesn't mention it, only mentioning 8-bit. Unlike the Due product page, which specifically mentions 12-bit. quote:The Zero has the following hardare capabilities: --edit: And what's this Arduino.cc/Genuino vs Arduino.org business about? Combat Pretzel fucked around with this message at 00:17 on Nov 12, 2015 |
# ? Nov 11, 2015 23:37 |
|
Combat Pretzel posted:--edit: Here's a rundown: http://hackaday.com/2015/03/12/arduino-v-arduino-part-ii/
|
# ? Nov 12, 2015 00:29 |
|
Ah well, in Europe there's currently only the Arduino.org M0 Pro out, all Genuino stuff's out of stock. But it takes two seconds to flash the Arduino.cc bootloader onto the Arduino.org one. Also, I found a solution to my PWM questions, programming the Cortex M0 timers to do PWM with custom frequencies and duty cycles.
|
# ? Nov 12, 2015 00:46 |
|
If the killer feature is just the 12 bit ADCs, consider that you can get external SPI or I2C ADC chips with any precision you like for a couple bucks.
|
# ? Nov 12, 2015 01:07 |
|
PWM, as in pulse-width modulation, not ADCs. I need to send pulses with specific widths/duty cycles to the ESCs of my motors. However, turns out that this 8-bit/12-bit story (pulse width defined in that resolution) is some stuff related to the Arduino library. If you dick around with the timers directly, you can do what you want. Breaking the related Arduino library code however.
Combat Pretzel fucked around with this message at 01:16 on Nov 12, 2015 |
# ? Nov 12, 2015 01:14 |
|
Combat Pretzel posted:Breaking the related Arduino library code however.
|
# ? Nov 12, 2015 01:29 |
|
Are there any good FFT libraries for low frequency signals? Im looking for something that can do ~ 0 to 3 Hz with ~ 1/60th Hz frequency resolution. Most of the stuff im finding is for audio analysis. Im trying to make an angular velocity sensor for bicycle pedaling rpm using a LED and a photoresistor with cutouts on a disc to break the beam.
|
# ? Nov 14, 2015 20:13 |
|
All I know from FFTs is that they're frequency independent. If you put a buffer of N samples through a FFT, you get N/2 frequency bins ranging from 0hz to N/2 hz. Audio or any other data. As far as angular velocity goes, can't you just time things and calculate it from there? If you need a way to deal with the noise of the photoresistor, implement a Schmitt trigger. If you're dealing with varying ambient light messing up your poo poo, keep sampling an average and work it into the trigger code.
|
# ? Nov 15, 2015 01:34 |
|
For a signal of 3Hz +/- 0.5%, an interrupt-driven timer/counter should work fine and take like one-hundredth as much CPU time as any sort of fourier analysis. Follow all the regular rules for interrupts and you shouldn't have any problems. A photoresistor isn't the best method to go about this because you'll have to run an analog conversion and make a logic decision for each slot on the wheel (unless you use the internal analog comparator or something). A phototransistor is a better choice, since you get an unambiguous digital signal. If you're having trouble with an optical pickup, consider using a hall-effect sensor and magnets instead. Most automotive speed sensors use that system because it's super robust. Sagebrush fucked around with this message at 02:12 on Nov 15, 2015 |
# ? Nov 15, 2015 02:10 |
Sagebrush posted:If you're having trouble with an optical pickup, consider using a hall-effect sensor and magnets instead. Most automotive speed sensors use that system because it's super robust. The cool part about that would be that if you wanted, you could put a small rare earth magnet inside the tire, between the tube and the outside (road-meeting) wall of the tire, and then tuck the sensor up inside the center of the fork, nice and cozy and protected and possibly not even visible!
|
|
# ? Nov 15, 2015 02:18 |
|
I have a question about storing variables in Arduino code. I'm not sure if I have a global/local problem. To rehash my project: A room has an IR-remote controlled fan wired into a switch. However, each time the lights are switched off, you have to use the remote to turn the fan back on. I would like to automate this with a photoresistor. I'm using code from here: https://learn.adafruit.com/adafruit-arduino-lesson-9-sensing-light/arduino-code I have sniffed the IR codes and successfully blasted them using my arduino, but now the problem is that it will continually blast the IR codes. I need the arduino to keep track of the state of the Fan and while the photoresistor keeps track of the lights. I figured I could do this by setting two variables. I end up with a machine that has 4 states. Here's the important part of the Adafruit code I want to recycle: code:
Here is a table of the four states. See the list below for what the arduino's behavior should be. code:
2 - Lights are off, but the fan is on. 2 possibilities A) The lights have been turned off or B) Someone covered the photoresistor to prove the arduino was working. In either case, blast the Power Off code and set the "Fan" state to "off". If the lights are powered off at the switch, the fan will not have power, the code won't be received, so no harm done. 3 - Lights are on, but the Fan is off. Someone must have just turned on the lights (or waved their hand in front of the sensor). Blast the Power On code and set the "Fan" state to "on". 4 - Lights and Fan are both off. Do nothing. Set "Fan" state to off. This is for nighttime and lunchtime. Now let me throw a monkey wrench in the mix: 1) I want to place 3 buttons to replicate the remote(power, direction, off). Also, I don't want to use True/False values for the Fan variable since it actually cycles 3 modes; low, medium, high. I'm not sure where to place these in the code to "override" or "ignore" the light sensor subroutine. 2) Not a huge issue, but there must be a way to run both the LED update code and the IR blast code at the same time? I need to put a wait delay of approximately 500 ms before each code. Technically the power on sequence is "Power On, Power On, Direction" for about 1.5 seconds the shift register stays at its current value. So how do I update a global variable? What's the code? I can post my code I tried tomorrow. Now 3 hardware questions: 1) I want to put a physical switch to turn off power to the shift register and LEDs. There is always voltage leak from the 3 shift register pins, even if VCC isn't connected. Is the best way to put a switch on the ground? I suppose I can just use the power bank's on/off function as power for the whole unit. 2) I want to run this off an external power bank + solar cell. I can get an arduino Nano knock off for 3 dollars. How do I calculate how large of a battery and solar cell I need? 3) The IR received on the fan is obscured by the fan grill at certain angles. Can I cluster a few wide angle and narrow angle IR LEDs together like a TVBGone, but can I run them off a single transistor?
|
# ? Nov 15, 2015 12:26 |
There's nothing special about updating a global variable. Just declare it outside the void loop(), and then set it wherever.code:
code:
|
|
# ? Nov 15, 2015 14:09 |
|
That dumb rear end coin counter of mine is done. Now waiting for the mailman to deliver my Arduino M0 Pro to start working on my quadcopter flight controller. For the motion breakout board I'm looking at one with a MPU9250 9-DOF IMU and a MS5611 barometer. That good or any better suggestions? --edit: So yeah, the input pins of the Arduinos don't draw unnecessary current, do they? Say if I connect an analog pin with a voltage divider to a RC battery (something with 5Ah capacity that can output 20-40C), this will not blow up my board, right? In regards to implementing voltage sensing and such... Combat Pretzel fucked around with this message at 22:18 on Nov 15, 2015 |
# ? Nov 15, 2015 18:58 |
|
Combat Pretzel posted:So yeah, the input pins of the Arduinos don't draw unnecessary current, do they? Say if I connect an analog pin with a voltage divider to a RC battery (something with 5Ah capacity that can output 20-40C), this will not blow up my board, right? In regards to implementing voltage sensing and such... Nothing draws any more current than the circuit resistance allows for. Pins set as inputs will have enough impedance to prevent you from blowing up the board when you apply a voltage that's within the board spec, so make sure your voltage divider can never result in more than 5.5v going to the Arduino side and you'll be fine. Also make sure that you're using large resistances, tens of kilo-ohms, so that you aren't burning up a bunch of your battery power in heat.
|
# ? Nov 16, 2015 01:25 |
|
Combat Pretzel posted:So yeah, the input pins of the Arduinos don't draw unnecessary current, do they? Say if I connect an analog pin with a voltage divider to a RC battery (something with 5Ah capacity that can output 20-40C), this will not blow up my board, right? In regards to implementing voltage sensing and such... In normal digital or analog input mode, the input impedance is about 10MΩ. The input pullup resistors are 20-50kΩ on most boards.
|
# ? Nov 16, 2015 04:57 |
|
politicorific posted:1) I want to place 3 buttons to replicate the remote(power, direction, off). Also, I don't want to use True/False values for the Fan variable since it actually cycles 3 modes; low, medium, high. I'm not sure where to place these in the code to "override" or "ignore" the light sensor subroutine. A state machine for every combination of inputs is going to multiply rapidly. I would approach it differently. Look for transitions in your input. If the lights were just turned on, and the fan is off, and it's not being overridden, turn it on. quote:Now 3 hardware questions: quote:3) The IR received on the fan is obscured by the fan grill at certain angles. Can I cluster a few wide angle and narrow angle IR LEDs together like a TVBGone, but can I run them off a single transistor?
|
# ? Nov 16, 2015 16:53 |
|
Say if I want to monitor the RPMs of my quadcopter motors but not bother my flight controller (--edit: being an Arduino Zero) with an interrupt storm or anything, I suppose I'd be better off getting some cheap rear end ATtinies (some 8-pin ones), hook up one phase of the motors to their INT0s (or something) using a voltage divider, and have them count the revolutions, and do some communications voodoo to the flight controller, say some low frequency PWM from the ATtiny to the flight controller (certainly resulting in a lot less interrupts)?
Combat Pretzel fucked around with this message at 17:01 on Nov 18, 2015 |
# ? Nov 18, 2015 16:55 |
|
Tinies make for good I2C slaves if that's easier to pass information around.
|
# ? Nov 18, 2015 17:38 |
|
Can the ATtiny85's do I2C? I thought that's for the larger ones only? I'd need to get a bunch for testing anyway, to see if they can even handle like guesstimated I think I saw a cheap testing kit on Amazon anyway, a bunch of different types of ATtinies. --edit: gently caress, I have my math wrong. It's RPM, not RPS. Yeah, a single ATtiny should be able to deal with all four motors. Combat Pretzel fucked around with this message at 18:28 on Nov 18, 2015 |
# ? Nov 18, 2015 18:20 |
|
Looks like the 85 has a USI that can speak uart or i2c. 88's are generally cheaper anyway. Do ESC's not report that information anyway? They have to be able to calculate that if they're enabling the low side properly. But I can understand not wanting to dig into simonk if it can be avoided.
|
# ? Nov 18, 2015 20:02 |
|
The ESCs should be aware of the switching speeds, there's however usually no way to get this information. On the electronics side, there are just the power leads and the PWM input, that's it. I'm sure there's probably some esoteric open source ESC that does report things, but it's not standard. It's mostly for telemetry purposes, so if I don't get it to work, it's no biggie.
|
# ? Nov 18, 2015 20:32 |
|
My nano clone mk2 arrived, this time with USB, so I got blinkenlights to work in short order. (I also can't find the other board any more...) I have a dumb question though - if I stick the pins into the breadboard and put the board on top, are the pins not supposed to make contact without soldering? My arduiono isn't getting any power and I don't want to solder, as that would kind of defeat the purpose of prototyping everything on the breadboard in the first place.
|
# ? Nov 18, 2015 22:12 |
|
|
# ? May 30, 2024 02:48 |
|
Sagebrush posted:There's nothing wrong with lofty goals. There's a very large gap, though, between what you want to do and what you appear to currently know about the subject. That's fine, you have to start somewhere...but you should probably be starting somewhere much simpler. That is a very good suggestion and I am now slightly embarrassed at not having thought of it first. I will build a roomba.
|
# ? Nov 19, 2015 02:33 |