Shop OBEX P1 Docs P2 Docs Learn Events
Any help — Parallax Forums

Any help

Technokid40Technokid40 Posts: 2
edited 2011-05-15 10:00 in General Discussion
I am new to the Stamp. and have a small project that I am not sure if its possible with the stamp.

actually there are several but all in one..

1. Variable speed control switching monitor and control at 4 separate speeds.
2. voltage monitoring and control ( voltage, Amps, and Charge )
3. Multiple motor sequential control based on speed.

these are just a few..

also can the stamp system monitor more than one stamp in series, parallel, or even USB connection, addressing each with their unique ID address.

if this is very possible and if anyone have done this. please fill me in on your thoughts, and I will be rolling.

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-15 07:08
    Welcome to Parallax.

    It's impossible to tell you a meaningful answer to your questions with the information you've given. What kinds of motors are you talking about? What kinds of power levels? Have you looked at Parallax's webstore? There are several motor controllers there. Note that a Stamp (as is true of microcontrollers in general) requires an external controller to handle the voltage and current for the motor.

    Look at the HB25 controller for one example. It handles a single DC motor and whatever microcontroller you use can set the speed and direction of the motor. I don't know exactly how many different speeds it allows, but it's at least several hundred.

    For monitoring voltage, current, etc., you'll need some kind of external analog to digital converter (ADC) and some signal conditioning circuitry depending on what you're trying to do. The Stamp can monitor battery voltage all by itself (with a few passive components ... look here under "app-notes"), but really does a better job with an ADC.

    "Multiple motor sequential control based on speed"? Huh?

    "Stamp system monitor more than one stamp in series, parallel, or even USB connection"? Huh? What Stamp system? The Stamp is the microcontroller. People have built clusters of them and there are some Nuts and Volts Columns (browse through this index) on networking them.

    This doesn't sound like a "small project" from what description you've given. Stamps are great for small and medium sized projects. For large projects, maybe multiple Stamps or even Propellers or several of them might be better.
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-05-15 08:00
    I am not sure if you will appreciate this, but you asked for “Any help”, so here it goes.

    Allow me to do little preaching first.
    We live in GUI ( graphical user interface ) world, unfortunately we forgot how to communicate using graphics.
    I would suggest you draw yourself a picture / schematic of what you are trying to accomplish.
    Get a big piece of paper, pencil and eraser and put your idea on paper.

    Divide you project into functional modules. Start simple.

    You want to control motor, right?
    You need to know the speed etc.

    Once you got one “circuit:” drawn you can duplicate it and add another function module.

    When you get the whole “project” on paper you can identify the needs for
    time dependencies ( processing speed) , number of controls ( input / outputs), indicators ( voltage , current) etc.

    Than you be in a position to select suitable controller.
    After all, they all do pretty much the same, manipulate inputs and outputs.

    But you need to know how many inputs and outputs and how fast they need to be controlled first.

    Than you select your hardware and how you are going to interface it to your controller.
    ( The controller really does not care if it lights a LED or starts a turbine)

    You may find out that it won't do what you expected for whatever reason.
    Well, that is what the eraser is for!

    In the long run it is faster to work on the project this way.
    It used to be called engineering, a lost art now replaced by voodoo guessing.
    Good luck with your project and don't be shy to ask more questions here.
    I may have barked at you , but I do not bite.
    Vaclav
  • Technokid40Technokid40 Posts: 2
    edited 2011-05-15 09:30
    Mike Green wrote: »
    Welcome to Parallax.

    I did not think I would get such a fast response from the requested question I posted.

    OK this is what I am hoping to accomplish:

    system includes :
    Step 1:
    3 DC motors, ( voltage of these are not needed to be addressed ) these controlled on separate source. but the source need to be switched on and off based on a specific range of speeds, based on the speed the Stamp will turn one off and possibly a second one off based on a different speed.

    Step 2:
    Two separate battery banks,
    Bank 1: being used to power the motors and relay circuits etc.
    Bank 2: being charged ( as reserve, back-up ).

    Step 3:
    When 1st speed is reached one Motor is switched from drive motor to a generator, to charge the secondary Battery bank.
    When 2nd speed is reached 2nd motor s switched from drive motor to a generator, to charge the secondary Battery bank.

    Step 4:
    Voltage & Current Monitoring & Control:
    When DRIVE Battery bank reaches a specific charge and Current State,
    Bank 1 switched is off from the drive, to charge circuit, and Bank 2 switched to drive bank.

    Battery switching response must be about 1/2 second or less.

    **********************************************

    Maybe I am asking for more than what I can ask for out of a Stamp. I have read much about this processor. but have not yet directly work with it. if you have an idea or more information about ((( the Propeller )))

    **********************************************

    Also, if each individual control must be controlled on separate Stamps in a " Network " like you mentioned< Up to how many can you have on a network.


    This is just an Idea I have been looking to accomplish for many years, and now I would like to know if the stamp can handle my project. if not , then I shall research elsewhere.




    It's impossible to tell you a meaningful answer to your questions with the information you've given. What kinds of motors are you talking about? What kinds of power levels? Have you looked at Parallax's webstore? There are several motor controllers there. Note that a Stamp (as is true of microcontrollers in general) requires an external controller to handle the voltage and current for the motor.

    Look at the HB25 controller for one example. It handles a single DC motor and whatever microcontroller you use can set the speed and direction of the motor. I don't know exactly how many different speeds it allows, but it's at least several hundred.

    For monitoring voltage, current, etc., you'll need some kind of external analog to digital converter (ADC) and some signal conditioning circuitry depending on what you're trying to do. The Stamp can monitor battery voltage all by itself (with a few passive components ... look here under "app-notes"), but really does a better job with an ADC.

    "Multiple motor sequential control based on speed"? Huh?

    "Stamp system monitor more than one stamp in series, parallel, or even USB connection"? Huh? What Stamp system? The Stamp is the microcontroller. People have built clusters of them and there are some Nuts and Volts Columns (browse through this index) on networking them.

    This doesn't sound like a "small project" from what description you've given. Stamps are great for small and medium sized projects. For large projects, maybe multiple Stamps or even Propellers or several of them might be better.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-15 10:00
    The voltage and current ratings of the DC motors are important when you need to control motor speed. With DC motors, speed is commonly controlled through PWM (pulse width modulation) where the power is switched on and off rapidly and the average on time determines the motor speed. This technique maintains motor torque under load and is used for variable speed for both AC and DC motors in appliances and tools. The switches (transistors) used need to be chosen for the supply voltage and maximum current involved. If you're just turning motors on and off relatively slowly and/or reversing them, some relays will do, but they're not fast enough for PWM. Look at the HB-25 mentioned before.

    Plan for an external ADC, something like the MCP3208. Parallax sells it and there's plenty of sample code for its use. This can measure the battery voltage and, with a shunt resistor, can measure the motor current (by measuring the voltage across the resistor). The charge state of the batteries will have to be inferred from the voltage. This is a standard technique for estimating the charge state. Look in the Wikipedia and in battery manufacturer's websites for discussions of charge / discharge curves vs. terminal voltage.

    You will probably want to use high current latching relays to switch power from one battery to another and to reconfigure the motors as generators. You might be able to use solid-state relays / transistor switching for this depending on the specifics, but mechanical relays will be simpler. I mention latching relays since you're probably concerned about saving power and standard relays take power when on.

    If you haven't noticed so far, the Stamp (or other microcontroller) is a fairly minor part of this system. Most of the work involves the sensors and high-power controllers/switching needed. With relays (and their driver transistors), a couple of HB-25s, an MCP3208 and its input signal conditioning circuitry, a single Stamp should be able to handle the tasks.
Sign In or Register to comment.