1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Magic: The Mini-magic Switchboard should I make it a kit?

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by blueroomelectronics, Jan 18, 2008.

  1. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You are correct. This is the slight of hand I was talking about much earlier. It is an old staple. Ask a person to pick a hand then keep or discard without regard to the choice. The magician never specifies if he is going to keep or discard your choose. Because of that most people do not catch on.
     
  2. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Assembled board

    Attached is a pic of the finished board. The switch connector was to close to the processor socket but using a right angle header was a good work around. The problem is fixed foil_1C2.pdf.

    This board is setup to bulbs. It can also be assembled for use with LEDs.
     

    Attached Files:

  3. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    I finally got around to building a board and writing some code for this.

    The code starts of in learning mode and will assign switches in the order they are switched to bulbs from 1 to 4. Once all switches are assigned it goes into display mode. It stays in display mode until either, a bulb is removed or replaced, a preset sequence is entered or the timer times out AND all switches are off.

    The code is self explanatory and is only 230 byte long.

    I haven't tried this on 3v0's board as I ended up making my own (due to dodgy eyesight and even dodgier soldering). I think the equates at the top are correct. Maybe someone can try it and let me know.

    Mike.
     
    Last edited: Jul 6, 2008
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. wmmullaney

    wmmullaney New Member

    Joined:
    Dec 11, 2006
    Messages:
    364
    Likes:
    6
    Location:
    USA

    Nice job, 3v0!! Looks great!
     
  6. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Mike,

    I should have made the board larger. I will spread things out a bit to make it easier to build. In the past I have given people grief for making things to small:eek:

    The C code for the board is comming along. You must have done some nice work to get it is so little space.

    wmmullaney,

    I did not get the board in the mail as planned. I will be sending you an easier to solder version this week:)
     
  7. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    I've been debugging a really simple version is asm. We'll have to compare code when we're done.
     
  8. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    This is what my prototype looks like. The board I made uses 2n7000 and 100k pull down resistors which are a little high - they take a while to discharge the pin capacitance. I can post the circuit and board if anyone needs a more spread out version.

    Next step is to find a nice piece of wood and get working with the router to fit it inside.

    Mike.
     
    Last edited: Jul 6, 2008
  9. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    It'll be interesting to see how the various versions compare in the end. I added the timeout bit at the very end and think it makes it less flexible. Having it learn when a bulb is removed or a secret sequence is entered seems to work better.

    @3v0,
    Which C compiler are you using. I considered switching to a 627 so I could use the free HiTech compiler. I knew I should have waited until I had a socket for the 88.

    Mike.
     
  10. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    I'm cheating and using an old ICE with a 16F628 pod.
     
  11. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Actualy I am thinking of redoing the board to use with a 18F1320 (or similar) so we can use the free compiler. I am using the CCS complier which is not free for the 88. I have never used the Hi-Tech compiler (that I can recall) and since I have been talking about not using the 16F chips I should put my money where... But porting from CCS to Hi-Tech should not be difficult.

    I may also add some onboard status llights to help with debug. Either that or a serial port. Maybe a speaker too! Please stop me. Actualy I am thinking there are other games that could be played on this little box.

    I am having fun with it. It is works fine the first time through. Just need to get it working right in a loop...

    The IO is a simpiler without the bulb sense circuit.
     
  12. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    This is a first draft of the code for the board with the bulb sensing circuit. I seems to be working but I am sure there are bugs and room for improvement. It has only been tested a few times during development.

    I will not have time to work on the code much during the week. With that in mind I have opted to share it.

    It is written in CCS which is not free for the 16F88. The code compiles to 511 words of memory. Could be smaller without the debug code but who cares ?

    The program does not use any hardware other then the ports.

    The HEX file is in the attached zip folder.

    EDIT: If you build a board from my layout(s) check the pinout (EBC/CBE) of your transistors. It may not match what is show. The foil artwork is OK, it is just a matter of which way you face the transistors.
     

    Attached Files:

    Last edited: Jan 27, 2008
  13. wmmullaney

    wmmullaney New Member

    Joined:
    Dec 11, 2006
    Messages:
    364
    Likes:
    6
    Location:
    USA
    Why do you like C over ASM?

    I'd always rather use ASM.
     
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The PC you do your development on is a computer so why not let it do more of the work for you.

    I use C because it is easier on my brain! Actualy C code is said to be faster to develope and easier to maintain. Granted a person who is very good at a given assembler can do quite well.

    I am used to using C. When I work all our development was done in C. If we needed more speed we would drop in a bit of assembler but that was rare.

    It is easier to move from processor to process using C. I still have to understand the processor but I do not have to be fluent in it. If you change the port definitions a few other bits on the Switchboard code it will run on any processor hooked to 4 switches and 4 transistors driving bulbs

    I have no problem with people uisng ASM of any sort. I have been there, done that, on a number of machines. Moved on if you will.
     
    Last edited: Jan 28, 2008
  15. bananasiong

    bananasiong New Member

    Joined:
    Mar 7, 2006
    Messages:
    1,893
    Likes:
    7
    Location:
    Malaysia
    I'm also ASM user, but I know that C is used in many industrial. I wanted to learn up C for 24F during the semester break, but didn't seem to have enough time. Hopefully I can get to learn it soon. It is useless without any action :p
     
  16. maurilio

    maurilio New Member

    Joined:
    Feb 1, 2008
    Messages:
    1
    Likes:
    0
    follow

    dear 3vO
    could you tell me if I could buy from you the electronic already done
    thanks
    maurilio
     
  17. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I have succeeded in coloring bulbs.

    The method is inspired by the page Mark posted.

    I did all my mixing in a single 1 liter soda bottle cap. Rinse clean after each color.

    To make the bulbs easier to handle wrap masking tape around the base and add a tab below the bulb. This tab makes them easier to handle.

    To color the bulbs I added about 1/3 to 1/2 parts water to 1 part Elmer's while glue. I then mixed in several drops of food coloring. To get a color you like start with a drop or two of coloring and increase as desired. You can dip the bulb/roll the bulb in the mixture to see how it looks. If you do not like it just rinse off the glue and try again.

    The bulbs will dry to a hazy lackluster finish. To correct this and to add durability spray the bulbs with clear acrylic spray, dry between coats.


    That's it. Have fun.
     
  18. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    No. I do not sell kits or assembled units.
     
  19. abrell

    abrell New Member

    Joined:
    Jan 21, 2008
    Messages:
    2
    Likes:
    0
    There exists some special enamel for light bulbs. Normally you can get red, yellow, green and blue enamel. In Germany you can get it from Conrad Electronics and Westfalia.

    I would like to built a bigger version of this project with 230 volts main input and 4 sockets of the type E27. Coloured bulbs (230 V, 15 W) are a common item, so I would not need to paint the light bulbs. Has anybody designed a circuit design for this? I would try some triacs and a LC- unit to prevent electromagnetic problems. Of course the main PCB would need a power supply and there should be a fuse in the mains supply.
     
  20. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Use the existing circuit. The same transistors can drive relays instead of a bulbs. You could use triacs or solid state relays but since it switches infrequently relays would work fine.

    Good to know about the special paint.

    This is what my glue bulbs look like, not too tacky :eek:

    [​IMG][​IMG]
     
  21. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    Doesn't look quite as good as the original :p

    Early days yet though - and love the bulbs!.
     

Share This Page