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
Spazzle
Jul 5, 2003

BedBuglet posted:

So, I have a future project I've started planning out with the bf. Part of the project requires a micro-controller to control 84 transistors (we need to control an array of electromagnets). Is there a good option for handling a dmux of an arduino to that level?

2 megas might work here.

Adbot
ADBOT LOVES YOU

BedBuglet
Jan 13, 2016

Snippet of poetry or some shit

Spazzle posted:

2 megas might work here.

I don't think so. The timing is fairly important in that they would have to be in sync to within a second. I had thought about having a mega driving some slave microcontrollers but I was a computer science major, not an electrical engineer so my experience with actually wiring up my own system is middling at best.

simplefish
Mar 28, 2011

So long, and thanks for all the fish gallbladdΣrs!


Shift registers and a scanned matrix

Spazzle
Jul 5, 2003

BedBuglet posted:

I don't think so. The timing is fairly important in that they would have to be in sync to within a second. I had thought about having a mega driving some slave microcontrollers but I was a computer science major, not an electrical engineer so my experience with actually wiring up my own system is middling at best.

Have one mega send data to another. I find that megas run simple programs at khz rates. Subsecond is not a problem. Look up i2c.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!

BedBuglet posted:

I don't think so. The timing is fairly important in that they would have to be in sync to within a second. I had thought about having a mega driving some slave microcontrollers but I was a computer science major, not an electrical engineer so my experience with actually wiring up my own system is middling at best.
Why not? Set up some I2C or CAN bus or whatever poo poo and tell the second Mega what to do. I2C for instance can run at up to 3.2Mbit/s.

BedBuglet
Jan 13, 2016

Snippet of poetry or some shit

Combat Pretzel posted:

Why not? Set up some I2C or CAN bus or whatever poo poo and tell the second Mega what to do. I2C for instance can run at up to 3.2Mbit/s.

That is a fair point. I hadn't thought about using the second mega as the actual slave.

Sagebrush
Feb 26, 2012

Well, whatever it is, controlling an array of 84 solenoids at >1Hz is going to be noisy as poo poo.

Some Pinko Commie
Jun 9, 2009

CNC! Easy as 1️⃣2️⃣3️⃣!
Set it up to be at about 528Hz and maybe it won't be as annoying.

BedBuglet
Jan 13, 2016

Snippet of poetry or some shit

Sagebrush posted:

Well, whatever it is, controlling an array of 84 solenoids at >1Hz is going to be noisy as poo poo.

Well, they also won't be turning on and off the solenoids at high speed, nor will all 84 run at the same time.

We're recreating this. https://www.youtube.com/watch?v=DEaUVcT0H5Q
I didn't feel like paying the $6,000+ to buy one. We're reasonably sure the tank with the ferrofluid suspension is backed by an array of solenoids. We're planning a 6x14 grid of them. The magnets will have to be fairly well in sync to keep from dropping the fluid.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
You could use the I2C bus to send instructions and then use GPIO pins from the master to the slave to trigger when said instructions are supposed to be executed (i.e. sync). Not that the I2C delays would be too big to use that as a trigger.

Combat Pretzel fucked around with this message at 17:25 on Apr 25, 2016

xilni
Feb 26, 2014




simplefish posted:

Shift registers and a scanned matrix

This is a good choice, shift registers are the unsung hero of multiplexing.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
Yeah, shift registers like the xx595 can be hooked up directly to a SPI port and then chained in series for as many input/output ports as you could practically want. I did this for an old project where I was switching a bunch of relays to drive lights on a UI:



The data in pin connects to the SPI MOSI, the shift clock is the SPI SCK signal, and the latch pin is the SPI SS*. If you want to run more than 8 bits of output, just run the data out of register #1 into the data in of register #2, etc., and tie their latch lines together.

In operation you'd bring the SS line low, write N bytes out your spi port for the N registers you have chained together, then bring the SS line high and they'd all latch their new data to their outputs simultaneously.



*or whatever digital output you want to use as a chip select signal

Aurium
Oct 10, 2010

BedBuglet posted:

Well, they also won't be turning on and off the solenoids at high speed, nor will all 84 run at the same time.

We're recreating this. https://www.youtube.com/watch?v=DEaUVcT0H5Q
I didn't feel like paying the $6,000+ to buy one. We're reasonably sure the tank with the ferrofluid suspension is backed by an array of solenoids. We're planning a 6x14 grid of them. The magnets will have to be fairly well in sync to keep from dropping the fluid.

If your transistors are N-channel (or npn, the important bit is if you're planning on using low side switching, which you probably are) , and your load is <150ma continuous you can use a TPIC6B595 which combines 8 transistors and a 595 shift register into a single chip. It makes for substantially easier wiring, highly recommended.

Either way though, I too highly recommend a shift register as the proper way of doing it.

Sagebrush
Feb 26, 2012

Those 8-bit shift registers would be especially perfect for the display since you can just use one for each digit, with identical configuration and code across the board. Easy peasy.

BedBuglet
Jan 13, 2016

Snippet of poetry or some shit

Aurium posted:

If your transistors are N-channel (or npn, the important bit is if you're planning on using low side switching, which you probably are) , and your load is <150ma continuous you can use a TPIC6B595 which combines 8 transistors and a 595 shift register into a single chip. It makes for substantially easier wiring, highly recommended.

Either way though, I too highly recommend a shift register as the proper way of doing it.

That's actually perfect! Thank you. Unfortunately, I don't know what the load is yet but I'll be building the solenoids soon and get an idea once I start testing with the fluid.

xilni
Feb 26, 2014




Anyone know a better way to breadboard an esp8266 than this?



Also just got these in (NRF24L01 wireless modules). Suggestions?

evil_bunnY
Apr 2, 2003

xilni posted:

Anyone know a better way to breadboard an esp8266 than this?


Get a breakout that fits into a board?

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

xilni posted:

Anyone know a better way to breadboard an esp8266 than this?



Also just got these in (NRF24L01 wireless modules). Suggestions?



You're going to solder those wires to the module right?

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

xilni posted:

Anyone know a better way to breadboard an esp8266 than this?



Get something like these, break off an appropriate number of pins, solder the short end to the pcb and stick the long end in the breadboard?

Skunkduster
Jul 15, 2005




xilni posted:

Anyone know a better way to breadboard an esp8266 than this?



Also just got these in (NRF24L01 wireless modules). Suggestions?



Some breakaway header pins would be what I would use. Short end gets soldered to the PCB, long end goes into the breadboard. To make sure they are aligned correctly at a right angle to the PCB, install your two strips into the breadboard, then place the PCB on top and solder them in.

xilni
Feb 26, 2014




mod sassinator posted:

You're going to solder those wires to the module right?

Yes but holding up on finding out if I had a better option.

PDP-1 posted:

Get something like these, break off an appropriate number of pins, solder the short end to the pcb and stick the long end in the breadboard?



I have plenty of breakaway headers but the pins on the esp8266 aren't 0.1 like my breadboards hence why I went with the macgyver wire solution.

Skunkduster
Jul 15, 2005




xilni posted:

I have plenty of breakaway headers but the pins on the esp8266 aren't 0.1 like my breadboards hence why I went with the macgyver wire solution.

eh, just grab some pliers and bend the pins

Sebbe
Feb 29, 2004

xilni posted:

Anyone know a better way to breadboard an esp8266 than this?



I have one of these.

ReelBigLizard
Feb 27, 2003

Fallen Rib

Aurium posted:

If your transistors are N-channel (or npn, the important bit is if you're planning on using low side switching, which you probably are) , and your load is <150ma continuous you can use a TPIC6B595 which combines 8 transistors and a 595 shift register into a single chip. It makes for substantially easier wiring, highly recommended.

Either way though, I too highly recommend a shift register as the proper way of doing it.

I have some shift registers but didn't know you could get them with beefy transistors built in, thanks for the link.

simplefish
Mar 28, 2011

So long, and thanks for all the fish gallbladdΣrs!


Yes, thanks too - I was actually thinking last week how nice it would be for outputs to have transistors already on them. I'll definitely be picking a couple up

Captain Cool
Oct 23, 2004

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

xilni posted:

I have plenty of breakaway headers but the pins on the esp8266 aren't 0.1 like my breadboards hence why I went with the macgyver wire solution.
I had a similar problem last year. I wound up finding a 14-pin component carrier at an electronics surplus store. It's not a full solution but it provides a nice 0.1" base that I could solder to the chip with short wires.

Mykroft
Aug 25, 2005




Dinosaur Gum
Speaking of the ESP8266, does anyone have any HTTP libraries they'd recommend? I'm using one in a project where I'm driving some neopixel rings and I was hoping to have it periodically poll a server to see what colors/patterns to flash the LEDs. However, when I use WiFiClient.print and parse the response that it eats up enough time in my loop that you can notice the delay in the LED patterns. Am I hoping to do too much at once by polling a server and driving a set of neopixels at the same time?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

SkunkDuster posted:

eh, just grab some pliers and bend the pins

This is always the correct answer.






By the way the pin pitch is 2mm, as opposed to the more common 2.54mm (0.1"). You can also buy 2mm headers on ebay pretty cheap, but you'll still need to bend the pins or do something else to make it fit standard breadboard.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Had to hunt around a bit but I found my other esp8266 example. This one was made to be able to pop board in and out easily for programming.




It is a friction fit. Sadly the pins are only slightly bent, and not using pliers (elastic deformation as part of friction fit).

I used these pitch adapter boards:
http://www.proto-advantage.com/store/product_info.php?products_id=3800081

And some extra long 2mm pins, for better springiness
http://www.ebay.com/itm/10-Pcs-2mm-Pitch-Male-40-Pin-Single-Row-Gold-Plated-Long-Pin-Header-Strip-15mm-/171841200196

peepsalot fucked around with this message at 23:51 on Apr 27, 2016

Brekelefuw
Dec 16, 2003
I Like Trumpets
I have a project that I want to build, but I am not quite sure what I need to build it.

I want to build a little tool where I can touch a sensor (piezo? accelerometer? something else?) on to a part of a musical instrument to sense how much physica vibrations that part is giving off.
I think going with Arduino or Rasberry would allow me to also have it print out and quantify the amount, and maybe log it in to some sort of spreadsheet.

Does anyone have any ideas on how to go about setting this up? I have built electronic projects before, but never worked with arduino and the like.

Aurium
Oct 10, 2010

Brekelefuw posted:

I have a project that I want to build, but I am not quite sure what I need to build it.

I want to build a little tool where I can touch a sensor (piezo? accelerometer? something else?) on to a part of a musical instrument to sense how much physica vibrations that part is giving off.
I think going with Arduino or Rasberry would allow me to also have it print out and quantify the amount, and maybe log it in to some sort of spreadsheet.

Does anyone have any ideas on how to go about setting this up? I have built electronic projects before, but never worked with arduino and the like.

I think I'd probably experiment with pickups, as this is pretty much exactly what they're designed to do.

You might be able to use an accelerometer to measure some sounds, but I'm guessing that the amplitude would be too low to be easy to sense.

Other things that might work would be sensing reflected light. For example you could bounce a laser off the instrument and measure it as it moves back and forth. This is pretty much how remote laser mics work. Not that this is at all easy.

Capacitive sensing might also work, if you get a good setup.

huhu
Feb 24, 2006
I'm using the BLE shield for arduino and bluetooth. The helloworld sketch uploads, will sometimes work on my phone, and I'll go back to edit the code or upload a sketch for another part of my project, upload the helloworld again and it doesn't work. Any thoughts as to why?

Sagebrush
Feb 26, 2012

Welcome to debugging!

Enos Shenk
Nov 3, 2011


I've known for a long time electronics projects hate me. Nothing ever goes right.

But I had some spare batteries laying around from other projects, and decided to get a Sparkfun Pro Micro to dink around with. I've had 3 of these things now, the other two were used in EdTrackers, but I had always wanted to get one just to tinker around with.

So everything arrived, I soldered on some header pins on the Arduino, slapped it on a breadboard, and hooked up an old PC speaker and uploaded a basic sketch just to beep the speaker randomly. Yay it works and beeps! So I started messing about with the code, added some random delays just to learn. Went to upload the new code, and now nothing loving works.

Windows has decided that after uploading the first sketch, my Arduino is no longer an Arduino and just throws "Windows has detected problems with this device and has disabled it Code 43" whenever I plug in the USB or reset the board.

Apparently this is a super loving common problem, and the Arduino community has been super poo poo at helping anyone with it, considering the number of questions that have never been resolved.

I managed to upload the basic Blink sketch by dinking with resetting the board and trying to get the upload through before windows cockblocks everything, but now I'm just stuck. Nothing will upload to the board.

I've tried:

Updating FTDI and Arduino drivers (Doesn't fix poo poo, doesn't even work because Windows says "Your drivers are up to date duder"
Using different USB cords
Plugging the loving thing into every single USB port on my machine
Updating Arduino software
Sacrificing chickens

I love spending money that just sits here on my desk doing nothing because opensource hadware/software forums for debugging are a joke.

evil_bunnY
Apr 2, 2003

Unplug everything off your board and reconnect it to your host. The only time I've run into that issues is when I've shorted GPIO's I shouldn't have. Thanks to the wonders of modern multifuses I just had to unplug and double check my wiring.

Enos Shenk
Nov 3, 2011


Nope, doesn't do poo poo. Literally the instant I plug in the USB or reset windows says "I dunno what that is lul just gonna disable it gently caress you"

I hate electronics.

Brekelefuw
Dec 16, 2003
I Like Trumpets
Does anyone want to write a small program for me? I can offer some compensation if necessary. Annotations would also be great so I have an idea of how the code works.

Above I posted about making a vibration sensing tool.

Basically the program will take the vibration level and convert it to a score from 0-1000 and spit it out either on my 16x2 LCD screen, or on the 4 digit 7 segment display that I also have.
So far on my breadboard, I have the LCD powering on. I haven't quite got the sensor wired in because I am not sure if I need a program running on the board to tell me whether or not the sensor is picking up any data.
I have been using 123d Circuits to mess with things without frying my actual Arduino.

I purchased 3 different sensors to see which one works best.

https://www.creatroninc.com/product/vibration-sensor/ sensor with adjustable pot.
https://www.creatroninc.com/product/piezo-vibration-sensor-with-mass/ Piezo with weight
https://www.creatroninc.com/product/high-sensitivity-vibration-sensor/ High sensitivity sensor. I think this one will work the best.


The code that I thought I could use as a test for the sensor comes up with plenty of errors when compiling, and since I'm totally new to code, I don't really know how to correct the issues.
The code I was trying is http://arduinotronics.blogspot.ca/2014/09/arduino-seismic-vibration-sensor.html
I changed the #include thing to be the standard LiquidCrystal.h library instead of the lcd.h in the code, but that didn't help.

huhu
Feb 24, 2006
Fun story... My previous question stemmed from working for the first time with a bluetooth shield at a hackathon this past weekend. At about 1AM, after working for nearly 16 hours, I ran into an issue where all of a sudden, my accelerator was returning nothing but high values of 1023. It made no sense, and I set about checking for shorts, that voltage was going where it needed to, uploaded the example sketch, etc etc. Finally after an hour and a half I say gently caress it, tell my group I'm giving up for the night. Go to unplug my Arduino, oh wait I plugged in two Arduinos and was trying to read the Serial data from the other Arduino. :suicide:. Good times.

Sagebrush
Feb 26, 2012

Brekelefuw posted:

Above I posted about making a vibration sensing tool.

Basically the program will take the vibration level and convert it to a score from 0-1000

To clarify your problem, what do you mean by "level?" The magnitude of the vibration, the frequency, the direction...? There are many things you might be interested in, and the code (and hardware) will look different for each situation.

Adbot
ADBOT LOVES YOU

Brekelefuw
Dec 16, 2003
I Like Trumpets
I want to measure the amount of physical vibrations given off at the point the sensor is pressed on.
I hope to be able to find where my instruments are losing energy through wall vibrations so I can redesign how they are built, and maximise feedback to the player and audience.

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