8 solenoid outputs and 8 inputs from text

Hello Everyone,

I’d like to see a project go from the cognitive space I’ve been storing it in to take on a more tangible form.

Using an Arduino, UNO, I would like to control the outputs of 8 solenoids. However, the inputs don’t seem as simple for me to comprehend. I would like to control each solenoid independently of one another using numerical text as the inputs. To do this, I would like to take 8 digit numbers of only 1s, and 0s, to make each solenoid operate.

For example, the number combination, 1011 0101 would allow solenoid #1, #3, #4, #6, and #8 to activate. Leaving solenoids, #2, #5, and #7 stationary.

Does this make sense?

I have no idea where to store the sequences of numbers (data) for the Arduino to retrieve in order to function properly.

What would be the best way to do this? Would it be best to create a spreadsheet of numbers and have Arduino call upon the file looking for each set of numbers repeatedly?

As I’ve said this project is still in the concept phase, so I am open to all sorts of ideas.

I have not acquired the solenoids yet. Does anyone know of a good supplier for such equipment? Preferably in Canada for lower shipping costs.

Thank you,

Daniel

I don't understand the role of the spreadsheet.
It seems fairly straightforward to input eight digits (possibly even eight binary digits packed in a single byte) and operate eight outputs .
Maybe one of us is over-thinking the problem.

Where do these numbers ultimately come from, and roughly how many discrete values are you going to access?

Is there an implied duration / interval associated with each value, and if so is it safe to assume that the duration / interval is the same for all values, or does that need to be included i the data?

First, I want to say thank you to both your help.

As for the spreadsheet, I thought this would be a good way to keep the data organized. But, it does not have to be done this way. The amount of 1s, and 0s varies. What I have done is taken a bit of text (the intro to my master's thesis) and converted it into 8-bit binary code. I would like to take this slew of data and have it represented by the movement of solenoids.

As for time interval, I thought 1 second would be good to get the project working, but I may want to change this number in the future.

Does this help clarify what I would like this project to do?

The mechanical parts beyond the solenoids haven't been thought out yet. I am hoping that additional creative component will come as I work through this part.

dkoc:
Hello Everyone,

I’d like to see a project go from the cognitive space I’ve been storing it in to take on a more tangible form.

Using an Arduino, UNO, I would like to control the outputs of 8 solenoids. However, the inputs don’t seem as simple for me to comprehend. I would like to control each solenoid independently of one another using numerical text as the inputs. To do this, I would like to take 8 digit numbers of only 1s, and 0s, to make each solenoid operate.

For example, the number combination, 1011 0101 would allow solenoid #1, #3, #4, #6, and #8 to activate. Leaving solenoids, #2, #5, and #7 stationary.

10110101 is 181 in decimal.

Does this make sense?

Yes. A for loop with bit shifting and masking would achieve that.

I have no idea where to store the sequences of numbers (data) for the Arduino to retrieve in order to function properly.

Store them as bytes. If there are more than a few different sequences, store the numbers in an array.

What would be the best way to do this? Would it be best to create a spreadsheet of numbers and have Arduino call upon the file looking for each set of numbers repeatedly?

A spreadsheet is unneccessary.

dkoc:
What I have done is taken a bit of text (the intro to my master's thesis) and converted it into 8-bit binary code. I would like to take this slew of data and have it represented by the movement of solenoids.

So it's pseudo-random, then? How many values are you talking about?

I'd like the movement of the solenoids activate in the order the binary code is in. For example the letters A, B, and C in binary code is:

01000001
01000010
01000110

It would be ideal if the arduino would call upon these number sets and then represent the 1s as a solenoid movement in the order I place each set of numbers in. I am not sure where to store these numbers. For the size or amount of binary code sets, the size (length) of the "document" storing them could be small, and as simple as storing the binary representations as A, B, C. for a starting point to get the project working.

Thanks again for everyone's help.

The characters will be in their correct binary representation if you send them, one at a time, via the serial link to your Arduino.
Picking them apart into bits is trivial, even if you use bitRead.

Edit: they'll also be in their correct binary notation if you store them as plain text file on an SD card attached to your Arduino.

Yes, exactly. I was just about to edit my previous post. I think storing the binary code as a plain text file on an SD card will do.

It may be difficult to get 8 solenoids to work on the Arduino. For one, I believe they draw a lot of current creating an excessive amount of heat.

I'm going to rig this up using servos to try it out.

I currently do not own an SD card reader. Do you know of one that will work good on the Arduino and this project.

I currently do not own an SD card reader. Do you know of one that will work good on the Arduino and this project.

To get the most bang for the buck ($10 shipped), I'd suggest getting an Ethernet shield with the SD card reader like below.

http://www.ebay.com/itm/New-Ethernet-Module-Shield-W5100-For-Arduino-2009-UNO-Mega-1280-2560-/300919106157?pt=LH_DefaultDomain_0&hash=item46102d2a6d

Thank you for the link.

You need to number the bits like the rest of the world, the right hand most bit is bit zero, the left hand most bit is bit seven.
How long do the solonoides have to be on for. My glockenspiel project has eight solonoides but they run from 12V through a Darlington array.

http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html

Thanks Mike,

That was a very informative article.

Grumpy_Mike:
the left hand most bit is bit zero, the right hand most bit is bit seven.

If you are talking about bits within a byte/octet then bit zero would represent the least significant bit which is conventionally the right-most one.

Sorry dyslexia strikes again I meant the other let and right. Edited the post now.