
enl
-
Content Count
346 -
Joined
-
Last visited
-
Days Won
22
Posts posted by enl
-
-
What pin are you using for the PWM output? Is the timer you are using configured to modulate that pin?
Also, what OUTMOD do you want? The sample used 3 (for S-R behaviour) Do you want 7?
-
Any pin you want to use that is not already in use will work if you don't use interrupts. If you do use interrupts, then the pin must support that, which should include the unused P1 pins.
If you don't need the start-stop function, you could re purpose the existing buttons for increase forward/decrease reverse and increase reverse/decrease forward. If you need to keep the existing function, add two more. In and case, with the run forward and run reverse as it is, I would put in code to protect from changing direction while the motor is running, including a delay to insure that the motor is stopped before restart.
-
@mfpek: Could you please give a bit more detail? What do ou mean 'control it with buttons'? With a microcontroller? If so, MSP430 or a different one? No microcontroller? I don't think anyone can really provide an answer without more information.
Is this for a school assignment? (if so, it is good practice tosay so and to tell us what school/course/level) Also, is English not your primary language? Again, that is something worth mentioning before you get the 'sounds like homework, ask your teacher' response.
-
I can address #4:the 39ohm R and 0.01uF cap form a snubber and are needed to prevent damage to the triac. They do not pass enough current to worry about in mot cases, but very small loads may have an issue, similar to when a CFL is controlled by a lighted switch, and the bleedthrough causes it to flash on every few seconds when the switch is off.
On item 1: many components have electrically hot heatsink connections in some circumstances-- for example the heatsink tab for most BJT devices is connected to the collector, and on a linear amp may be 100V or more to ground, and not isolated electrically from the heatsink, as isolators are significant thermal resistance. They need to be protected from contact with screening, inside a case, etc. like any other electrically hot component. In this case, item 2 can be significant, in that a keyed connector can be used to insure that the HS is on the neutral (grounded) leg, though this isn't real reliable as there are plenty of places to mess up the keying. Most reliable method, and method used if the item is to pass testing for any listing agency, is to insure that all hot parts can not be reached from outside.
-
Just finished watching WKRP turkey drop episode.
Happy Thanksgiving
- abecedarian and spirilis
-
2
-
Pusle width of pulses in pulse train? That doesn't sound analog to me, either.
So, in the interest of getting a meaningful answer, please clarify what the input signal is and what you want to know about it.
Is it analog? Digital?
Do you want frequency? Pulse width of individul pulses? Period of the periodic signal?
Addressing a couple options:
I believe Pulsein() will get the width of a digital pulse (I think it is the '1' state time), and is the appropriate tool if that is what you want. This would be appropriate when you are decoding a PWM signal.
You can also measure the period (time from rising edge to the next rising edge), though I don't know how in Energia. This can be used to derive the frequency. For example, if the period is 32microseconds, the frequency is 1/0.000032 = 31250Hz. The timing precision can be a real issue measuring single cycles/pulses.
You can also measure frequency directly but counting pulses (rising edges) for a fixed time. The simplest case is count for 1sec. Counting for a shorter time is obviousl faster, but reduces precision.
If the signal is analog, you need to tell us more about the signal and what you are trying to do.
-
More info needed to address this...
What rate are you looking for? What are you using as ADC clock? What other modules are in use (do you have a free timer, for example)? Do you really need periodic sampling, or will demand sampling do?
-
Well, simple, but not very useful, answer is fastest conversion the unit can do is a bit over 2uSec, for a bit fewer than 500000 conversions per sec, giving a max frequency that can be properly sampled of about 250Khz (Nyquist limit).
This is presuming that max allowable ADC clock rate of 6.3MHz and a way to store samples at this rate.
If you are using the internal ADC clock, the clock is not a precision device, allowing for significant variation with power supply voltage, temp, and manufacturing. This means we should really look at the max that is guarenteed achievable, which would be the lowest rate, or about 6uSec/sample, for about 170000 sampes/sec, and a max frequenc to be sampled of about 80Khz, again, presuming that you have a way to store and process the samples.
In reality, with all of the other issues involved, I would say audio (20KHz) is the practical high end.
Remember, there isn't a lot of RAM on these devices (512 bytes), so you won't be able to store very many samples before you run out. Maybe 200, maybe fewer, given that some of the RAM is needed for other things (variables, stack, etc). If the data is being shipped rght off device, there is no practical limit, as you can ship it out faster than you can read it at top processor speed.
See SLAS735J, P39 for timing of ADC
-
And low enough power to fit the suit...
-
-
Nice. Simple and effective.
-
You enable P1 interrupts for bit2. Do you have an interrupt handler for this? I do not see one in your code.
-
-
Not really new policy. It has come and go several times in the last few years. About a year ago, I requested samples and used my yahoo account for convinience, and it was rejected. hat is the same account I have used for years, and is registered with TI and National, but..... Resubmit with work email, no problem.
-
I have used the G series UART at higher baud rates with no problem. Since you are not communicating to the PC via USB bridge, REMOVE the jumpers. Next, to talk MIDI, you will need whatever level shift and isolation hardware are required (I don't recall the details. I has been a long time). If you have a scope, you should be able to monitor the com that way. You can also loop-back while monitoring to confirm that you are on the right track. I presume you are using the default energia system clock setup, so 31250 is well within the zone for a good divisor on the UART clock (16MHz nominal clock divisor is 512--2^9-- without need for dither). Be careful about drift, as the processor clock is only within a few percent. Worst case (temp drift and inherent stability) can be well over 3%.
-
I have not used the low temp molding plastics like polymorph, but have read good reviews and know a few people that love them, despite the price.
I have, in the distant past, used castable resins-- epoxy, acrylic, and polyesther-- and not had issues. I have not used the low heat-softening materials. I am not sure I would want a 10yr old using a material that needs to be worked at 60C or higher (references I have seen say 80 to 90 is better.... see sparkfun site, for example), but it does depend on the 10yr old. I cooked my own dinner, soldered, cast lead, used a grinder, etc at about that age.
I will note that is also a pretty low temp limit for anything that needs to maintain strength and shape. Not a very high temp around electronics.
Hot glue as glue is a different beast, as there is minimum risk of skin damage if touched, and a small heat load. Most are pretty soft, flexible, and not very strong. They tend to be optimized for melt temp and adhesion. Strength in bulk not so much. If it is going to be worked to shape, same concerns about temp and burns working with it.
If casting is a possibility, I would go with a standard castable. Not reusable, but permanent. Gotta be sure to use a true castable, tho, as there is a difference between these and the resins intended for fibreglas or other coating purposes once you are filling a large volume. I used to make patterns from wood and plasicene, one shot molds from plaster of paris. Today, I would probably paint the resin on to make the mold, then cut it apart, coat the inside with release for a one shot. For duplicate parts, use two part silicone designed for the purpose. Caulk in a tube is NOT a substitute. It will NOT work (yes, I found out the hard way in the days before the web. I was involved in several threads on rec.arts.fine about this back in the day)
For most things these days, when I am nor running it in ABS on the printer at work or machining/welding in metal, I use styrene or ABS. Available in sheet and rod in various dimension from both hobby suppliers and industrial suppliers 9McMaster and MSC, for example) pretty cheap. Easy to cut and work with hand tools, joins with cement or heat weld (harbour freight welder isn't bad. I friction weld using a rod of similar material in a die grinder or dremel. A temp controlled soldering iron may work, but I have never tried) ABS is what legos are made of. Most kids toys, and many other 'plastic' products are ABS or straight styrene. Good source of material. Amazes my students, and coworkers, sometimes, when I weld lego pieces to kids toys and make something in 5 min they have struggled weeks to do.
-
Depending what you are doing with the UART, it may not matter if you can trim the DCO to match a crystal. You CAN change the UART timer to match, as long as the bit rate isn't high enough that you are running fewer than about 50 DCO clocks per bit (for approx 2% adjustment per UART timer step) and you can do better than that with the clock dithering feature as long as the UART rate is lower than about 8 DCO clocks.
-
Servos have the circuitry internally. No spark issues unless you are in a flamable atmosphere. generally no elecrronic noise issues, either.
Typically, you want a separate (5 to 6 volt) supply for the servos due to the high current draw, as well as the issue with 3.3V controllers that most servos need at least 4.5V to operate reliably at all. Little noise is fed back via the control (PWM) input, and I have never had a problem. Most, but not all, are fine with a 3V control input, even with 5V power. Do check that your choice of servo isn't pulling the PWM input high to its power supply voltage though. That can damage a 3.3V microcontroller if isolation isn't used.
-
buffers are used for protection even by the pro's to protect the expensive parts.
Key words are: the expensive parts. Expensive in direct cost, or in down time and repair.
If you are using the Gseries LP, the buffer costs almost as much as the microcontroller (between the IC, board space, etc), and limits you to only digital I/O, as well as requiring extra work to set up the buffer for input or output as needed, which costs time, complexity, and probably I/O pins.
With most microcontrollers, most or all pins serve more than one potential purpose, such as digital I/O, A/D input, PWM output, and edge trigger digital input. In many designs, they same pin mightserve morethan one purpose at different times. For a system designed for beginners/prototyping, each pin must beable to serve all of its design purposes. This pretty much prohibits designing buffers/isolaters in. When I can buy a dozen 430s for under $1.50 each, the board space and extra component cost for buffers just isn't worth it in general.
There is no way to protect a newbie from all mistakes. Or an experienced designer, for that matter. They occur. The best you can do is pick methods based on the applicaion to minimize the risk of damage due to abnormal events that you can anticipate, such as reversing a connector (back in the days of RS232 that was part of the spec), putting a connector on wrong (a concern with unkeyed headers), ground faults, and the like.
In a design for motor control, Itend to use driver ICs where I can, and isolation resistors as well. With direct drive to a transistor, ALWAYS use resistors to limit current and diodes to shunt flyback/back EMF. For digital lines used only for a single purpose, buffers are a good idea, but you still need to be sure nofault will occur during startup or reset.
Connector configuration is an art. Many comon specs are not very good, such as the spec for model servo connectors (keying is optional) where damage can occurif the connector is reversed. Power connectors and combined power/I/O connectors are even more critical. Back in the day, it was common to find discount cables for floppy drives and hard drives without the key plug, or connectors without the removed key pin. Put the cable on backwards, or one pin off, and damage was certain, due to the pin layout. Some connectors (the 20 pin HD data line used prior to IDE, for example) were not keyed at all, and very pricey damage was not unusual.
General rules for connectors are to make best effort to use symmetry to prevent damage from reversal, and to try to prevent damage from one-pin-over if that is possible. I generally put groud at the outside, symmertically, and, if there is power, do the same, so reversal isn't an issue there. I try, when I can, to keep signal lines symmetric for reversal as well. Input to input, output to output.
Better yet, use keyed connectors, like a D-type, or a keyed header. Not always possible. The launchpad, for example, is unkeyed. The most annoying feature of the Arduino (the half-space header) has the positive effect of keying the connector, IF all pins are present. Many boards don't include unused pins (like the analog ones if no analog inputs) and can be forced in the wrong way.
What you are asking in your last line is, unfortunately, not something that can be generally done. Back in the day when low power was watts, a fuse or lightbulb, or other device was the answer. Today, when milli or microwats can cause damage, there isn't a lot to do. Fortunately, the MSP430 devices are pretty tolerant of many common failures. The outputs will drive a short to ground or power with little risk of damage. Sligh overvoltage on an input is generally ok. Many other devives (PIC, for example) are a lot less tolerant, and in an educational environment, tend to be replaced often due to student mistakes.
-
not yet there other than special uses.
Pricey, high resistance, not environmentally tolerant enough
- abecedarian and abc
-
2
-
Depends what is connected to it. If it is a LP, I have no idea how you burned one out short of a direct short circuit to the USB port lines. I have used at least one LP as a fuse, due to screwing up power supply grounding (no isolation transformer when I needed one) but otherwise....
One thing that can help in the case of ground loops or power-to-ground faulting, which can happen with external power supplies, is to either use a laptop with on batterie, or, better, have the computer and the supply for whatever else you are using both on DIFFERENT ground fault interrupters, so that a fault will cause one of them to trip. That is what saved my computer and allowed, eventually, the LP to act as a fuse. The MSP430 was fine. Lost a trace at the interface betweent he programmer side andthe MSP430 side on a 430G LP (V5)
-
Working doing welding instruction in bordentown saturday. Won't make it. Have a couple friends and former students with booths so am bummed. Same problem (but different place) last year.
-
@abc: Short answer on steppers: They take high current
Long answer: Because stepper motors can provide significant torque at moderate to high speed, they need a higher power than the output pins of most microcontrollers can provide. This equates to higher current. The simplest interface, for small, low power steppers, is a single bipolar junction transistor, like a 2n3904, with a resistor and diode for current limit and inductive kickback protection. It is actually cheaper and easier to use an IC designed for the purpose, with all of the needed features built in, such as the ULN2003, with 7 high gain channels, built in diodes for protection, and the ability to isolate the controller from the load pretty well, even if the load uses higher supply voltage. Easiest way to implement this is on a shield.
-
Power consumption is roughly proportional to clock speed when active. The 32KHz crystal takes less than 1uA (see LPM3 power with LFXT1 Aclock, p23 in SLAS735J MSP430G2X53) itself, so the principal active power will be based on what you are doing, clock speed, and supply voltage.
Whether you use the 32KHz clock as Mclock or use the DCO, or use..... doesn't make a lot of difference to the average power, if the device sleeps in LPM3 when not doing something. Average power will be about the same. The DCO and internal oscillator take a little power, but still quite low. If ou need speed when active, use them. If not, a little saving comes from not poering them up, which could be significant over 5 years, maybe. Also, not using them will lower the PEAK power, which can matter for some supplies that are real tight on current.
As to whether you need to abandon Energia, I can't say. I don't know enough about the underlying framework or yuor problem to answer.I would suspect it will make your life easier, at leat, if you need fairly precise timekeeping.
Low power Geiger counter with MSP430G2553 (Last updated: May 07, 2015)
in Projects
Posted
Use long int (or long unsigned) and use `ld' (lowercase ell d )instead of `d' in the format string for sprintf. `d' is standart int. `ld' is long int.
The only info sprintf has about the type is from the format string, so if you spec standard int, whatever the param is, even if it is a long, will be interpreted as a standard int.