|
I had not found that second thread, so thanks for that. I'll take a look a bit later.
|
# ? Nov 5, 2019 16:41 |
|
|
# ? May 30, 2024 06:24 |
|
If you're doing low level USB stuff pull out a Raspberry Pi and use it to connect and examine the device you're creating. The Linux kernel has way, way better USB diagnostic tools like lsusb and such. There's very likely an esoteric bit or string or something that needs to be set in the USB packet. You might even need to look at something like wireshark to get a raw capture of all the USB packets: https://wiki.wireshark.org/CaptureSetup/USB But that said, it's a deep rabbit hole to start debugging USB at a low level. If you just want something working, I'd find some code and use it--even if that means grabbing a new Teensy. You might check of the Teensy 3 LC would work: https://www.pjrc.com/teensy/teensyLC.html It's a cheaper version but with a similar fancy ARM Cortex M0 like the Teensy 3 (but not the 2, that thing uses an older AVR chip without nearly as nice USB libraries).
|
# ? Nov 5, 2019 17:16 |
|
Gang tag contest! https://forums.somethingawful.com/showthread.php?threadid=3903115
|
# ? Nov 5, 2019 18:41 |
|
I was able to modify the example from the second link One Legged Ninja posted and finally got it working, somewhat. I changed it to 34 buttons, 3 10bit axes, and 4 8bit axes. I think that should actually work fine. 10bit for the rotational axes and 8bit should work fine for translation and throttle. Maybe I'll continue messing with it to get more axes or get more resolution for the others but I think this should work well enough. Thanks for the help, everyone.
|
# ? Nov 5, 2019 19:13 |
|
Not sure where to put this, but there are a bunch of $15-35 Fitbit clones out there, which are probably at least partially splash resistant, marketed as a "fitness tracker" aka Fitbit Charge Does anyone know if any of these platforms are open-esque, with probably similar to an esp8266 cpu + ssd1306 oled display and some kind of battery Would like to write an app that consumes UDP data over Bluetooth, then displays some facts about that data (navigational data) like heading, course, velocity made good towards a waypoint etc
|
# ? Nov 5, 2019 21:38 |
|
It's 13 bucks, I'm sure it wouldn't hurt to buy one and crack it open to see what's in there.
|
# ? Nov 5, 2019 21:43 |
|
Hadlock posted:Not sure where to put this, but there are a bunch of $15-35 Fitbit clones out there, which are probably at least partially splash resistant, marketed as a "fitness tracker" aka Fitbit Charge Check out the nRF52-based trackers: https://hackaday.io/project/160618/instructions and https://github.com/curtpw/nRF5x-device-reverse-engineering I actually picked a few of these guys up recently and they're the same as the one suggested in that project: https://www.amazon.com/gp/product/B077D7BVMR It's still kind of a pain to open them up and get to the programming pads, but once there it has nice big labeled pads that are easy to solder some small gauge wires. I ended up using a Blackmagic probe to program them with GDB, but a Segger J-link might work too (it's just a colossal pain in the rear end with their tools).
|
# ? Nov 5, 2019 22:18 |
|
Cojawfee posted:I was able to modify the example from the second link One Legged Ninja posted and finally got it working, somewhat. I changed it to 34 buttons, 3 10bit axes, and 4 8bit axes. I think that should actually work fine. 10bit for the rotational axes and 8bit should work fine for translation and throttle. Maybe I'll continue messing with it to get more axes or get more resolution for the others but I think this should work well enough. Thanks for the help, everyone. I did this back in 2012 (on page one of this thread) and again in 2014. I got the USB tool from usb.org and wrote my own HID descriptor, then generated the .h file. I used an uno for my first example and a nano for my second, both of which are a 8u2 talking over USB and an 328p reading the buttons and whatnot then sending that data to the 8u2 over serial, but I think it's basically the same process, except without having to upload code to two different chips on the same board. If you've got something that already works, good on you, but ask some more specific questions and I can answer them.
|
# ? Nov 5, 2019 23:41 |
|
Apparently my relay plan worked: https://www.youtube.com/watch?v=_QoIaG0rRJs And I finally finished the whole project: https://www.youtube.com/watch?v=fsdmQlk0hv4 It's a buzzer game for class. Which I will probably only use for only one lesson. It's not exactly in the best shape, but it works (mostly). Also, yes, I did use hot glue which was probably a bad idea. I have a lot of frayed wires and I didn't want them moving and shorting or something. Though they seem to do that anyway. I wish I had bought better wires to use for this. It would have made my life a lot easier. But this was my first project, and I'm happy with it. Now I just need to try to 3-D print a case for all of it. Shadow0 fucked around with this message at 15:44 on Nov 16, 2019 |
# ? Nov 16, 2019 15:42 |
|
Feeling like a mega dummy right now, especially because I've done this before--code:
Instead, if I jump, say, pin 2 to gnd, it sends a constant stream of Ws until I either reboot the teensy or jump another pin to ground. To be clear, I want it to repeat as long as the pin is jumped, but it doesn't stop when I disconnect the jumper, and I can't figure out why e: Naturally I remembered I need to y'know, release the keys, immediately after I posted this Sockser fucked around with this message at 09:14 on Dec 27, 2019 |
# ? Dec 27, 2019 09:08 |
|
Your input pin is floating, so it's basically showing whatever electrical charge is on the pin Use pull ups, either physical or in software Edit: oh wait you did that
|
# ? Dec 27, 2019 09:13 |
|
Do any of the other pins do that? Is pin 2 perhaps tied to the onboard LED? I ran into something like that when making my controller. Pin 6 I think was tied to the onboard LED on my teensy, so when I pushed the button connected to that pin, it would stay pressed. If that is the case, you can't use pullup like normal. You either need to figure out another way to do it, or remove the LED. I put a 1k resistor from the pin to ground and it solved my problem.
|
# ? Dec 27, 2019 09:15 |
|
Cojawfee posted:Do any of the other pins do that? He figured it out, I think, from the edit. I've never used the Teensy or anything for keyboard emulation, but I guess Keyboard.send_now() sends a keydown event, and requires another command to release the key after you're done
|
# ? Dec 27, 2019 09:24 |
|
Yeah I was just never releasing the key. Every other time I’ve done a keyboard emulation I checked falling edge so it only pressed once and the release completely escaped me.
|
# ? Dec 27, 2019 09:26 |
|
Has anyone had any success making a two wheeled balancing robot? I've been trying for a good couple of months with no real success. I know there are examples with code out there. I've used them as a basis. The main difference is I'm trying to use an MPU9250 instead of an MPU6050 accel / gyro. I just absolutely cannot work out what it's drat problem is, besides the painfully obvious one that the libraries that people chose to use for their robots aren't very compatible with other ones in some way. Just a few minutes ago the MPU6050s I ordered in defeat just arrived. They'll make a good test case to see where the issue lies. What I've been seeing in my experiments are numbers that look nice on the terminal, but seem to be sluggish. At one point I ported a version of the code over to esp8266, including the timed interrupts, and adding support for the little OLED hat thing it has. Talking about a WeMos D1 mini. It didn't seem to make much difference. I know it's more of a ramble than a question. It's just it's been getting under my skin.
|
# ? Jan 2, 2020 02:18 |
|
Shadow0 posted:Apparently my relay plan worked: Is there a vistaprint or moonpig for PCBs where you can submit your design and they'll make and ship you one/ a few for projects like that?
|
# ? Jan 2, 2020 19:15 |
|
Rapulum_Dei posted:Is there a vistaprint or moonpig for PCBs where you can submit your design and they'll make and ship you one/ a few for projects like that? JLCPCB or PCBWay JLCPCB can be as low as 2 dollars for 5 pieces for 2 layers.
|
# ? Jan 2, 2020 19:26 |
|
No it can't Why do people always neglect shipping on JLCPCB in particular. It's their marketing thing and it really seems to be working. And they've really hosed me on shipping. Check out pcbshopper.com for price comparisons. The majority of them are in the realm of $14 for 5x5cm, qty 10. I like PCBWay, or Seeed, but it's mostly all the same ante fucked around with this message at 19:55 on Jan 2, 2020 |
# ? Jan 2, 2020 19:34 |
|
General_Failure posted:Has anyone had any success making a two wheeled balancing robot? I've been trying for a good couple of months with no real success. I know there are examples with code out there. I've used them as a basis. There might be some benign register adjustment (i.e. sample rate moved from offset 0x14 to 0x1c) that's causing them to behave differently. Rapulum_Dei posted:Is there a vistaprint or moonpig for PCBs where you can submit your design and they'll make and ship you one/ a few for projects like that?
|
# ? Jan 2, 2020 19:37 |
|
ante posted:No it can't Turns out shipping things across the world is expensive if you want them faster than on a boat.
|
# ? Jan 2, 2020 19:43 |
|
Huh? No I'm saying they literally lie about the price. They're the same price as everyone else, including shipping, because everyone else does "free shipping". Which is obviously also technically incorrect, but a whole lot less dishonest They also pull some shipping shenanigans that have triggered duties or required me to self clear, and I'm not sure what they're doing differently to make that happen. It's only them, though ante fucked around with this message at 19:57 on Jan 2, 2020 |
# ? Jan 2, 2020 19:54 |
|
JawnV6 posted:What's the difference between those two chips? Like have you pulled up the data sheets and compared? tbqh I haven't bothered. Part of the drivers for these consists of magic incantations from reverse engineering. I plugged in the mpu6050 and tried it with one of the main ones I've been using as a base https://www.instructables.com/id/Arduino-Self-Balancing-Robot-1/ Really I find this code to be a bit of a pain so there's a couple of others I've been messing with too. Then there's mine. I just grabbed a PID library, a PWM motor control library, and an mpu9250 library with builtin quaternion calculation. Because why reinvent the wheel? pain in the rear end about it is I realised that it wasn't doing the magic of combining the gyro and accelerometer readings so the output twitches around a lot. It couldn't balance either. I'm going to make an mpu6050 version of my code shortly. While my robot looks different to other ones on line, it's functionally the same so that's probably not the issue. e: I adapted my little test code to use an mpu6050 library. In this case https://github.com/tockn/MPU6050_tockn This library seems to already do the addition / filtering using the gyro and accelerometer. It also seems to do the quaternion calculations. I don't think I said that I had to flip the accelerometer over. Well I did. Anyway i just tested the code. It doesn't balance, but it's easily the closest I've gotten. I think most of what needs tuning is the PID variables, and possibly adding some minimum duty cycle thing for the motors. I don't mind posting code. Just not sure what the best way to post an arduino sketch would be. General_Failure fucked around with this message at 03:27 on Jan 3, 2020 |
# ? Jan 3, 2020 02:59 |
|
General_Failure posted:I don't mind posting code. Just not sure what the best way to post an arduino sketch would be. Easiest would probably be to use https://gist.github.com/ and create a secret one if you're concerned about anybody outside of the thread checking it out.
|
# ? Jan 3, 2020 15:58 |
|
drunk mutt posted:Easiest would probably be to use https://gist.github.com/ and create a secret one if you're concerned about anybody outside of the thread checking it out. That works. I'd never used gist before. It's hardly great code. Just duct tape and bailing wire to see if the concept works. https://gist.github.com/experimentech/fc962af8c50770e840ba612cfd3dcc07
|
# ? Jan 5, 2020 02:11 |
|
What kind of mic/amp setup would y'all recommend to pick up normal conversation or TV level sound in a room? I tried a MEMS as well as electret mic like this one below, supposedly MAX4466 based, but neither can pick up poo poo. I've been testing with a frequency generator on the phone and have to crank up the gain to the max as well as the volume to the point it's unpleasant for it to pick anything up from like 10cm. I'm not trying to make an Alexa, just need to do FFT on the signal. In the end I'll need to make my own PCB but for development and testing a module would be ok.
|
# ? Jan 8, 2020 20:30 |
|
A human voice will carry farther than a phone speaker, so keep that in mind.
|
# ? Jan 8, 2020 20:56 |
|
mobby_6kl posted:What kind of mic/amp setup would y'all recommend to pick up normal conversation or TV level sound in a room? I tried a MEMS as well as electret mic like this one below, supposedly MAX4466 based, but neither can pick up poo poo. I've been testing with a frequency generator on the phone and have to crank up the gain to the max as well as the volume to the point it's unpleasant for it to pick anything up from like 10cm. I'm not trying to make an Alexa, just need to do FFT on the signal. Did you already rule out mic arrays like this: https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2-0.html
|
# ? Jan 8, 2020 21:57 |
|
I'll say that I don't know a ton about microphones but once upon a time I used DIY electret capsule microphones to record punk shows. It was just two capsules, wires, and a minidisc as the amplifier. And it sounded really good. Maybe you need a second amplifier after the MAX4466?
taqueso fucked around with this message at 22:56 on Jan 8, 2020 |
# ? Jan 8, 2020 22:51 |
|
The mic is only half of the equation, don't forget your ADC needs to be tuned to the output of the mic amplifier. Think of it this way, if your mic amplifier is outputting a max of 1 volt but your ADC range is going from 0 to 5 volts then it doesn't matter how powerful or awesome the mic is--everything will be quiet. Try to have the mic amp and ADC voltage range matched up perfectly.
|
# ? Jan 9, 2020 01:27 |
|
^^^ Yeah good point. I played around with the different attenuation settings before and think I got the best one but I'll try to actually measure what it's outputting tomorrow and see if I can better match it to the ADC Cojawfee posted:A human voice will carry farther than a phone speaker, so keep that in mind. mewse posted:Did you already rule out mic arrays like this: taqueso posted:I'll say that I don't know a ton about microphones but once upon a time I used DIY electret capsule microphones to record punk shows. It was just two capsules, wires, and a minidisc as the amplifier. And it sounded really good. Maybe you need a second amplifier after the MAX4466?
|
# ? Jan 9, 2020 02:02 |
|
mobby_6kl posted:Do you mean a compete module like this or DIYing something? Either way it seems like it'd be overkill for what I need. But maybe I'm overestimating what's possible with a single electret mic... I'm not an expert and I haven't done anything in this space, I'm just confused that you're not doing anything like Alexa but you want to receive voices from across the room
|
# ? Jan 9, 2020 02:13 |
|
mobby_6kl posted:^^^ Yeah check out the datasheet for the CPU you're using and if it has any fancy ADC capabilities like an analog reference voltage you can set. If you're using a dev board like an Arduino they usually set the analog reference to something generic like 1v, 3.3v, 5v, etc. and sometimes give you a pin to explicitly set the voltage.
|
# ? Jan 9, 2020 04:22 |
|
I should mention the electret mics I made were very sensitive, they would absolutely be able to 'hear' a voice across a room.
|
# ? Jan 9, 2020 05:16 |
|
Put a scope on it. Is your signal clean but just too small (so you would benefit from more gain), or lost in the noise floor?
|
# ? Jan 9, 2020 07:43 |
|
I fixed a bunch of errors and introduced a bunch more in the balancebot code. Haven't uploaded it. I tried using AutoPID instead of FastPID too. Both have their strengths. Although AutoPID is nice, it seems to get stuck sometimes. Ie the output value just stops updating. Progress is stopped for now. There was a minor mishsp that killed the dual battery controller I put on the 18650s. The setup is fragile at best. A couple of days ago I dug out a project case that didn't get used, set up a pair of the yellow geared motor and wheel assemblies on the sides, and test assembled it with a 6xAA battery holder, and an Uno with an L293D motor shield. It all fits amazingly well, but there's a problem. I think the shield utilises the pins normally used for I2C, which are needed. Also I think I worked out why people use the MPU6050 gyro instead of the MPU9250. The 6050 module appears to be 5v tolerant. I've been using it with 3v3 and level shifters.
|
# ? Jan 11, 2020 01:44 |
|
If someone is looking for an arduino project, Amazon is now selling this posture-modifier that basically is a Tiny86 attached to a tilt sensor and if it goes more than X from vertical it activates a vibration motor to tell you to sit up straight. They cost $89 retail
|
# ? Jan 11, 2020 05:38 |
|
Hadlock posted:If someone is looking for an arduino project, Amazon is now selling this posture-modifier that basically is a Tiny86 attached to a tilt sensor and if it goes more than X from vertical it activates a vibration motor to tell you to sit up straight. They cost $89 retail If you're going to go through all that trouble, instead of a vibrator motor it should shock you like in that episode of the briefly lived Dilbert television series.
|
# ? Jan 11, 2020 06:06 |
|
poeticoddity posted:If you're going to go through all that trouble, instead of a vibrator motor it should shock you like in that episode of the briefly lived Dilbert television series. He's got the knack.
|
# ? Jan 11, 2020 06:21 |
|
Hadlock posted:posture-modifier So it's $5 - $10 of hardware, with probably R&D, assembly + a healthy profit margin.
|
# ? Jan 11, 2020 09:12 |
|
|
# ? May 30, 2024 06:24 |
|
General_Failure posted:So it's $5 - $10 of hardware, with probably R&D, assembly + a healthy profit margin. There's some sort of mobile app and data collection too, which probably cost 10x to develop Seems like one of those devices that would get cloned in China and delivered before the American version hit the market. But yes, very healthy margins.
|
# ? Jan 11, 2020 17:35 |