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
peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Mr Shiny Pants posted:

I need something that will work on a human skeleton. Like a mannequin that you use for drawing.
Put a 3-axis accelerometer in each movable part to measure its absolute orientation.

Adbot
ADBOT LOVES YOU

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

ANIME AKBAR posted:

Well it should, if it has to be UL certified

I've gotten some weird poo poo UL certified

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Nothing has to be UL certified

CopperHound
Feb 14, 2012

I think it is safe to say that, at least in the US, UL is synonymous with Nationally Recognized Testing Laboratories.

In that case, the certification is required for most anything that is part of a building per NFPA code books.

Shame Boy
Mar 2, 2010

If it's for a product with at least a modest production run, can't you just call the fan factory and be like "hey can you sell us a box of 500 fans but without putting the circuit boards on"

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
You're not going to create the final product while figuring things out. You start with a prototype, which is likely going to be a fan you buy and rip apart. You get the prototype to do what you want, and then you find a manufacturer to get the parts you want.

Mr Shiny Pants
Nov 12, 2012

peepsalot posted:

Put a 3-axis accelerometer in each movable part to measure its absolute orientation.

Could you elaborate a bit?

TotalLossBrain
Oct 20, 2010

Hier graben!

peepsalot posted:

Put a 3-axis accelerometer in each movable part to measure its absolute orientation.

This requires a double integration on three axes and the propagated errors will likely be very bad with consumer-level parts.

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

Mr Shiny Pants posted:

Could you elaborate a bit?

There are chips, usually called 9 degree of freedom motion sensors because they also have gyroscopes and magnetometers, which can return an absolute spatial orientation vector. This is what your phone uses to sense which way you're facing when you are doing walking navigation or night sky constellation apps.

Drawbacks for your application include, but are not limited to:
- substantial drift over time
- accuracy/jitter
- the "absolute" portion of the measurement comes from the magnetometer measuring the Earth's magnetic field, and can be easily confused indoors because of the ubiquity of ferrous materials in a building (though if your setup is largely static after calibration, it should be okay)

It could definitely be made to work with some good fusion algorithms and filtering, but be prepared for that.

I don't know many details about what you're trying to actually accomplish, but I'm pretty sure best bang for your buck for pose detection is visual image processing, like in motion capture. Crayola used to sell an animation kit with a little posable figure covered in quasi-QR symbols that actually worked surprisingly well for a toy using a single iPad camera. But that depends on what you're actually trying to do. If it needs to be integral, though, I guess that wouldn't be an option.

Mr Shiny Pants
Nov 12, 2012

KnifeWrench posted:

There are chips, usually called 9 degree of freedom motion sensors because they also have gyroscopes and magnetometers, which can return an absolute spatial orientation vector. This is what your phone uses to sense which way you're facing when you are doing walking navigation or night sky constellation apps.

Drawbacks for your application include, but are not limited to:
- substantial drift over time
- accuracy/jitter
- the "absolute" portion of the measurement comes from the magnetometer measuring the Earth's magnetic field, and can be easily confused indoors because of the ubiquity of ferrous materials in a building (though if your setup is largely static after calibration, it should be okay)

It could definitely be made to work with some good fusion algorithms and filtering, but be prepared for that.

I don't know many details about what you're trying to actually accomplish, but I'm pretty sure best bang for your buck for pose detection is visual image processing, like in motion capture. Crayola used to sell an animation kit with a little posable figure covered in quasi-QR symbols that actually worked surprisingly well for a toy using a single iPad camera. But that depends on what you're actually trying to do. If it needs to be integral, though, I guess that wouldn't be an option.

Thanks, I am thinking about using Vive trackers to get an IK skeketon but that will take about 5 of them. This will probably work pretty well going off videos posted about skeletal tracking, I was just thinking of doing something integrated. They are pretty expensive, probably cheaper than doing something myself though. :)

I also saw some videos about motion capture using a Kinect, which works surprisingly well.

Hexyflexy
Sep 2, 2011

asymptotically approaching one

TotalLossBrain posted:

This requires a double integration on three axes and the propagated errors will likely be very bad with consumer-level parts.

You can only measure the gravity vector in the static state with accelerometers, which isn't useful for determining pose, but in any dynamic state it's that and worse (with no ground truth). I did some work ages ago on statistically determining pose on your hands with a few mems accelerometers/gyros strapped to end of finger/middle of finger/palm at some reasonable accuracy, and the like 10 different ways mems sensors can drift (up to like 30cm a minute linearly when integrated) are stupid.

I did a bunch of work after that on visual pattern recognition and pose estimation, and if that's acceptable for your use case, it works so much better and more simply it isn't worth trying approach one. You can probably download a code library off google that'll do it all for you at this point.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

That does seem like a good option

https://heartbeat.fritz.ai/a-2019-guide-to-human-pose-estimation-c10b79b64b73

mobby_6kl
Aug 9, 2009

by Fluffdaddy
Ok stupid question but what's with the horrible little fibres in some headphone cables? I've been trying to solder on a new connector and it's pretty much impossible to do cleanly because they will neither solder on not burn off so it's a huge mess.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

mobby_6kl posted:

Ok stupid question but what's with the horrible little fibres in some headphone cables? I've been trying to solder on a new connector and it's pretty much impossible to do cleanly because they will neither solder on not burn off so it's a huge mess.

Are they yellow? It might be kevlar to prevent the cable from being stretched apart. I know fiber optic cables have that.

mewse
May 2, 2006

Cojawfee posted:

Are they yellow? It might be kevlar to prevent the cable from being stretched apart. I know fiber optic cables have that.

Yeah it's most likely reinforcement to prevent stretching or whatever

Armacham
Mar 3, 2007

Then brothers in war, to the skirmish must we hence! Shall we hence?
I'm building an 8-bit computer on breadboards based on a design by this dude: https://eater.net/8bit

I just finished the clock module. I only have a physics 102 knowledge of circuits from college years ago, so it's interesting to learn in a very hands on way. I'm a math and science teacher so I plan on incorporating it into some lessons.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I built that kit back in the summer, it was really fun.

Shame Boy
Mar 2, 2010

Guess who forgot to put termination resistors on those SPI lines like y'all told me to do and had it bite me in the rear end :toot:

Zero VGS
Aug 16, 2002
ASK ME ABOUT HOW HUMAN LIVES THAT MADE VIDEO GAME CONTROLLERS ARE WORTH MORE
Lipstick Apathy

mewse posted:

Yeah it's most likely reinforcement to prevent stretching or whatever

It's Kevlar and yeah I was doing exactly this with some piece of poo poo LG Tones, apparently the HBS-930 model all fall apart at the earbuds. I need some kind of Third Hand setup with like needle-point tweezer levels of precision to do this.

Edit: Kevlar technically has no melting point and a 400c soldering iron will only make it decompose if held for hours, from what I can see. They make firefighting suits out of Kevlar so good luck

Zero VGS fucked around with this message at 18:47 on Jan 16, 2020

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Mr Shiny Pants posted:

Could you elaborate a bit?
Already covered by KnifeWrench mostly, but I had a couple other points/clarifications to make.

TotalLossBrain posted:

This requires a double integration on three axes and the propagated errors will likely be very bad with consumer-level parts.
No integration needed. For a pose-able mannequin, I'm assuming it would be mostly still, at least when "taking a sample", not flying around the room. In that case the accelerometer tells you pretty reliably which direction is "down", because it can sense the earth's gravity as long as its not in free-fall.

They only thing it doesn't tell you is the rotation about that vertical axis, in which case a magnetometer(+accelerometer combo) can be used as KnifeWrench mentioned.

So once you have two parts with a joint in-between (say a torso and upper arm), and each one knows which direction is down and which direction is north relative to itself, then you could use that to calculate the angles between the two.

But yeah I was kinda half-joking because that would be a ton of sensor modules to hook up (for ex on humanoid figure), and a bunch more trig to calculate the angles of the joints. But in theory I believe such a setup could function reasonably well.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

Zero VGS posted:

It's Kevlar and yeah I was doing exactly this with some piece of poo poo LG Tones, apparently the HBS-930 model all fall apart at the earbuds. I need some kind of Third Hand setup with like needle-point tweezer levels of precision to do this.

Edit: Kevlar technically has no melting point and a 400c soldering iron will only make it decompose if held for hours, from what I can see. They make firefighting suits out of Kevlar so good luck
Yep this was also some sort of white-yellowish thing. The iron didn't melt it but mostly burned off with an open flame from a lighter. What an enormous pain in the rear end. I got it to stick eventually but these are some of the most shameful joints I've made.

Shame Boy
Mar 2, 2010

mobby_6kl posted:

Yep this was also some sort of white-yellowish thing. The iron didn't melt it but mostly burned off with an open flame from a lighter. What an enormous pain in the rear end. I got it to stick eventually but these are some of the most shameful joints I've made.

Kevlar smoke, don't breathe this (no really don't, it contains cyanide)

Shame Boy
Mar 2, 2010

Turns out the problems with the SPI bus weren't the lack of termination resistors (ok well they would have probably solved this problem but still) and I can kinda-sorta fix it in software. I figured out through trial and error that all the chips on the bus were powered up and ready to go a long-rear end time before the microcontroller's oscillator had even stabilized, so they were all listening to the SPI bus while it was still floating. The particular way it happened to float most of the time meant all the CS pins were low, MOSI was high, and the clock was... clocking, I assume from mains interference. In these LED display chips I'm using, if you clock in just a big ol' string of 1's, it thinks you're telling it to turn on "display test mode", where it will just turn all the LED's on at max power. Critically though, test mode overrides literally everything else, so even if you try to shut the chips down by sending the shutdown command, or any other command for that matter, it will just stay there in test mode acting like it's broken.

Now I just have to send it the "turn off test mode" command when it starts up and everything works fine :toot:

csammis
Aug 26, 2003

Mental Institution
Haha that's hilarious, I've never seen a SPI bus floating badly enough to accidentally clock in data to a slave.

If at all possible get the SPI master powered up, settled, and bus pins in a deterministic state before powering on the slaves or taking them out of reset. That way you don't have to rely on weird "// send this command because sometimes it starts in test mode" code.

Hexyflexy
Sep 2, 2011

asymptotically approaching one

peepsalot posted:

Already covered by KnifeWrench mostly, but I had a couple other points/clarifications to make.

No integration needed. For a pose-able mannequin, I'm assuming it would be mostly still, at least when "taking a sample", not flying around the room. In that case the accelerometer tells you pretty reliably which direction is "down", because it can sense the earth's gravity as long as its not in free-fall.

They only thing it doesn't tell you is the rotation about that vertical axis, in which case a magnetometer(+accelerometer combo) can be used as KnifeWrench mentioned.

So once you have two parts with a joint in-between (say a torso and upper arm), and each one knows which direction is down and which direction is north relative to itself, then you could use that to calculate the angles between the two.

But yeah I was kinda half-joking because that would be a ton of sensor modules to hook up (for ex on humanoid figure), and a bunch more trig to calculate the angles of the joints. But in theory I believe such a setup could function reasonably well.

Only thing I can add to this is that when I was doing the hand sensor project I specced 7-1-4C wire for connecting all the little sensor boards together, it's 4 core, 3.2mm external and can be flexed for a stupid number of cycles without breaking. Bit pricy though.

Also, just realised this second I've just done an hour long video conference wearing my IBM mainframe T-shirt that says "What weighs 2 tonnes and runs extremely quickly?" and nobody said anything. It's me, I weigh 2 tonnes and run very slowly.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

Shame Boy posted:

Kevlar smoke, don't breathe this (no really don't, it contains cyanide)

Thatnks but I'm already dead

evil_bunnY
Apr 2, 2003

Shame Boy posted:

Turns out the problems with the SPI bus weren't the lack of termination resistors (ok well they would have probably solved this problem but still) and I can kinda-sorta fix it in software. I figured out through trial and error that all the chips on the bus were powered up and ready to go a long-rear end time before the microcontroller's oscillator had even stabilized, so they were all listening to the SPI bus while it was still floating. The particular way it happened to float most of the time meant all the CS pins were low, MOSI was high, and the clock was... clocking, I assume from mains interference. In these LED display chips I'm using, if you clock in just a big ol' string of 1's, it thinks you're telling it to turn on "display test mode", where it will just turn all the LED's on at max power. Critically though, test mode overrides literally everything else, so even if you try to shut the chips down by sending the shutdown command, or any other command for that matter, it will just stay there in test mode acting like it's broken.

Now I just have to send it the "turn off test mode" command when it starts up and everything works fine :toot:
gently caress everything

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Shame Boy posted:

Kevlar smoke, don't breathe this (no really don't, it contains cyanide)
Isn't this true of almost any polymer when burned though?

Shame Boy
Mar 2, 2010

peepsalot posted:

Isn't this true of almost any polymer when burned though?

Yeah probably, maybe just a good idea not to breathe any random unidentified smoke then :v:

Sagebrush
Feb 26, 2012

peepsalot posted:

Isn't this true of almost any polymer when burned though?

all smoke is bad for you to some level, even it's from an all-natural campfire or something

but not all polymers create cyanide when burned, no, if that's what you're asking. some go up very cleanly in mostly CO2 and water while others make all kinds of noxious poo poo.

My Rhythmic Crotch
Jan 13, 2011

Shame Boy posted:

In these LED display chips I'm using, if you clock in just a big ol' string of 1's, it thinks you're telling it to turn on "display test mode", where it will just turn all the LED's on at max power.

Let me guess... it's a Maxim chip of some kind?

mewse
May 2, 2006

mobby_6kl posted:

Thatnks but I'm already dead

Lucky

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Shame Boy posted:

Yeah probably, maybe just a good idea not to breathe any random unidentified smoke then :v:
Random smoke...
Let me guess... it's a Maxim chip of some kind?

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

csammis posted:

Haha that's hilarious, I've never seen a SPI bus floating badly enough to accidentally clock in data to a slave.

If at all possible get the SPI master powered up, settled, and bus pins in a deterministic state before powering on the slaves or taking them out of reset. That way you don't have to rely on weird "// send this command because sometimes it starts in test mode" code.

A long time ago one of our products had a similar problem. At startup a usart output spitting debug startup stuff coupled to a not properly configured usart input and on rare occasions sent itself a command that caused a nasty bug.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
So let me preface this with the fact that I have no idea what I'm doing but the best way for me to learn something new is to just dive in to the deep end with a project that's way over my head.

So I saw this at a conference and I'm a little obsessed and I'm going to build my own, following the (incomplete) instructions: https://github.com/martinwoodward/DasDeployer. My confusion is all about the components and not the Raspberry Pi part, so I assume this is the best thread for that sort of thing.

I think between the parts list, the diagram, and the recorded talk (I'm the one in the video that got to push the button!) I basically understand what's going on. The slide and the talk include some things that he would like to change if he did it again, so I'm skipping the 12V/5V power supply and replacing it with one that just outputs 5V. Another note that I don't quite understand related to power is the idea for an "External USB Battery input as alternative power" but I'm not sure what that means. The PSU he used output 7A at 5V and I found a PSU that does 7A at 5V, but I'm not sure if such a battery exists that will output that kind of amperage that could then be charged via USB.

Also gonna try lay this whole thing out with a breadboard first, and also try and implement the "pull down resistors for LEDs" while I'm at it.

FISHMANPET fucked around with this message at 22:06 on Jan 18, 2020

CarForumPoster
Jun 26, 2013

⚡POWER⚡
Thats a cute project. Guessing the idea is that after a code review/tests the developer is rewarded by getting to PUSH THE BUTTON

Seems like it should be pretty easy.

Shame Boy
Mar 2, 2010

FISHMANPET posted:

So let me preface this with the fact that I have no idea what I'm doing but the best way for me to learn something new is to just dive in to the deep end with a project that's way over my head.

So I saw this at a conference and I'm a little obsessed and I'm going to build my own, following the (incomplete) instructions: https://github.com/martinwoodward/DasDeployer. My confusion is all about the components and not the Raspberry Pi part, so I assume this is the best thread for that sort of thing.

Sure is! Also your link has an extra period at the end of it so it's 404'ing

FISHMANPET posted:

I think between the parts list, the diagram, and the recorded talk (I'm the one in the video that got to push the button!) I basically understand what's going on. The slide and the talk include some things that he would like to change if he did it again, so I'm skipping the 12V/5V power supply and replacing it with one that just outputs 5V. Another note that I don't quite understand related to power is the idea for an "External USB Battery input as alternative power" but I'm not sure what that means. The PSU he used output 7A at 5V and I found a PSU that does 7A at 5V, but I'm not sure if such a battery exists that will output that kind of amperage that could then be charged via USB.

Also gonna try lay this whole thing out with a breadboard first, and also try and implement the "pull down resistors for LEDs" while I'm at it.

I wouldn't worry about the battery stuff until you have the basic design working at least on a breadboard, power is power so if you can get it working with a power supply it's not gonna be hard to get it working with a battery.

7 amps for what's basically a raspberry pi and some LED's seems... excessive. Once you get it all built up for testing on a breadboard or w/e, use a multimeter to measure the actual current it's using. Turn all the LED's on at once in software, so it's using the most power it ever could possibly use. I bet it'll wind up being something like ~2A, which even crummy USB power banks can deliver these days.

Sagebrush
Feb 26, 2012

Raspberries Pi are notably picky about current and a good quality 2A supply is regarded as the minimum for stability, fwiw. If you're adding some decently powerful LEDs to that it would be worth going up to like 3A for some headroom.

7A is excessive though yeah.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
Hey I actually have a multimeter!

What would powering the thing with USB even look like. Since USB is already 5V is it just something like this plugged into a battery pack or wall charger? And then get a matching plug wired to the two wires to power everything (or just cut off the plug and wire directly to that?)

Adbot
ADBOT LOVES YOU

Sagebrush
Feb 26, 2012

Ah, now that the link is working I can see the thing you're building. If you're copying that exactly, with 40 WS2812 (NeoPixel) LEDs -- each one draws about 60mA when showing full-brightness white. So your maximum current draw there is around 2.4A. You also have a couple of additional LEDs and the screen to worry about, and you want some headroom, so calling it 3A is fair, and with 2A for the Raspberry Pi that's 5A total. That is a lot but I would guarantee that you won't have any power issues with that supply.

The reason the current is so high is because it's all running at 5 volts. Power is current multiplied by voltage; 5v and 5 amps is 25 watts, which is about what you'd expect for an embedded computer and a bunch of rather powerful LEDs. If you were running it all on 12 volts, it would only need to draw 25/12 = 2.1A. Plugged into the wall at 110v you'd only pull 220mA. But then you need transformers and buck converters and yada yada.

In the end, I would suggest wall-powering it with something like this https://www.amazon.com/ALITOVE-Converter-5-5x2-1mm-100V-240V-Security/dp/B078RT3ZPS/ and you'll have no problems. You can cut off the plug, strip the wires, and split it so it powers both the RPi and the LEDs separately, or to be a little cleaner you can get a barrel jack and attach your own wires to that so you can unplug the power supply.

As for battery power, here's a USB power bank that supposedly outputs 4A (=20W). https://www.amazon.com/INIU-High-Speed-Flashlight-Powerbank-Compatible/dp/B07CZDXDG8/ I don't know if I trust that figure exactly, but given that we specified a lot of headroom at the beginning, it would probably be fine. Just plug a USB cable like the one you posted into that and wire it up as above.

Finally, you can also cut your power draw significantly by being smart about the LEDs. 2.4 amps is literally the maximum they can ever draw, driving all the diodes at full power. That will be so bright you won't be able to look at it. Say you cut it to a quarter brightness to use as an indicator instead of illumination -- then it's 0.6A max draw. Then if you decide to show any color other than white, it will go down as well. Turn on only the red diode? Now it's a third of that, 0.2A, and you can use a 2.5A supply and cut everything in half.

Sorry if this is more data than required, just lots of things to think about. Realistically you can probably get a cheap iPhone charger and plug the USB cable in and run the NeoPixels off the RPi's own 5v rail and it will work. But don't you want to do it right? :)

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