#garfield Logs

Feb 18 2024

#garfield Calendar

03:40 AM rue_mohr: https://github.com/fdcl-gwu/aruco-markers
04:53 AM Tom_L: yes
12:20 PM rue_mohr: obfuscated_d, I'll go get the chart
12:22 PM rue_shop3: heh, mine runs even worse with that corrections
12:23 PM rue_shop3: its hard to know if you have the loop inverted, we could use something to tell you if the motor is going in the expected direction
12:26 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1300790.jpg
12:26 PM rue_mohr: obfuscated_d, so, the dot is the "current position"
12:26 PM rue_mohr: the trianlge is the expected stop position at the current velocity
12:27 PM rue_mohr: and the red is what I think maybe the system should do
12:27 PM obfuscated_d: yea makes sense
12:27 PM rue_mohr: an arrow being drive, and the box being stop
12:27 PM rue_mohr: but I dont think its all quite right
12:28 PM rue_mohr: little arrow with the dot in pencil is the direction of movement
12:29 PM rue_mohr: ah
12:29 PM rue_mohr: here is a catch for you
12:30 PM rue_mohr: the stopPos needs to be added or subtracted from the position depending on the direction your going
12:31 PM obfuscated_d: oh, I also set moveticks to 30000 on mine, if you were trying to run it. and I used that VLUT you provided for my motor
12:32 PM rue_mohr: ok
12:32 PM rue_mohr: those tables seemed to check out
12:32 PM rue_mohr: I updated that table generator code on github
12:34 PM rue_mohr: the more I chewed on it, the more it feels like a servo thats trying to set the target to 0 by controlling the velocity
12:36 PM rue_mohr: oh
12:36 PM rue_mohr: you can do the flag differently
12:36 PM rue_mohr: it'll just tell you that there has been no change
12:37 PM rue_mohr: for(flag = 0; !flag; ); that will wait for a change to the position before it breaks
12:38 PM * rue_mohr ponders this, "so inversely..." hmmm
12:39 PM rue_mohr: did you get a capture of the serial you were getting from it?
12:41 PM obfuscated_d: I'm messing with it now, I added the prints in just to see what's going on. I'll share
12:42 PM rue_mohr: yea, it would be nice to have some higher speed comms to really follow it
12:43 PM obfuscated_d: Current Error: 82
12:43 PM obfuscated_d:  Position: 80
12:43 PM obfuscated_d:  StopPos: 2
12:43 PM obfuscated_d: DriveState:PowerDown
12:43 PM obfuscated_d: ---------------------------------------------------
12:43 PM obfuscated_d: Current Error: -14
12:43 PM obfuscated_d:  Position: -40
12:43 PM obfuscated_d:  StopPos: 2
12:43 PM obfuscated_d: DriveState:Accel F
12:43 PM obfuscated_d: ---------------------------------------------------
12:43 PM obfuscated_d: Current Error: -166
12:43 PM obfuscated_d:  Position: -168
12:43 PM obfuscated_d:  StopPos: 2
12:43 PM obfuscated_d: DriveState:Accel F
12:43 PM obfuscated_d: ---------------------------------------------------
12:43 PM obfuscated_d: Current Error: -134
12:43 PM obfuscated_d:  Position: -136
12:43 PM obfuscated_d:  StopPos: 2
12:43 PM obfuscated_d: ---------------------------------------------------
12:43 PM obfuscated_d: Current Error: 76
12:43 PM obfuscated_d:  Position: 74
12:43 PM obfuscated_d:  StopPos: 2
12:43 PM obfuscated_d: DriveState:PowerDown
12:43 PM obfuscated_d: ---------------------------------------------------
12:43 PM obfuscated_d: this is just starting with a pulse. it doesn't always hit the condition for Reverse
12:44 PM rue_mohr: yea, thats a nice window into it
12:45 PM rue_mohr: I wanted to make an animation of what I put on paper and analize the situations a bit more
12:46 PM rue_mohr: https://paste.debian.net/1307724/
12:46 PM rue_mohr: I think if I make an 'error' like you did this will be clearer
12:47 PM rue_mohr: and I dont feel like I did that deadzone right
12:52 PM rue_mohr: shower, breakfast!
12:54 PM obfuscated_d: I loaded your code, it's actually hitting reverse now
01:14 PM rue_mohr: while in the shower I had a thought
01:14 PM rue_mohr: it was to look at the error from 3 perspectives, and choose what has the lowest
01:14 PM rue_mohr: accelerating forward, accelerating back, or coasting
01:15 PM rue_mohr: each represents a drive status, and each would have a different error outcome
01:15 PM rue_mohr: just choose the one with the lowest error
01:15 PM rue_mohr: not sure how to do that
01:16 PM rue_mohr: the table is explicitly for doing a 100% deceleration from your current speed
01:17 PM rue_mohr: which implies were kinda doing velocity control based on the system profile
01:18 PM rue_mohr: is my code chattering on your motor?
01:20 PM obfuscated_d: no chatter!
01:20 PM obfuscated_d: it is very bouncy though, due to the decel
01:22 PM obfuscated_d: I need to set up a controller as well, to send clean pulses. I'm using one of those rotary encoder knobs, and it's super noisy
01:32 PM rue_mohr: yea, EGMK is the performance limit
01:37 PM rue_mohr: ah, the error change cant be estimated when the velocity is zero
01:37 PM rue_mohr: so, if the error isn't getting smaller, accelerate?
01:37 PM rue_mohr: if the error is... ugh
01:37 PM rue_mohr: no
01:39 PM obfuscated_d: right, if velocity is 0, there is no error change
01:39 PM obfuscated_d: so, how do we handle that? We know what the the driveStatus is
01:40 PM obfuscated_d: so we know we should be seeking 0
01:40 PM obfuscated_d: if we're moving forward and velocity is 0, keep acclerating forward
01:42 PM obfuscated_d: hmm
01:43 PM obfuscated_d: but the drive status might change, if we're trying to stop. so that doesn't work
01:46 PM rue_mohr: heh
01:46 PM rue_mohr: its frustrating becasue I dont think this is a hard problem, but I cant wrap my head around it right
01:48 PM obfuscated_d: might be overthinking it
01:48 PM obfuscated_d: what's the simplest operation
01:52 PM rue_mohr: well, we can break it down to those 5 outcomes
01:52 PM rue_mohr: accelerate forward, ...
01:52 PM rue_mohr: so, when do we do each
01:52 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1300790.jpg
01:55 PM rue_mohr: we only have a few things to go by
01:55 PM rue_mohr: where we are, how fast/which direction were moving
01:56 PM rue_mohr: It might be better if I redid that just for error on one side
01:57 PM rue_mohr: it feels like there is a distance where you should not accelerate
01:57 PM rue_mohr: just use decelleration or coasting
01:59 PM rue_mohr: I suppose the last entry in the table should be 0
01:59 PM rue_mohr: as thats stopped, it should show you will have no position change?
02:09 PM rue_mohr: ok, try again
02:10 PM rue_mohr: so, in the code I did last night
02:11 PM rue_mohr: if the position + the stopping distance @ velocity is ...
02:11 PM rue_mohr: wait
02:11 PM rue_mohr: you cant assume its +
02:11 PM rue_mohr: you might be going the other way
02:12 PM rue_mohr: so it needs to be like position + (VLUT[i] * direction)
02:13 PM rue_mohr: or I pre-calc the stopping distance with a sign
02:13 PM rue_mohr: heh, there are only 4 direction sign flags in all this and they really seem to complicate it
02:15 PM rue_mohr: stopOffset = (direction > 0) ? VLUT[i] : -VLUT[i];
02:15 PM rue_mohr: it doesn't account for not moving, but if the table has a zero in the last entry, that'll do ok
02:17 PM rue_mohr: } else if ( (direction == -1) && (p > 0) && (p - VLUT[i] < 0 ) ) { driveStatus = DF;
02:17 PM rue_mohr: } else if ( (direction == 1) && (p < 0) && (p + VLUT[i] > 0 ) ) { driveStatus = DR;
02:17 PM rue_mohr: oh, I kinda got that on these lines
02:17 PM obfuscated_d: right, and provided that table is accurate enough, should work
02:18 PM obfuscated_d: in mine, I just had the + stop offset, since I was only working on forward
02:18 PM rue_mohr: ok, so tell me your logistics so far on how you decide which to do
02:18 PM rue_mohr: yea ok
02:21 PM WormFood: Greetings obfuscated_d. I see they mentioned me. I'm in Florida.
02:22 PM obfuscated_d: I think it's just if we have error, accel forward or backward depending on the sign, we're calculating the stopping distance based on the table, once we're <= stopPos, reverse direction. Hoping that we don't undershoot
02:22 PM obfuscated_d: Hi WormFood!
02:23 PM obfuscated_d: but there's the hard part. what if we undershoot or overshoot. Do we just accept a set amount of deadspace as the limit of the accuracy? or do we try to get fancier about how to handle decel
02:23 PM WormFood: I randomly bumped into a stranger on IRC the other day, that recognized my name, from my bit rate calculator ;)
02:24 PM polprog: hi obfuscated_d
02:24 PM polprog: hows it going?
02:25 PM rue_mohr: WormFood, its an awesome bitrate calculator
02:25 PM WormFood: I was thinking about putting it on github
02:26 PM obfuscated_d: hi polprog, going well
02:26 PM obfuscated_d: you guys working on anything fun?
02:27 PM polprog: im hacking an STB right now
02:27 PM polprog: when i have free time
02:27 PM polprog: at work I deal with xilinx
02:28 PM rue_mohr: obfuscated_d, the thing about the table is that it tells you the stopping distance if you lock into full brakes mode
02:28 PM rue_mohr: BUT, like you said, it might stop you too soon
02:28 PM obfuscated_d: o0o0 neat. I got an artix-7 dev board to start learning fpga. Haven't had a lot of time to devote to it
02:29 PM rue_mohr: in which case its better to watch the distance and kinda modulate between decellerating and coasting
02:29 PM Tom_L: i played with spartan6 a while
02:29 PM polprog: obfuscated_d: fpga is pretty cool
02:29 PM obfuscated_d: yea, for a while I've wanted to learn more about it, maybe get into some basic asic design
02:29 PM obfuscated_d: it's a long road though
02:30 PM Tom_L: lonely
02:30 PM polprog: if you have any questions shoot
02:30 PM polprog: im not active a lot here recently, but i read
02:30 PM obfuscated_d: Thanks!
02:30 PM polprog: (work and uni takes a lot of time id like to use for cool stuff)
02:31 PM obfuscated_d: rue_mohr so some sort of bang control? or something like that?
02:33 PM polprog: gotta go watch a movie with gf
02:47 PM obfuscated_d: so how do we decide when to modulate motor on/off while approaching 0
02:51 PM obfuscated_d: because the table is good for the motor unloaded. but , under load, it may vary a lot. So we need some way to profile the deceleration in real time
02:54 PM rue_mohr: and I used the shortest stopping distances in the profile
02:54 PM rue_mohr: so, we are likley to stop short if anyting
02:54 PM rue_mohr: *BUT*
02:55 PM rue_mohr: we can stretch-out the stopping disance by going from full deceleration to coasting
04:20 PM rue_mohr: if (0) {
04:20 PM rue_mohr: } else if ( p + stopOffset < -DeadZone ) { driveStatus = AF;
04:20 PM rue_mohr: } else if ( p + stopOffset > DeadZone ) { driveStatus = AR;
04:20 PM rue_mohr: } else if ( (direction == -1) && (p > 0) && (p - VLUT[i] < 0 ) ) { driveStatus = DF;
04:20 PM rue_mohr: } else if ( (direction == 1) && (p < 0) && (p + VLUT[i] > 0 ) ) { driveStatus = DR;
04:20 PM rue_mohr: } else { driveStatus = PD;
04:20 PM rue_mohr: }
04:20 PM rue_mohr: hmm
04:31 PM rue_mohr: obfuscated_d, you here?
04:33 PM rue_mohr: I didn't think it was stateful, but I'm starting to wonder
04:40 PM polprog: where is ok9uwu
04:45 PM rue_mohr: ?
04:47 PM polprog: i have some satellite related questions
04:47 PM polprog: and he was here
04:48 PM rue_mohr: hah, thats a different nick
04:48 PM rue_mohr: isn't that wormfood
04:48 PM rue_mohr: ?
04:48 PM WormFood: Yes. I'm the satellite guy. ;)
04:49 PM WormFood: I was known back in the day, in the DishNet hacking circles, as Ear-Wax.
04:50 PM polprog: i found a listing of Astra 3B channels, 11657 vertical is listed as "other datacast", modulation type LoRa
04:50 PM polprog: what is lora doing there
04:50 PM polprog: (i got a Ka band transceiver and it made me get back to answering the question "what can i receive here")
04:51 PM WormFood: LoRa is a type of modulation.
04:51 PM polprog: well i know that
04:51 PM WormFood: The satellite doesn't care what you feed it.
04:51 PM polprog: of course. but what are they sending over lora down
04:51 PM WormFood: The transponder will rebroadcast whatever it received.
04:51 PM polprog: interesting
04:51 PM WormFood: That is a good question.
04:52 PM polprog: :)
04:52 PM polprog: i should clean up my dish and set it up on some tripod
04:52 PM WormFood: I presume you know at least a little bit about LoRa, right?
04:52 PM polprog: find a way to install my LNB and the transceiver at the same time
04:53 PM polprog: yeah i know quite a bit about radio in general
04:53 PM polprog: and digital radio
04:53 PM WormFood: Are you a ham?
04:53 PM WormFood: I think so
04:53 PM polprog: didnt bother to get licensed yet
04:53 PM WormFood: Why not?
04:53 PM polprog: but its a case of hauling my ass to the exam centre
04:54 PM polprog: im stil having mixed feelings about the connotations of ham radio in the areas here
04:54 PM polprog: in the communism the open secret was that you had to sign a waiver with the secret police to get a ham licence
04:54 PM WormFood: I strongly suggest you study for at least your tech and general at the same time. You get a 50% discount on learning you general, if you do it at the same time, because 1/2 the questions on the general are the same as tech.
04:54 PM polprog: and report on any suspicious activity
04:55 PM polprog: we have different classiffication here, i can get type A licensed which comes with virtually no limits
04:55 PM WormFood: It was never like that. If you want to report "suspicious activity", then you're on your own :P
04:55 PM polprog: well, you dont get a choise in communism :P
04:55 PM polprog: anyway
04:56 PM WormFood: How many different license classes do you get there?
04:56 PM polprog: for real i have mixed feeling about being drafted if things go south here
04:56 PM polprog: there is only type A and C iirc, the latter can be accessible for younger kids, and it comes with some power limits
04:56 PM WormFood: It seems most countries have simplified the ham licenses in the last 30 years. Here they used to have 6 different classes of licenses, but now it's only 3.
04:56 PM polprog: but everyone has type A because its the same exam
04:57 PM WormFood: That is very interesting.
04:57 PM polprog: ok its a bit more complicated, but i remembered right
04:58 PM polprog: type 1 permit, requires class A licence, all bands, 500W power limit
04:58 PM polprog: and type 3 permit, lists a few bands, up to 100W
04:58 PM polprog: i dont need to have a licence to receive
04:59 PM polprog: so i was thinking about setting up the dish and connecting it to my SDR to see whats on it
04:59 PM WormFood: Awesome! I just made a contact with Falkland Islands (just now, while we were chatting)
05:00 PM polprog: oh nice. what band? (i guess HF)
05:00 PM WormFood: 20m
05:00 PM polprog: neat
05:00 PM WormFood: I was using a "new" digital mode, called FT4
05:00 PM polprog: i heard about it, seems to be a cool thing
05:00 PM WormFood: FT8 gets all the attention, but there is also FT4
05:00 PM polprog: lowering the noise floor
05:00 PM WormFood: It's freakin' amazing.
05:01 PM polprog: i have not done any tv hacking, i was born 15 years too late
05:01 PM polprog: but i do have some kit for smartass cards i inherited
05:02 PM polprog: and i did a bit of talking to smartcard s
05:02 PM WormFood: I have a bigass stack of smartass cards ;) :P
05:02 PM polprog: did you see my motorola decoder hacking video?
05:02 PM WormFood: I went through all my cards a while back, and organized them. I have a whole stack of "damaged" cards
05:02 PM WormFood: I did not.
05:02 PM polprog: damaged, or looped ? :)
05:03 PM polprog: https://www.youtube.com/watch?v=35dPTvBf3rk
05:03 PM polprog: made some progress on the u-boot front since then
05:03 PM polprog: a nifty computer, eth + sata
05:03 PM polprog: shame the cpu is so slow by todays standard
05:04 PM polprog: i have a bunch of these and after i made that vid i got a few more different boards
05:07 PM WormFood: some are looped. Some have experimental software on them that didn't work.
05:08 PM polprog: custom software?
05:08 PM WormFood: Yeah
05:08 PM WormFood: I used to write my own software for the cards.
05:08 PM polprog: uploaded using some exploit and then bricked?
05:08 PM WormFood: That doesn't usually happen. It never happened to me.
05:09 PM WormFood: It's pretty hard to brick a card. In fact, it's impossible, if you have the right hardware.
05:09 PM polprog: ah
05:09 PM WormFood: If you glitch it, you could put it into issuer mode, and just change the EEPROM.
05:09 PM polprog: ah, this is neat
05:09 PM WormFood: Since the ROM can't be changed, only shit in EEPROM can fuck it up.
05:10 PM polprog: i thought you had to change the eeprom using other trucks
05:10 PM polprog: tricks*
05:10 PM polprog: ive collected a few cards along the years, but mostly payphone cars
05:10 PM polprog: they are no use as payphones are gone here
05:11 PM polprog: but i have a lot of them, different revisions, newer, older
05:11 PM polprog: i have so many i could spare a few to try and hack one or two
05:12 PM WormFood: The ROM code has a backdoor
05:12 PM polprog: i think i also have a nagravision for tv
05:12 PM WormFood: that's what I hacked, back in the day.
05:12 PM WormFood: Their ROM2/3/10/11 cards.
05:12 PM polprog: what vendor were they?
05:14 PM WormFood: We had 3 that I could pick up. Dish Network. Bell ExpressVu (out of canada), and TRN (now RTN...or did I get 'em backwards). Race Track News <--> The Racing Network.
05:14 PM polprog: ive read a few text files about them
05:14 PM polprog: who was the network that locked hacked cars with "GAME OVER" in rom
05:14 PM polprog: ?
05:18 PM polprog: still thinking about that LoRa, what is receiving that.. youd need special hardware after the LNB, LoRa is spread spectrum, everything else on that satellite is one of the DVB's which are Q/8/16/32 PSL
05:18 PM polprog: PSK*
05:18 PM polprog: it doesnt make sense to send lora down
05:18 PM polprog: it is so much work to decode it
05:20 PM polprog: yet it makes sense, that works out to 907MHz after downconversion, easy to feed to an off the shelf module
05:20 PM polprog: ill have to set up that dish
05:27 PM rue_mohr: obfuscated_d, time zones suck, http://ruemohr.org/~ircjunk/tempimage/p1300791.jpg <think think think>
05:27 PM rue_mohr: sorry I overcrowded it
05:27 PM polprog: ill have to sleep on that
05:27 PM polprog: night WormFood, rue_mohr
05:28 PM polprog: thanks for the hacking insight
05:32 PM WormFood: O
05:33 PM WormFood: I'm not sure about the lora stuff. Sounds odd
05:33 PM WormFood: anyways, have a good night.
07:01 PM rue_mohr: ok ok ok ok , I think I got it
07:03 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1300792.jpg
07:03 PM rue_mohr: the light blue shaded areas are the determinant