Continue to Site

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.

  • 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.

PIC12C508

Status
Not open for further replies.
I will use the same chip for various projects. The CD tray was just one paradigm. The up down motorized -string movement has no position switches. Or the case of two led's that show for 15'' the North and East coordinates of the box.
If tristate is power consuming then it will of course be ripped off.

Tristate neither consumes nor saves power, although depending on exactly what you're connecting to it 'could' do either.

If you're hoping to open/close a mech with any degree of accuracy, then you NEED position sensors of some kind, the easiest of which are limit switches.

On simple timed delays you're likely to end up with 'closed' somewhere between closed and open 25%, and 'open' somewhere between open 75% and fully open - it will also vary considerably depending on the conditions at the time.

One extra point, as you're planning using these chips for various projects, buy some 12F508 FLASH versions, and use those for experimenting - otherwise your 98 chips won't last long. If you're really dedicated you could get a UV erasable 12C508, if they still make them? (I have one).
 
About ULN2004: If I drive the inputs from my μc outputs I can't understand why it is not good for the job.
The uln2004 (https://www.ti.com/lit/ds/symlink/uln2004ai.pdf ) can only sink current. This is what one of its outputs consists of:
upload_2014-3-31_20-57-37.png

You need something that can also source current to allow the current to flow through your motor in both directions.
Maybe the tristate as selection is wrong in my case but if we follow the simple Hi/Low configuration, then the motor will get the positive to one of his poles for 15" and move forward and the next 15" to the other one and move in reverse. The other pole will change to the opposite for the same time and then both will stay Hi or Low so the motor stays idle.
I am wrong?
When the two outputs are different, they can provide a current between them. When they are both the same (both high or both low), then they won't provide current between them.

As stated by Nigel, above, if you're using a CD player, you can make use of the limit switch to tell the motor when to stop. If you don't want to worry about having to connect feedback switches, you can have a look at using stepper motors. These motors can be driven a number of steps in a certain direction; therefore you know where it's moved to without feedback (provided nothing is blocking the motor). Here's an example geared stepper motor which may be interesting for you (it can be driven using the ULN2004, if you wanted): **broken link removed** (it's only AU$1.79 incl. shipping)
 

Attachments

  • upload_2014-3-31_20-57-26.png
    upload_2014-3-31_20-57-26.png
    152.8 KB · Views: 266
My main concern right now is to make some very simple and low cost projects. I need something that will be simple sturdy and if possible weatherproof. Most of our caches (boxes) are placed in mountains and woods, so simplicity is of main concern. Also power consuming has a lot to think about and solve. Some of them remain unused for long periods and some are used very often. Exact movement projects or high accuracy are not the primary target. I will not spend time , money or design. Just quick - low cost - surprising gadgets that will bring the smile to their face.
Many of those projects get lost if the player is not careful and exposes the hide to curious non-players !
I am not asking for any robotic exact movement ( which I admire but it is not familiar to me!) But I will welcome any bright, easy to make ideas you may have, any proposals for interesting boxes that can be built relatively quick and cheap !
 
Last edited:
Well best of luck to you with your designs (I don't have any bright ideas re enclosures).

If you find that you want to keep both outputs low to save power, then replace the lines
Code:
    MOVLW    0xFF    ; all inputs
    TRIS    GPIO
with
Code:
     CLRF    GPIO      ; all outputs low
 
Well best of luck to you with your designs (I don't have any bright ideas re enclosures).

If you find that you want to keep both outputs low to save power, then replace the lines

Please note that it depends entirely on what's connected to the pins, making them low could just as easily increase consumption, it's something you need to evaluate on an individual basis.
 
any proposals for interesting boxes that can be built relatively quick and cheap !
Rather than boxes with mechanical movements (which will probably fail quickly because of rust etc), why not have boxes which generate simple sound or light sequences/patterns and would be more robust and easier to weatherproof?
 
Yes ! That's the spirit ! Morse code sound box. Color coded led's in a box that will light in the correct order and show coordinates, small voice recording and playing message etc. But as you can easily assume the result can only be achieved by learning how to program this PIC μc and that is a huge task for me. Still I will try to achieve them with PIC or Arduino . The later been easier for me. I welcome any proposal or thoughts from any one. And any help offered about.
Thank you for sharing!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top