Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bad Munki
Nov 4, 2008

We're all mad here.


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.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
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.

Bad Munki
Nov 4, 2008

We're all mad here.


And it all needs to be done in realtime!

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
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.

Bad Munki
Nov 4, 2008

We're all mad here.


DreadLlama posted:

https://www.youtube.com/watch?v=G519KyjFE5c

This is a whole bunch of drones being controlled at once via a single laptop.

Looks more like the 2015 Sydney Light Festival to me. Is there a timestamp we're looking for here?

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
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?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

DreadLlama posted:

...
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."

...

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.
...

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

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
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?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

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.


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?

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.

DreadLlama
Jul 15, 2005
Not just for breakfast anymore
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.

Sagebrush
Feb 26, 2012

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.

Hadlock
Nov 9, 2004

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?

Sagebrush
Feb 26, 2012

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

rawrr
Jul 28, 2007

Hadlock posted:

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?

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.

Hadlock
Nov 9, 2004

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.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

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.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Looks certainly interesting, altho I don't think that snap-off programmer module is of advantage for a quadcopter flight controller :v:

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:
- 10 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed to 12-bit resolution.
https://www.arduino.cc/en/Reference/AnalogWriteResolution

--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

n0tqu1tesane
May 7, 2003

She was rubbing her ass all over my hands. They don't just do that for everyone.
Grimey Drawer

Combat Pretzel posted:

--edit:
And what's this Arduino.cc/Genuino vs Arduino.org business about?

Here's a rundown:

http://hackaday.com/2015/03/12/arduino-v-arduino-part-ii/

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
:psypop:

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.

Sagebrush
Feb 26, 2012

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.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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

JawnV6
Jul 4, 2004

So hot ...

Combat Pretzel posted:

Breaking the related Arduino library code however.
Nah, it just opens up the joy of interfacing a new driver with legacy software's expectations

SanitysEdge
Jul 28, 2005
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.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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.

Sagebrush
Feb 26, 2012

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

Bad Munki
Nov 4, 2008

We're all mad here.


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!

politicorific
Sep 15, 2007
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:
void loop() 
{
  int reading  = analogRead(lightPin);
  int numLEDSLit = reading / 57;  //1023 / 9 / 2
  if (numLEDSLit > 8) numLEDSLit = 8;
  leds = 0;   // no LEDs lit to start
  for (int i = 0; i < numLEDSLit; i++)
  {
    leds = leds + (1 << i);  // sets the i'th bit
  }
  updateShiftRegister();
}
For my purposes, I can assume that if leds>=5 the "lights" are "on". If leds<=4 the "lights" are "off". I need to plug in code which updates a "lights" variable and runs a loop based on the following information:

Here is a table of the four states. See the list below for what the arduino's behavior should be.
code:
		Lights
		on	 off
fan	on	1	2
	off	3	4
1 - Lights and Fan are on. Do nothing. Set "Fan" state to "on" - 99% of work hours are spent here.
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?

Data Graham
Dec 28, 2009

📈📊🍪😋



There's nothing special about updating a global variable. Just declare it outside the void loop(), and then set it wherever.

code:
int fan_mode = 0;

void loop() {
   ...
   fan_mode = 2;
}
Also you generally don't want to either a) execute all your sensing/setting/action code on every single loop, or b) use delay() in any code that does more than basic demo stuff. You'll want to set a timer and only fire out the IR codes (say) once every second.

code:
#define IR_SEND_INTERVAL    1000

unsigned long ir_send_time = 0;

void loop() {
    if (millis() - ir_send_time > IR_SEND_INTERVAL) {
        // do your IR sending stuff
        ir_send_time = millis();
    }
}
Makes things much more manageable for debugging at the very least.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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

Sagebrush
Feb 26, 2012

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.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


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.

Captain Cool
Oct 23, 2004

This is a song about messin' with people who've been messin' with you

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.
First, figure out exactly how you want to use the override. Will it just override things until the lights change? Do you need an "auto" button to go back to the program?

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:
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?
Why are you using solar for an indoor installation? If the device gets a lot of sun, you'll have a hard time telling when the lights are on.

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?
Single transistor is okay, as long as it can handle the current. You'll need separate resistors for each LED.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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

JawnV6
Jul 4, 2004

So hot ...
Tinies make for good I2C slaves if that's easier to pass information around.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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 50KHz of interrupts reliably (12-pole 3-phase motors, up to 10K-12K RPM).

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

JawnV6
Jul 4, 2004

So hot ...
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.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
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.

mobby_6kl
Aug 9, 2009

by Fluffdaddy
My nano clone mk2 arrived, this time with USB, so I got blinkenlights to work in short order. :woop: (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.

Adbot
ADBOT LOVES YOU

DreadLlama
Jul 15, 2005
Not just for breakfast anymore

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.

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.

That is a very good suggestion and I am now slightly embarrassed at not having thought of it first. I will build a roomba.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply