#robotics | Logs for 2016-09-16

Back
[04:18:51] <Snert> udp is used primarily for data that is not critical. Data that can be requested a 2nd time if it does not get through the 1st time.
[04:19:16] <Snert> whilst TCP is used for data that *must* get through.
[04:20:19] <Snert> DNS and NTP are 2 eaxmples of non-critical data.
[04:28:34] <Jak_o_Shadows> It's often better to just blast UDP out fast, and worry about losing data somehow else
[04:49:37] <Snert> yea. error correction/control and requesting resends is a part of TCP.
[04:50:43] <Snert> but these arduinos don't really have a complete TCP/IP stack as far as I know.
[05:03:36] <Jak_o_Shadows> I have a friend who has an ESP shield they're using for wifi
[05:03:47] <Jak_o_Shadows> problem is, they managed to program the esp with some garbage
[05:06:48] <Snert> so wiping it and going back to ground zero must be not what they did?
[05:07:28] <Jak_o_Shadows> Well, they can stil program it, but now they have to do the code themselves / find it
[05:07:37] <Jak_o_Shadows> It's not a dumb serial bridge
[05:11:55] <Snert> yea. I just lost all my arduino shit when windows10 happened to me :(
[05:12:21] <deshipu> Jak_o_Shadows: there are lots of firmwares for esp that do dumb serial bridge
[05:12:38] <deshipu> Snert: friends don't let friends use windows
[05:12:53] <Snert> you'd love my mac :)
[05:12:54] <Jak_o_Shadows> Yeah, deshipu, I said in vague methods what to search for.
[05:13:07] <Snert> I RDP over to the windows box to do arduino stuph.
[05:13:08] <Jak_o_Shadows> Being able to program the ESP by itself has complicated searching thing
[05:13:31] <deshipu> Snert: arduino ide works fine on the mac, I think
[05:13:42] <deshipu> Snert: it even works on a rpi
[05:13:48] <Snert> yes, it does. I keep things operational on both platforms.
[05:14:01] <deshipu> Snert: why?
[05:14:22] <Snert> vertical market applications.
[05:14:45] <Snert> applications for which there is no mac version, or no linux version.
[05:15:18] <Snert> lots of stuff is like that.
[05:15:31] <deshipu> for example?
[05:15:35] <deshipu> for arduino?
[05:16:06] <Snert> not that in 'ticular but I have enuff other stuff that it's a worthwhile thing.
[05:17:14] <Snert> ESC castle creations speed controllers for one.
[05:17:26] <Snert> there is no mac version of the software.
[05:17:31] <Snert> nor linux version.
[05:18:26] <Snert> industrial building control software too. There's almost never a mac version of that.
[05:19:21] <Snert> I have to live in all 3 worlds.
[05:23:34] <deshipu> that sucks
[05:30:24] <Snert> elements of trubbleshooting are exactly the same no matter what it is.
[05:30:40] <Snert> no matter what platrom or software. It's all just logic.
[05:31:22] <Snert> if it posses a transistor then I get called on to deal with it.
[05:31:24] <deshipu> well, on windows you only have the documentation, if even
[05:31:35] <Jak_o_Shadows> Yeah, but you have to deal with remembering what terminal command clears the screen on each system
[05:31:39] <deshipu> you can't check the source
[05:31:47] <deshipu> which complicates things a bit
[05:31:52] <Snert> yes, and that's why I sometimes opt for the windows version of things.
[05:32:13] <Snert> when I get tired of sifting crappy linux docs I get the windows version.
[05:32:25] <deshipu> usually the docs are from the previous version anyways, and don't cover the corner cases
[05:32:39] <deshipu> code never lies
[05:32:54] <orlock> much
[05:34:28] <Snert> I keep the arduino.org version of things on my mac for dealing with their boards.
[05:35:04] <Snert> and keep the .cc versions on my windows box just to have a clean comparison at times.
[05:35:41] <Snert> meanwhile, I use linux for all my home network services.
[05:36:33] <Snert> I go to the platform for which the software was written natively. (at times).
[05:36:52] <Jak_o_Shadows> I just get confused between linux (clear), windows (cls), matlab (clc for clearing the screen, clear for clearing variables)
[05:40:20] <deshipu> I just press ctrl+L
[05:41:25] <Snert> I get frustrated and just reboot and get a beer.
[06:59:37] <z64555> how odd, I can smell the coffee brewing from my room.
[07:12:28] <z64555> power supply...
[07:12:29] <z64555> hm.
[07:12:43] * z64555 looks at the ancient power supply that once powered a ham radio
[07:14:18] <z64555> oh, its only a 5V
[07:14:35] * z64555 remembers a PC power supply
[07:14:49] <Jak_o_Shadows> I have a couple of pure transformer bricks that I am going to shove a bridge rectifier on
[07:15:38] <z64555> I need a supply for extended testing of the quadrotor. idea is to make a cradle for it and hook it up to a laptop and a wired power supply
[07:16:13] <Jak_o_Shadows> It can be somewhat annoying getting higher power.
[07:16:24] <Jak_o_Shadows> I have a friend who said "bugger it" and now has 3 car batteries
[07:38:13] <z64555> mkay, a 200W supply will give at most 16A
[07:38:17] <z64555> running at 12V
[07:38:31] <z64555> which should be good enough for motor tests
[07:39:48] <z64555> I'd like to have a readout of the voltage, current, and power being pulled, too
[07:54:54] <z64555> cheapest way to do it would be to probably buy a second voltmeter
[07:55:07] <z64555> have one set to voltage, other set to current
[07:56:00] <z64555> I *could* forego the second voltmeter and just measure the current. and assume that the voltage output from the powersupply is constant. (after verifying it)
[07:56:20] <z64555> yeah, that would work
[08:04:05] <Jak_o_Shadows> Cheap dmm's are cheap
[08:04:18] <Jak_o_Shadows> Like, I bought new probes the other day, and I almost have bought new dmms
[08:05:34] <z64555> we have a local Harbor Freight store, which is basically a bargain shop for tools and hardware
[08:05:50] <z64555> they sometimes have promotions where you buy a thing, and get a dmm for free
[08:06:11] <z64555> or you can buy the dmm for like, $1 or something ridiculous like it
[08:07:16] <Jak_o_Shadows> How would you do current?
[08:07:54] <z64555> its, uh. built into the dmm? I said voltmeter but meant dmm/digital multi meter
[08:08:19] <z64555> and with current, you tie the dmm in series with the load under test
[08:08:26] <Jak_o_Shadows> The current measurement is pretty limited though?
[08:08:42] <Jak_o_Shadows> Or at least, they go "10 seconds max"
[08:09:36] <SpeedEvil> Only for the 10A range
[08:09:42] <SpeedEvil> and only actually at 10A
[08:09:58] <SpeedEvil> at 3A, it'll not overheat in forever
[08:10:05] * z64555 looks at his dmm
[08:10:31] <Jak_o_Shadows> That is good to know
[08:10:42] <z64555> yeah, it's rated for 10A. if it shows that I need to measure a higher current, I've got some resistors I can use as a shunt and switch the dmm to read the voltage off of them
[08:14:02] <z64555> just use something like a 10, 100, or 1K bundle of resistors, the number of resistors in parallel would be dependant on their power rating
[08:14:30] <z64555> most carbon film resistors are, what? 0.5W?
[08:15:54] <z64555> 0.25 or 0.125
[08:16:31] <z64555> no biggie. I've got a buttload of resistors in a plastic organizer box
[08:18:17] <z64555> and I won't have to use a whole lot of them. they're not going to be the main load, just a tertiary load to where I can grab voltage off of it
[08:46:00] * z64555 tries to remember that "new" variation on the PID controller
[08:48:16] <z64555> I linked it here, some time ago
[08:48:24] <z64555> maybe it's still in the backscroll
[08:49:28] <z64555> nope
[08:49:53] <z64555> it was called a... PI rate? PI Delta?
[08:50:26] <z64555> instead of doing a differential, it did something with the delta value
[08:52:39] <z64555> not differential, derivative
[08:54:33] <z64555> it might've been an extension/combination of two PI controllers, one on the controlled variable and one on its delta
[09:01:25] <z64555> yeah, I think that's what it was
[09:03:54] <z64555> the effect of placing a PI on the difference would yield more control on how fast/how much of an impact the rate has on the x0 control
[09:05:09] <z64555> where a PID is just a simple additive merge of a P, a PI, and a PD controller
[09:07:06] <z64555> there's a trick you can do on the rate integral, as well. You can set an upper and lower limit of the rate's influence by setting the maximum amount the accumulator can hold
[09:10:43] <SpeedEvil> If you don't know why PID is fucking up, your chances with picking another control algorithm are likely to be poor
[09:18:09] <z64555> well, that isn't a wrong observation. :P
[09:21:25] * z64555 looks at his code, and wonders why he hasn't made the PID struct into a class
[09:21:58] <veverak> like change the keyword or in practicall usage?
[09:22:01] <veverak> :)
[09:22:07] * veverak writes objects as struct always
[09:31:50] <rue_house> PID is a pain in the ass to tune
[09:32:05] <rue_house> esp if you dont have a digitial storage scope
[09:35:25] <z64555> PI isn't as big as a problem as the PD is, in regards to tuning
[09:35:56] <z64555> hence the previous fascination with the PI-rate controller design, or whatever they're calling it
[09:37:01] <rue_house> it turns out I'v been doing rolling averages wrong
[09:37:08] <z64555> o rly
[09:37:14] <rue_house> yea
[09:37:29] <rue_house> prolly affected my pid code
[09:37:39] <z64555> how have you been doing rolling averages?
[09:38:16] <rue_house> current average = (last average + new sample)/2
[09:38:50] <rue_house> I was testing it while doing some ADC code
[09:39:07] <rue_house> I dont know where I got that alg from, its quite wrong
[09:39:26] <z64555> yeah, that's the naive rolling average. :D
[09:39:44] <rue_house> at best its out by 2x
[09:39:46] * z64555 hunts for a pen and pad
[09:45:53] <z64555> yeah.
[09:46:48] * z64555 tries to remember the formula
[09:48:41] <rue_house> http://paste.debian.net/825417/
[09:49:31] <rue_house> they have to be weighted as you go
[09:50:34] <z64555> coulda sworn there was a formula that was iteration independant
[09:50:48] <z64555> that wasn't the naive average
[09:57:08] <rue_house> if you work it out, give me a shout
[10:10:43] <z64555> hm, I must've been thinking of something else
[10:11:07] <z64555> there's no way to get an average of the entire data set without tracking your iteration/sample number
[10:13:51] * z64555 wonders where his trash bin went
[10:14:29] * z64555 found the trash bin
[10:38:25] <z64555> rue_house: you ever put a limit on your accumulator for you PIDs?
[16:25:39] <z64555> hm, I hadn't thought of that before
[16:26:33] <z64555> you can place a deadband on the PID, where the output of the controller won't change for small error deltas
[16:27:35] <z64555> so you can save a few clock cycles from calculating the PID if the delta is too small to make a dent
[16:39:25] <z64555> hmm, I also hadn't thought of cascading PID's. I originally though of having them in parallel, but having them cascaded makes more sense
[17:08:43] <z64555> blah, I need to re-do a z-transform of an integration and derivative again
[17:09:02] * veverak is working on robot
[17:09:05] <veverak> still avoiding both
[17:09:07] <veverak> *PID
[17:09:11] <veverak> still avoiding PID
[17:09:13] <veverak> :)
[17:09:55] <z64555> I saw a complex equation on wikipedia that contradicted my own simpler implementation of a discrete-time PID
[17:10:23] <veverak> also, I suppose there should exist proper C++ implementation?
[17:10:53] <z64555> yeah, but as far as I know, everyone makes their own implmentation
[17:11:10] <veverak> wonder why...
[17:13:29] <z64555> so they can learn how PID's work, and maybe make a groundbreaking trick?
[17:17:17] <veverak> not sure
[17:17:28] <veverak> because, if you know how it wokrs and just want to sue it? :)
[17:18:18] <veverak> I mean
[17:18:34] <veverak> we are talking about basic principle that "don't write things twice pointlessly"
[17:19:03] <z64555> it's not pointless, it's a learning experience. :D
[17:19:21] <veverak> oh
[17:19:30] <veverak> and you learn something everytime you write it?
[17:19:47] <veverak> why don't we trash out all libraries and write everything by ourselfs to learn something everytime?
[17:19:49] <veverak> :)
[17:20:28] <z64555> nah m8, make your own library or set of functions etc. and improve upon it as you learn
[17:20:36] <veverak> but why?
[17:20:38] <veverak> nah
[17:20:50] <veverak> forget it, evidently doesn't make sense to explain
[17:21:18] <z64555> again, learning experience. If you really don't care about what you're using, then you can use somebody else's library and pin the blame on them if something goes wrong.
[17:21:34] <z64555> :P
[17:21:41] <veverak> I don't mind that somebody does it because of learning experience
[17:21:44] <veverak> and I do/did the same
[17:22:04] <veverak> it's just that after I did it that way, next time I prefer to pick some solution that is used a lot and debugged porperly
[17:22:06] <veverak> ;)
[17:22:16] <veverak> so, again, I suppose there should exist one
[17:26:46] <z64555> so what are we arguing about? lol
[17:47:01] <Krieger-sama> Hopefully about how to build a sexbot.
[17:48:24] <veverak> nah
[17:48:26] <veverak> real thing is real thing
[17:50:43] <z64555> again with the sexbots. why is it always sexbots
[18:01:38] <robopal> because he already tried the vacuum cleaner and didnt work
[18:01:47] <robopal> sorry :P
[18:11:18] <robopal> https://www.youtube.com/watch?v=gTt_YBzJ_Dk
[18:21:18] <ace4016> hehe that's kinda cool
[19:18:48] * z64555 glances at the chinglish on the side of a box
[19:19:03] <z64555> "Shiny 4 digits red LED's to display the measured values"
[19:20:11] <z64555> perhaps they meant "Bright red 4-digit LED display"