Jump to content
43oh

abc

Members
  • Content Count

    93
  • Joined

  • Last visited

Reputation Activity

  1. Like
    abc got a reaction from freshfeesh in What is Energia from cpp perspective?   
    Hi,
     
    I am sorry if this has been answered elsewhere. 
     
    My understanding is that Energia is a combination of the following:
     
    1) an IDE 
     
    2) a run-time library (digitalWrite, Serial, etc.)
     
    4) a directory convention
     
    5) a simple preprocessor that 
        5.1. merges files that don't have an extension;
        5.2. adds #include statements (but apparently not all?)
     
    3) a very simple harness that goes like this and, I think, turns Energia from a library into a framework:
    int main(void) { init(); setup(); for (; { loop();   if (serialEventRun) serialEventRun(); } return 0; } 4) a coding convention which simplifies C++ programming (while allowing plain C++)
     
    5) a makefile that builds all that.
     
    Did I get that right? And if I did - is it possible to use Energia just as a a run-time library? I.e with my own main(). 
  2. Like
    abc reacted to rockets4kids in Making commercial electronics, self-financed - steps?   
    Of course there are houses that specialize in this work.  Needless to say you are going to have to pay for their experience, time, and test equipment.
     
    This is exactly why so many hobbyists just getting their feet wet with commercial products sell modules rather than complete products.
  3. Like
    abc reacted to veryalive in A buffer?   
    A very handy buffer IC, and often under utilized, is the CMOS 4050 (MC14050, CD4050, etc...     also in HC ).
    This is a cheap way to protect AND translate high voltages (up to 15v) down to the low voltages (+-3.6) tolerable by the MSP430.
     
     
    With this buffer, you can safely input digital signals into the MSP430 which have a HIGHER voltage than the MSP430 supply !
     
     
    Connect the 4050 supply voltage (Vdd) and ground (Vss) to the MSP430 supply & ground, and the 4050 buffer output(s) to the 430 input pin(s) ----  then 'external world' digital signals go to the respective 4050 inputs.
     
     
     
    Please refer to the 4050 - type datasheet and read it a few times and then get a few parts, they are very cheap.
  4. Like
    abc reacted to enl in A buffer?   
    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.
  5. Like
    abc reacted to jpitz31 in Embedded for a 10 year old?   
    I would rather go with conductive thread and other fabric based components before I would go the conductive paint/epoxy. As mentioned, pricey, high resistance, joining standard parts to existing materials.  Conductive thread, sneak your wife's sewing machine, get some cheap fabric and sew your parts on a fabric circuit board, I guess that would be an FCB.
     
    Check out Adafruit, they have lots of fabric based components.  
     
    Thanks
     
    Joe
  6. Like
    abc reacted to rockets4kids in Embedded for a 10 year old?   
    Ditto on enl's comments.
     
    There is a reason the only people touting it are the people selling it.
  7. Like
    abc reacted to enl in Embedded for a 10 year old?   
    not yet there other than special uses.
     
    Pricey, high resistance, not environmentally tolerant enough
  8. Like
    abc reacted to rockets4kids in Embedded for a 10 year old?   
    If you want to build a creature on the cheap, forget about the steppers and go with servos.  9 gram servos are three bucks a pop, they are dead simple to drive, provide absolute positioning, and only require one I/O pin each. 
  9. Like
    abc reacted to abecedarian in Embedded for a 10 year old?   
    You'd have to find something to fit that shaft, which I think is 5mm / 3/16" across the major axis, the rounded ends- not the flat sides, with a set screw or compression coupler to lock it down.
     
    There are bell-cranks and other things that may be useful, depending on what you're trying to accomplish.
     
    Hobby shops are often decent places to find things like that.
  10. Like
    abc reacted to abecedarian in Embedded for a 10 year old?   
    Arduino prototyping shield about $3.00
    ultrasonic distance module > $2.00
    16x2 parallel interface LCD > $3-4.00
    4 digit LED > $2.00
    ULN2003 stepper motor driver >= $0.99
    5v stepper motor > $1.75
    IR Remote + receiver > $2.00
    ...
    and so on
    ...
     
     
    In general things aren't too terribly expensive, but things do add up. Being able to re-use modules for other projects / learning experiences is helpful though.
     
    With the above, you're already at around $14 and the jumper wires, power supply and Arduino itself aren't listed. Considering an 'official' Arduino Uno R3 can be over $25, DuPont jumper wires can be > $1.50 for 40, male or female ended, and that first kit comes with two storage cases which would probably set you back a few dollars each, you are almost square with the cost of either kit, and still don't have the motor, servo, LEDs, transistors, resistors or capacitors, or any of the other fluff, and those aren't really that expensive either; just search eBay for "Arduino 'xyz'" where 'xyz' equals what you're looking for.
  11. Like
    abc reacted to abecedarian in Embedded for a 10 year old?   
    @@abc, If you're building a 'creature', I think the components in the first kit are more apropos, not to mention that first kit is only $1.00 more than the other. For instance, to buy the stepper motor and driver board would set you back a fair penny more than the dollar you save with the second, and you'd also get ultrasonic sensor, 9v wall wart, LED digits... and I believe a 16x2 LCD.
     
    The longer shipping time for the first is a bummer though, and if you want something not included you'll have to find them locally or wait for those to ship.
     
     
     
    Did you also notice that Scratch can interface with Arduino?
    http://s4a.cat/
    http://www.instructables.com/id/Scratching-with-Arduino/
     
     
     
     
    *OT side note: Many of the devices for Arduino can be interfaced to LaunchPads, but it's good to always remember the LP's are 3.3v devices so any Shields you try to connect to may require additional considerations for power sourcing and analog / digital logic interfacing. Also, some of the sketches may involve things specific to the Arduino processors which could require sometimes difficult rewriting in order to work within Energia.
  12. Like
    abc reacted to enl in Embedded for a 10 year old?   
    @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.
  13. Like
    abc got a reaction from al1fch in Embedded for a 10 year old?   
    Raspberry PI sounds like a great option, but got to stick to the budget. And the budget is tiny.
     
    On the last Mini Maker fair, I saw a Raspberry PI-looking computer that they said was purchased in Oregon for $10, case included. Any idea what that was? 
     
    Also, I've heard there was some sort of a giveaway very recently, or something that was described as "Raspberry PI on steroids"? Is that still around? 
     
     
    Thank you everyone and I hope this thread is not too OT!
  14. Like
    abc reacted to rockets4kids in Making commercial electronics, self-financed - steps?   
    The first thing you are going to need to qualify is whether you are intenting to sell a component or a finished product.  If you are selling a component you (generally) do not need to worry about FCC approval.  If you are selling a product, you do.  This makes a world of difference in your overall costs.
  15. Like
    abc reacted to spirilis in Code Composer Studio v6 beta: "InsertFileNameHere does not contain frame information   
    I'm not too sure who could help you with that here, but the E2E forum for CCS is a better place to ask (and/or report it as a bug)- http://e2e.ti.com/support/development_tools/code_composer_studio/default.aspx
  16. Like
    abc reacted to enl in MSP430 and Java?   
    Java has its place.
     
    The places the MSP430 is used wouldn't be it.
     
    Java is a pretty heavyweight language designed for portability and object security, which is really nice in a network delivery, dynamic load situation. Burdensome for a firmware, low RAM situation.
     
    It is impractical to fit JVM into the constraints of the MSP430.  Performance would be abominable if it could be done. Most of the benefits of Java would be lost (good dynamic memory management; robust suite of classes; etc) due to the memory limitations and need for an efficient filesystem.
     
     
    Not to say Java couldn't be used for development... But it would need to be followed by translation to C or C++ for practicality. In a PROM-based, limited RAM, environment, a language that doesn't involve dynamic loading and large  objects as basic presumptions is a necessity. I would estimate that, as a dead bare minimum, a JVM that can run practical software would need a minimum of several hundred K of RAM, a filesystem of maybe 16Meg, and a clock in the 100MHz range. And it would not be real time capable which is what a microcontroller is really for) or very fast at that.
     
     
    I teach Java (among other things) and have many good things to say about it. Small is not one of them. Nor is fast (though it is a lot better today than V1.0). When Building software that needs to manage millions of data, especially non-trivial data, it is a nice language. Not for the things the MSP430 is typically used for.
     
    All of that said, I have been doing more and more with Python the last few years. There is a hope of building Python for the MSP430, but it will still take some compromises.
  17. Like
    abc reacted to RobLewis in MSP430 and Java?   
    I've dabbled in a lot of languages, but never made it to C or C++. Now, in the course of helping my son pursue a CS degree, I find myself learning Java. 
     
    What, if any, are the options for programming the TI LaunchPads in Java? Opinions? (other than the expected "Java sux" :-(
  18. Like
    abc reacted to pabigot in MSP430 vs Silicon Labs efm32   
    Again, most of these concerns need to be answered in context. For the reliability ones, if you're installing into extreme conditions, they're going to matter. If the product sits on a table in a residence, they probably don't.
     
    For bugs, as long as you're not working with early stage experimental silicon, it's unlikely you'll come across any that are unknown or don't have reasonable workarounds. When you read the errata list for an MCU, make sure you understand the conditions under which the problem can arise: some of them sound pretty horrible, but in the real world just aren't going to be relevant.
  19. Like
    abc reacted to pabigot in How slow can MSP430 run?   
    Probably as slow as you can find a clock to feed it. Without hardware modifications, selecting VLOCLK as the source for MCLK would put it about 10kHz. Haven't tried that personally.
     
    It's not likely to be useful, though. The slower it runs, the longer it takes to do the work. The optimum speed for least power for a given task is almost certainly not going to be the slowest speed, even if that produces the lowest-power per unit time. You'd have to calculate based on duty cycles, durations of tasks, and a bunch of other application-specific information.
  20. Like
    abc reacted to cde in Reversing the LED? i.e. sinking it to MCU?   
    Simply put, you can drive (sink) two leds at 20mA each, from a single port, with a few 0.1Vs raise on Ground, on that port. 40mA cause too much of a drop/raise for 2 leds with a forward voltage drop of 3.3V or higher. That means as the Ground rises from 0.0v to 0.3v, the voltage potential decreases, and the leds will take less current until they finally won't light.
     
    As for anything else on that port, depending on how much the voltage changes, it can interfere, but probably won't. A 3.3V Uart has  0.7V~1V as the highest that a Logic Low is registered, and 1.3V~1.7V as the minimum to register a Logic High. If you draw enough current for that to happen, you have other issues.
     
    But it won't hurt anything to test it out.
  21. Like
    abc reacted to rockets4kids in Reversing the LED? i.e. sinking it to MCU?   
    At this point it is worth noting that the forward voltage drop of blue (and phosphor-colored LEDs driven by blue or UV elements) is typically close to that of the operating voltage of the msp430.  When you factor in the voltage droop of loaded MSP430 pins, you'll get some some degree of current limiting even when connecting one of these LEDs without a resistor.
     
    But again, just because this works (and you may find other people doing it) doesn't mean you should do it unless you fully understand what is going on.
  22. Like
    abc reacted to enl in Reversing the LED? i.e. sinking it to MCU?   
    See SLAS735 (MSP430G2X53 datasheet, or other device datasheets) for the graphs. SLAS735G, fig 6-9, "Typical characteristics, Outputs" shows the curent vs output potential vs supply potential.
     
    The MSP430 devices are pretty much symmetric with respect to sourcing and sinking. Driving at too high a current may not *immediately* damage an output, but driving an LED without a limiting resistor (or current limiting driver) will likely either smoke the LED or damage the I/O in the microcontroller eventually. The damage may not happen immediately, but the drive transistor will be dissipating power due to the potential drop, and will fail sooner or later due to the cumulative effect of the heat. A good rule is no more load than keeps you within the safe spec for logic signals, which is about 12mA at 3V for the MSP430G series. Half that is better. Many LEDs will fail very quickly even with fairly small overcurrent.
     
    Remember, the I-V curve for an LED, like any diode, is substantially exponential. Small increase in potential, large increase in current.
     
    Driving individual LEDs isn't a big deal these days. At 4mA (the drive current for the red LED on the launchpad), modern high efficiency devices are as bright as or brighter than the 20mA devices 20 years ago. Not lighting bright, but display and indicator bright, even outdoors during the day. Blinding in a poorly lit room.
     
    Any more current than this, it is best to use an external driver (NPN transistor to ground with limit resistor; current limiting LED driver IC; etc). When driving multiple LEDs from an output (multiplex display, etc) you pretty much need to use external drivers, as, even when PWM'd to low *average* current, the instantaneous current will be an issue.
     
    Also note that overloading the GPIO pins, for example with an LED, may effect UART by dropping the internal power bus or raising the internal ground bus: the UART output won't go full supply range. If all you are doing is lighting LEDs, not a big deal until the core can't run anymore (3V supply, that can be as low as 35 to 40mA total, depending on the temperature)
  23. Like
    abc reacted to rockets4kids in Reversing the LED? i.e. sinking it to MCU?   
    In the olden days -- long, long ago -- the final drive circuitry for many logic parts could source more current than it could sink.  In most cases with modern parts this is no longer the case.
     
    You can always find specifications in the datasheet.  If you cannot find them, you are looking in the wrong datasheet.  Always be careful when only a single value is specified -- pay attention to what that number means!  In some cases, that is the limit to what the chip can take without damage.  In others, it is the limit to which it can maintain the proper output voltage levels.
     
    For some parts (such as the msp430) you will not find per-pin limits.  When this is as case, you will find a graph that shows the output voltage with respect to current.  Pay particular attention to how little current the msp430 parts can source/sink before the voltage levels change.  While the msp430 can only supply about 6 mA per pin and maintain proper logic level voltages (depending on operating voltage) it does seem as if it is safe to drive parts such as LEDs at higher currents when you aren't concerned about output voltage.  That is to say you won't damage your msp430 pin by driving an LED at 20 mA.  However, just because you can do this without damaging the pin doesn't mean you should design a circuit this way.
     
    Finally, be sure to pay attention to the *total* amount of current the chip can supply to all pins.  It is often *much* less than the total current per pin multiplied by the number of pins.
  24. Like
    abc reacted to grahamf72 in Turning MSP430 into an amperemeter - possible?   
    If you remove the jumpers, then put a current meter across where the Vcc jumper goes you can measure the consumption of just the mcu and any connected loads such as LEDs etc. 
     
    Sent from my iPad using Tapatalk
  25. Like
    abc reacted to spirilis in Reversing the LED? i.e. sinking it to MCU?   
    I would never suggest leaving out the resistor. It pretty much means diddly squat for other stuff like UART signals (which are CMOS-to-CMOS connections, i.e. all that's being "driven" during a signal transition is a tiny amount of current to flip the ~5pF worth of gate capacitance in the receiver side's schmitt trigger).
     
    I do think there's some merit here in sinking vs sourcing though. Sinking is done by an N-channel MOSFET which tend to have smaller resistances IIRC.
×
×
  • Create New...