[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I want something like an arduino except with about 440 pins.
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /diy/ - Do It yourself

Thread replies: 61
Thread images: 7
File: sponge.jpg (3 KB, 160x160) Image search: [Google]
sponge.jpg
3 KB, 160x160
I want something like an arduino except with about 440 pins.
can i get an adapter for a rasberri pi?
95% of the pins only need to be output
>>
>>907736
why not just wiring 100 wires to one pin?
>>
no way you're gonna find this. it'll have to be shift registers, or a bunch of different mega boards talking to each other.
http://www.thekanes.org/2010/06/09/expanding-the-arduino-cheap-ways-to-add-output-pins-and-power/

or, if you want to enter the wonderful world of FPGA, you can get an Actel APA750 for about $1,000 dollars.
>>
>>907736
95% of the pins need to be input*
>>
>>907741
shift registers seem more affordable. how many shift registers can i plug into each other?
>>
>how many shift registers can i plug into each other?

there's no limit. but they're for outputs. if you actually want inputs, then you need some other kind of chip. something like a bunch of SN74LS150 16-1 encoders.
>>
>>907755
>SN74LS150 16-1
i goggled that and got nothing
>>
you'd probably wanna get the CMOS equivalent, if it exists, or maybe some 32-1 so you have fewer chips.

https://fexposit.webs.ull.es/74150.pdf
>>
>>907736
what about rasberry pi? what are my options wuith that?
>>
same thing as the arduino. nobody makes 400-input add-ons coz nobody would buy them.
>>
>>907736
If you explained what you're actually trying to achieve, someone could suggest a more sensible solution.
>>
>>907814
I'm building a 6 sound custom drum machine with 24 beats per bar, and 3 accenting levels for every beat
>>
>>908078
And where do the 440 inputs figure in?
>>
>>908079
This drum machine needs 3 inputs per beat for every beat.
>>
>>908121
It's a bit difficult to explain and I want to patent the idea if it works, so I'm cautious about explaining too much.
>>
>>908123
>It's a bit difficult to explain and I want to patent the idea if it works, so I'm cautious about explaining too much.

It may help to explain: an arduino uno has 20 pins that can work as inputs, but it doesn't really have "20 inputs". What it has is 1 input, that it connects to each of the pins, from the first to the last, and then starts back to the first. How fast it does this is called the "scan rate".
,,,,,,
Your PC keyboard is wired the same way--it has ~110 buttons on it, but it doesn't need 110 separate wires, because each button doesn't need a separate wire. It scans through every single button at a rate of around 8 to 10 kilohertz.

In theory--if you wanted to hook (up to) 512 buttons up to one arduino,,,,, you don't have 512 inputs.
What you would do is you would have 1 input, and then you would have 9 addressing lines, and that would allow you to select routing that one input to any one of a total of 512 buttons. So yea, it can be done. It's not that hard, or expensive.

You are limited by the scan speed of the board tho.
And an Arduino Due is ~7x faster than a Mega, and doesn't cost much more. aliexpress Megas cost $9 and Dues only cost $15. I would say to start with a Due just for the higher speed.

A Due has 54 inputs too, so you could split it up into 4 banks of inputs then: you would have four groups of {1 input with 7 addressing lines} that would cover 128 inputs each.
That would use 28 pins on the Due board (leaving some for other stuff, like a display) and give you 512 total possible inputs.
>>
>>907765
>what about rasberry pi? what are my options wuith that?
It would be faster to use an 'embedded' board like a Arduino Due, because they run in immediate mode. They only run the code necessary to do the exact task you want.

The r-pi would be slower because (even if it had the same chip as a CPU) it is running a full operating system. The operating system supports a whole bunch of complex automated services that is a huge help for a desktop PC, but that is stuff that you're not going to need on a drum machine.

An FPGA would be an even-way-faster choice, and there's cheap ones for under $50-- but that's a pretty steep learning curve to begin with. I would suggest you start with the Arduino Due and build the hardware so that you can change the Due to something else later if you want.
>>
File: tumblr_n9wlxsVtwF1roe75co1_500.jpg (258 KB, 500x536) Image search: [Google]
tumblr_n9wlxsVtwF1roe75co1_500.jpg
258 KB, 500x536
>>908150
thanks a lot I really appreciate it
I'l make a small scale prototype with my arduino, then buy a due to scale up.
>>
>>908150
what do i use to create the adressing lines?
>>
>>908123
Not worth it. Your idea is unlikely to be original or non-obvious, and you don't have the resources to defend it.
>>
You can read an infinite number of inputs using a bunch of 74165As and three pins, but a user interface that requires 400 distinct inputs is going to be terrible.
>>
>>908153
Not true at all.

1) we're talking about human-measurable deadlines vs machines that execute hundreds of millions of instructions per second. You're not bitbanging DVB or capturing Thunderbolt.
2) You just boot linux up in "don't use one core" mode, route the interrupts away from it, and run your critical process on the completely empty core. Don't make any syscalls, and you're running on bare metal, except that said bare metal is a NUMA machine over forty times faster, with a full linux machine sharing its memory space ready to do anything that an operating system makes easier. Which is quite a lot, otherwise we'd all still be running DOS.
>>
>>908201
>what do i use to create the adressing lines?
you use chip called multiplexers-
https://en.wikipedia.org/wiki/Multiplexer
there are some schematic examples shown on the wiki page

there are a lot of breakout boards for the CD74HC4067 multiplexer chips, and they only cost about $1.75 on aliexpress.
you would need 34 of these boards, and that would be $59.50 total (+ shipping).

on the arduino board, you would need to use 17 pins total: 16 address lines and one input line.

I've never built anything that large, so I don't know what kind of speeds you would see from it. And there may be other issues that pop up later--but the basic idea of having 512 inputs (or more) isn't really difficult to do.

Also if you didn't know: the arduino mega is 5v logic, and the Due is 3.3v. So building it on one and then changing to the other will require level converters on one of them...
>>
>>908351
thanks for your help I've ordered a couple to try out
are there multiplexers with more address lines available?
>>
>>908367
>are there multiplexers with more address lines available?
not that I know of, but I never searched.

note that the CD74HC4067 is a modernized version of a 74xx series chip, the 74150. the CD74HC4067 is a smaller package and can handle analog signals both directions, but it still only has 16 lines.
if companies need a bigger multiplexer today, they usually use a custom chip for it

Also I was mistaken: the CD74HC4067 can work with either 3.3v or 5v, so it wouldn't need level converters if you switched between using it on a 3.3v or a 5v logic board.

Also, what are you going to use for buttons here? buttons are usually kinda expensive, for nicer ones... Course--if you are buying 500 at a time you'll get a discount, but still.
>>
File: res49h[1].jpg (481 KB, 1985x1271) Image search: [Google]
res49h[1].jpg
481 KB, 1985x1271
>>908123
>It's a bit difficult to explain and I want to patent the idea if it works, so I'm cautious about explaining too much.
Don't do that. It's incredibly annoying and it stops us from helping you.

Everyone, here's what OP's planning to do:

He's going to create a machine that has a visual representation of a drum loop laid out on a switch panel. The user can see what it looks like, and can manipulate it directly and in real-time. There's going to be 24 columns of switch-like things, that'll have some kind of special design so they blend into the background when they're off. This way, the shape of the drum loop will be very similar to how it looks on, say, an iPad, but it'll be physical switches that can be directly manipulated.

OP was silly to worry about patents, because a) the idea was obvious to anyone skilled in the art (one of the primary criteria for denying a patent), and the idea of using a physical device to represent a sequence of digital values over time was patented in 1839 as the Jacquard Loom, one of the precursors to the modern stored-program computer.

OP, as you don't need to be able to read each and every switch independently at once, have a look into keyboard matrices. PC keyboards don't have a little chip inside them with 105 input pins, they have a chip that reads every row, and powers every column in turn, to see which keys in each column have been pressed. Diodes are used to stop the power leaking back up the switches in other columns.

For example, in your device, you'd use a 24*18 matrix, and you'd apply power to each of the 24 columns that make up the bar in turn. Each time you do that, you'd measure 18 inputs, to see which switches are on. You'd wait, say, 50 microseconds, and then power the next column and repeat. That way you'd sample the entire matrix 800 times per second.

Given the huge number of switches you're after, you'd probably want to be using a purpose-built keyboard IC, such as a tca8418.
>>
>>908473

As far as the electronics are concerned you are right about what i am doing, the physical interface itself is very different, and is the part I think i might be able to patent. I won't go into that on here until I've spoken to someone who knows patent law and can help me

>>That way you'd sample the entire matrix 800 times per second.
Would I get those speeds out of an arduino due?
could i get switches with 4 or five different steps? like a variable resistor with 5 levels? that would cut down on switches by a factor of 3
>>
I also need help with loading samples onto a chip wich can be triggered. can that be done within an arduino, then output to an amp, or will it require more haardware? altogether it would be less than 10 seconds of audio samples, but i need polyphpony
>>
File: dmnd8482_png_project-body.jpg (55 KB, 749x499) Image search: [Google]
dmnd8482_png_project-body.jpg
55 KB, 749x499
>>907736
OP you need the snickerdoodle black...

https://www.crowdsupply.com/krtkl/snickerdoodle
>>
>>908713
>the part I think i might be able to patent.

There are already at least 5 different companies who already hold patents that a patent lawyer would consider overlapping your plan, 1 that produces something entirely unlike what you are doing but has eager lawyers and 4+ who merely exist as shell companies, owned by shells and owned by shells, that produce nothing, exist as only an empty office in east texas and exists only to sue, force a settlement and trade not-really-applicable-but-impossible-to-fight patent to another company who will sue you.
>>
>>908731
Damn. I thought that might be the case. That's why i will focus on low volume high profit, high quality build so i'm less likely to attract copies, and hopefully will have a few sales before someone steals my idea
>>
>>908718
aw shiiiit, i just wasted money on a arduino due!
>>
>>908716
Since this is a commercial project, standard consulting fees apply.
>>
>>908718

OP does not need that. It's really cool, but he doesn't need it.

What he does need is three PCF8575s hooked to his I2C bus, which'll give him 48 extra I/Os. Using these, he can make a 24x18 keyboard matrix, which he can talk to using a Pi or Arduino over a four-wire I2C+Power lead.

All the wiring complexity is kept within the switch board.

>>908713
>Would I get those speeds out of an arduino due
Given that its clock transitions 84,000,000 times a second, and you're trying to do something 19,200 times a second, I reckon the odds are good.

>could i get switches with 4 or five different steps? like a variable resistor with 5 levels? that would cut down on switches by a factor of 3
No, that would be stupid, because now you have to do analogue sampling instead of digital. If the UX warrants multi-throw switches then use them, but hook them up digitally as individual inputs.
>>
>>908716
Sounds like you're trying to do in hardware something you should be doing in software.

Ditch the Arduino and replace it with a Pi Zero. You can easily do all your mixing in software.
>>
>>908784
Specifically, install FluidSynth, load it with your samples, and you're done.

It's a realtime MIDI wavetable synth, so all you need to do is send it midi events, and it does all the work.

As a bonus, $5 worth of passives gives you a MIDI-in so your device can be controlled externally: http://www.samplerbox.org/article/midiinwithrpi
>>
>>908741
>aw shiiiit, i just wasted money on a arduino due!
not really.
where it is possible--you are a lot better off using something that is cheap to replace, and is available from multiple manufacturers.

>>908716
>I also need help with loading samples onto a chip wich can be triggered. can that be done within an arduino, then output to an amp, or will it require more haardware? altogether it would be less than 10 seconds of audio samples, but i need polyphpony
go look at the Sparkfun wav trigger for $50 (item # 13660). it supports MIDI signals including bank switching and some MIDI effects, and has way more onboard sound file storage that you will need. (this way you can also build a MIDI-out to this thing, to use the MIDI with anything else you want in the future--)
>>
>>908873
Yeah, $50 for a device that does one thing and has no digital out sounds like a much better idea than $5 for a Raspberry Pi.

You should totally do that.
>>
>>908738
ffs idea stealing is the least of your problems m8
literally nobody cares, ideas are a dime a dozen, as they say

Anyway are you gonna be needing all the values all the time? If you only have to read knob values of the beat that's gonna play next it will make stuff a whole lot simpler.
>>
>>908150
This is a very informative post, thank you anon.
>>
>>908949
good point.
3 questions regarding the pi:
which model will give me the best bang for my buck regarding i/o pins, and audio out

will it be easy to program the pi to respond to physical inputs, then link to a library of sound files?

is the pi open source? after prototyping could I order a circuit board with pi equivalent directly wired to a silicon matrix for the switches to plug into? would it be easier to just buy them in bulk and wire them into the board?
>>
>>908473
currently making a test matrix for my arduino with some LEDs
seems to be working so far
I've got switches figured out now, i just need to worry about making sounds with this thing. either finding a cheap chip/card i can load sounds onto and trigger, or buying a rasberry pi and learning how to code that.
Any idea when the pi zero will be in stock?
>>
>>908955
Yeah, I'll just set it to read the beat its about to play, and link the delay time to the tempo variable resistor
>>
should i get this http://uk.rs-online.com/web/p/processor-microcontroller-development-kits/8134164/
>>
>>909307
The Pi's CPU is not available on the open market.
>>
>>909828
It probably wouldn't be worth trying to make them cheaper anyway given the current price point
>>
File: image.jpg (39 KB, 499x238) Image search: [Google]
image.jpg
39 KB, 499x238
>>909307
>>909828
If you want to embed a Pi in your system, you use the Compute Module:

https://www.raspberrypi.org/blog/raspberry-pi-compute-module-new-product/

Or, y'know, specify your own single-chip computer that fits your own needs.
>>
>>909635
>http://uk.rs-online.com/web/p/processor-microcontroller-development-kits/8134164/
It's not a terrible option.

You won't need any compute besides that, and it's nice and small and easy to integrate.
>>
>>909307
>will it be easy to program the pi to respond to physical inputs, then link to a library of sound files?
http://m.youtube.com/watch?v=_U3OL_s1dLA
>>
>>908949
>Yeah, $50 for a device that does one thing and has no digital out sounds like a much better idea than $5 for a Raspberry Pi.
first of all----the rpi's aren't really that cheap; they need a number of other things to be used. the $5 pi really costs $30 - $35 if you have to buy all the other stuff for it. The other Pi's cost $50-$65 all up.

second of all, the sparkfun (really Robertson) wave board will be a lot easier to use, especially for somebody who knows nothing about Linux. the Robertson board does only what OP wants--it takes MIDI signals as input and plays audio files off a microSD card, according to the sound files names. If OP wanted to make multiple SC cards with different samples, that would be pretty easy to do.

> and has no digital out
you'd have to specify what sort of "digital" you are speaking of here.
if the arduino is sending MIDI, it would seem to be pretty simple to add the ability to route that to an external port instead of the wav board
>>
>>909888
>>909307
There's also this, for which both source code and schematics are available:
http://www.qubitelectronix.com/#!nebulae/c23nm
>>
>>909888
nice!

>>908873
>http://www.qubitelectronix.com/#!nebulae/c23nm
I had a look at this, and a bunch of alternatives all priced around 20 bucks. They all use an SD card to read from. for mass production how do most kids toys store sounds? I'm not sure that I would want to be buying an SD card for every unit. is there a cheap way to have memory hardwired into the board?
>>
>>910042
meant to reply to >>909991
not>>910021
>>
>>910021
This is pretty cool, however most of what it does I have no use for. Would it be worth reverse engineering this to make a simple sampler?
>>
>>908873
Would it be relatively straightforward to reverse engineer the wav trigger, and intergrate it into the design of an arduino, then have them custom made?
I don't mind spending a bit of money during prototyping, if i know there aren't going to be bottlenecks later down the road
>>
Does anyone know if a WT588D would do the jobhttp://www.ebay.com/itm/WT588D-Programmable-Sound-Module-28-Pin-For-Arduino-/171309080218?hash=item27e2d11e9a:g:A2sAAOxyeglTYMZW
>>
>>910056
>Would it be relatively straightforward to reverse engineer the wav trigger, and intergrate it into the design of an arduino, then have them custom made?
the Robertson wav board is just an ARM acting as a DSP, and a DAC chip.

if you just wanted to make a few, it would be way quicker and easier to use a regular arduino due and the robertson board

if you wanted to produce hundreds / thousands of them, then you would engineer a PCB that had everything directly on it:
1--he ARM chip for the DSP,
2--the DAC chip for #1 above,
3--a writable RAM chip for the sound library (or a microSD card, since it's basically the same thing), and
4--[some method for scanning all those buttons] this could be an ARM, but that's probably way more processor power than technically necessary. the decision would really come down to the cost of the different methods easily possible.

this is a pretty big jump however,,,, to go from "not understanding how keyboards work" right to "designing your own embedded ARM devices"
I'm not being a dickwad or saying you're dumb or anything; I've never designed an ARM board either. It might not be as hard as I'm guessing, but then again it wouldn't be a quick and easy project, at least for me...
>>
>>909991
>you'd have to specify what sort of "digital" you are speaking of here.
The sort of "digital" you'd find in the phrase "digital audio". As in "that board from sparkfun has no support for digital audio". Whereas a Pi has built-in s/pdif, and can bit-bang whatever DAC takes your fancy.

>>909991
>first of all----the rpi's aren't really that cheap; they need a number of other things to be used.
You mean like a power supply and an SD card? That seems familiar. Where did I see that before? Oh, yes! In the additional requirements of the sound-playing-device that costs ten times what the new raspberry pi costs.
>>
>>910225
Maybe?

Is there a particular reason you keep trying to avoid using an SoC, when one SoC would solve all your problems in one go?
>>
>>910350
I bought a rasberry Pi, do you consider that an SoC?
I'm looking into different options, I would have thought that an arduino, with a wav trigger integrated into one chip would be the easiest way to go, but it's surprisingly more expensive. I'm going to see how i go programming the Pi and if i can get it to work reliably I'll probably build this thing around a pi zero
>>
>>910250
You are right, I do know very little about any of this. Do you know any good starting points for me to learn the skills required to engineer such a thing? alternatively a place i can contact people who can do it for me or at least help me?
Thread replies: 61
Thread images: 7

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.