Forum Index > Projects > Micro-readerboard project support
 Help with "simple" project
 |  Printable Version
By: Anonymous: vicknick () on Monday, December 12 2011 @ 04:56 PM PST (Read 3115 times)  
Anonymous: vicknick

I have been reading your projects and am looking for something similar to what I am trying to do, with no luck. I have a science fair project of building a simple reader for a magnetic data storage device, which is actually just 7 bar magnets. I am using bar magnets to "read" each bit by either pulling closed a connection or pushing it open. I have the single character coded into the 7 bar magnets, and I want to feed these wires into a chip and have it drive the 7 segment led display to display the character that is being read. In other words, do a parallel read of the 7 bits, convert from ascii to the led driver, and display the character.
I bought the micro-readerboard hoping I would be able to figure out a way to do this, but I am no knowledgable enough to see if there is a way to do it with these components.
Help?






       
   
By: Ugi (offline) on Tuesday, December 13 2011 @ 09:45 AM PST  
Ugi

A hall effect sensor such as the A1301 described here: http://arduino.cc/playground/Code/HallEffect can detect the presence of a magnetic field and its polarity.

You could use either one sensor and move the array of magnets past or use seven separate sensors.

Ideally you would use an analogue to digital converter to read the sensor, and there isn't one on the ATtiny chip that you will have got with the readerboard. An ATmega 168 has 6 analogue inputs and so could comfortably read 6 sensors. I would suggest this as an option because you could use some of the code from the arduino playground, as above, to validate your setup. If you are moving the magnets past as sensor you may need a known code (e.g. NSNS) at the beginning to get the timing right.

It may be that your magnets are strong enough that the ATtiny will read a Hall sensor with one pole as a "0" and the other pole as a "1" (because the output will approach 0V and 5V respectively). However, you really need to detect 3 states - north pole, south pole and no magnet. That will be more of an issue I would think because the no-magnet output of around 2.5V will probably read as a zero. You might be able to use a transistor on the Hall effect sensor with some sort of voltage divider as a comparison to distinguish the 2.5V mid-point (no magnet) from a "0" by driving a second pin of the processor high at above 2V ish. Might take some fiddling to make it work.


Forum Apprentice
Apprentice

Status: offline

Registered: 10/06/11
Posts: 9

Profile Email    
   
By: Anonymous: vicknick () on Wednesday, December 14 2011 @ 06:38 AM PST  
Anonymous: vicknick

We have already solved the reader part of the problem. We are simply using 7 bar magnets for the data, and 7 bar magnets for the reader, all of the reader magnets are "S" down. There are wires hot glued to each magnet. There is enough play in the reader magnets to attract and repel, causing opens and closed circuits with the wires.
I could at this point just light up an led for each of the 7 magnets, lit is "1" off is "0". I was hoping to demonstrate that the bits actually hold the ascii code for a character, and display the character using the 7 segment display. I just need to be able to "decode" the ascii and drive the display output. It does not need to be nearly so fancy as you are describing. Just position the reader over one "byte" (actually, just the 7 bits, not 8) and
hit a button to say "read" and get the display to light up at that point. Seems doable to me.






       
   
By: Ugi (offline) on Wednesday, December 14 2011 @ 07:28 AM PST  
Ugi

I could at this point just light up an led for each of the 7 magnets, lit is "1" off is "0". I was hoping to demonstrate that the bits actually hold the ascii code for a character, and display the character using the 7 segment display. I just need to be able to "decode" the ascii and drive the display output. It does not need to be nearly so fancy as you are describing. Just position the reader over one "byte" (actually, just the 7 bits, not 8) and
hit a button to say "read" and get the display to light up at that point. Seems doable to me.



In which case it's entirely doable, but you don't have enough pins on the ATtiny to drive the display and read 7 switches. The readerboard already uses nearly all of the pins of the ATtiny. It has 18 I/O pins and if we ignore the decimal point then you would need 16 to drive the display. If you had one extra pin available then you could drive a shift-register (like a CD4021B ) to read your 7 inputs but AFAIK you can't do so on only two pins. You could drive the display from shift-registers but that would mean a complete redesign,

There may be others with more experience than me who can shed greater light on it.


Forum Apprentice
Apprentice

Status: offline

Registered: 10/06/11
Posts: 9

Profile Email    
   
By: Anonymous: vicknick () on Wednesday, December 14 2011 @ 03:33 PM PST  
Anonymous: vicknick

OK, Thanks. We will stick with the simple led's on each of the 7 bit lines.
Maybe later he can find a chip with a parallel interface that can do this.






       
   



 All times are PDT. The time is now 10:13 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?