Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by enl

  1. The main reason I make things myself is like @@Fred I just enjoy doing it.  Regarding the CNC mill, I guess I should find another reason besides PCB manufacture to justify it.  I think it would be fun to design and make a clock with wooden gears.  That sounds like good justification :-)

    I highly recommend it, if you can justify the cost. It isn't worth cheaping out. I use mine for a variety of things including fitted tool trays (need models for micrometer or planer gauge trays?), machine parts, dinguses for my teaching job, and a slew of other things, including a couple PC boards. It hasn't paid itself off yet in paying work, and I don't think it ever will, for me. I put the money aside over time because I wanted the tool.


    The learning curve wasn't too bad for me, as I have machining experience and CAD experience, though not much CNC prior to buying the mill. A wooden clock would be a dandy way to learn the basics of CNC and break in a small machine.

  2. It's been a rare incident when I've needed a quick prototype PCB "that" quickly.... and mostly for quick Christmas gifts 1 week before ;-)

    Since the advent of inexpensive one-offs, same for me. But once in a while it is handy to have the capability, especially to prototype a part of a design quickly so the correct design can be sent out in the first place. The main use I have for in-house is in conjunction with me teaching hat. Students mess up a lot, and the rapid turnaround lets them mess up fast and fix it fast.

  3. Today, price for fabricated PCB's from China is so low that I don't see any reason for messing with CNC.


    Main reason for messing with CNC is no wait. Photo-resist etching, same thing. The drawbacks to both of these is the mess and the limitation to double-sided boards and no through plating.


    Sourcing from a commercial shop in China is days to weeks, depending on quantity, complexity, destination, and holidays.


    Quality of a commercially made board is likely to be higher, and generally has the bells and whistles of solder mask and screenprinting, but when you need it tomorrow, or today, you sometimes even go as far a sharpie and that sludgie bottle of Ferric Chloride that has been sitting in the cabinet since 1987. This is why I miss my pen plotter. Draw the board. Etch the board. Back in the plotter with a fine point to label the board. Assemble.

  4. I recently (within the last year) got rid of several of my templates, including flow chart and logic symbols, because with the youngest of them being 30+ years old, the plastic was starting to get `that smell', as it degraded. You all know the smell.somewhere between stale cheese and decaying animal,along with the white crust on the surface. I can't remember the source of the flowchart template (IBM? Digital? Data General? One of the big ones), but the logic symbol were the green TI and the blue National. I remember getting them at a recruiting fair in the early '80s.

  5. Two wire: rheostat (variable resistor), not a potentiometer. You will need an external resistor to make up a voltage divider. I would suggest uing one that i approximately equal to the full range resistance of the sensor.


    I can outline the code as:


    Read sensor using ADC

    If reading is less than threshold, do whatever you need it to do


    Not a complicated structure.



    A starting point for the ADC is http://www.ti.com/lit/ml/slap115/slap115.pdf and http://coder-tronics.com/msp430-adc-tutorial/


    There are a lot of others, including a number of university sites (BYU, Cornell) that have archived information.

  6. First thing would be more detail on the sensor and more detail about what you are trying to do. What do you mean 'control GSM and LCD according to' the sensor? Are you trying to display a fuel level? Are you trying to send an alarm message?


    To get you started, I'm going to guess the sensor is resistive with float, as they are quite common, or potentiometer with float, but there are other options. If it is, then the easiest way to read it is set up a voltage divider, one end to ground, the other to your processor supply, and the wiper to one of the analog capable inputs, and read the analog value using the ADC. The sample for reading the internal temperature of the MSP430 (see the LP documentation) is a good starting point for using the ADC, and there are a number of examples here in the archives, as well as lots of examples in the TI lit and around the web.

  7. 2) I don't see a connection to power the ULN2003. It just might work barely through unintended back-powering through the logic pin. (Which also might have saved your LED so far.

    The ULN2003 doesn't require power. It is darlingtons with flyback diodes


    The ULN is on one side of the breadboard, not spanning the gap in the breadboard, so pins 1/16, 2/15, 3/14 and so on are bridged.

    Whoops. I didn't notice that. If built like as shown, I concur that is another problem. I have grown used to not paying attention to the position on the board in this style of diagram, as they so often do not reflect the actual construction.

  8. Presuming the diagram you attache is correct, you have the LED connected to ground. As the ULN2003 switches the other lead to ground, the LE will not light. You need the anode to f the LED attached to the 3V rail, and a current limit resistor in series with it (maybe 100ohms)


    Again, the outputs switch to ground, not positive supply.

  9. You will find a lot of projects on this forum, a few mine, many other peoples. I don't keep a heavy online presence, and many of my projects are either done because they need to be done NOW, so I don't really get around to posting anywhere, or, in a few cases, are client work.


    You'll see a few projects, including one of mine, at http://forum.43oh.com/topic/4511-ended-oct-2013-43oh-halloween-contest/?hl=halloween


    Another of mine (still on first set of AA after 3 years and as close to dead on time as it started, showing low power) is http://forum.43oh.com/topic/4068-year-clock/  Note that this isn't really possible with an arduino, due to the low power requirement. This wasn't a ton of code (and the code isn't real pretty...) so memory wasn't an issue. I might have actually used a 2452 rather than 2553. I'd have to pull it off the wall and use a mirror to look.

  10. There are a number of Arduinos available with various capabilities, speeds, and memory capacities.


    The 2553 is comparable to the UNO in many respects, with max clock speed of the '2553 matching the UNO, but without the need for the crystal, but half the RAM and half the program memory, and comparable I/O capability.


    Advantages to the '2553 include lower power and fewer support components required than the ATmega, making it easier to use in your own system without the commercial board.


    The arduino boards have a broad base of daughterboards relative to the launchpads, but if building your own boards, there are advantages to the '2553.


    That said, I have used a good number of 2553's, and a couple of other low end MSP430's, in projects ranging from simple to moderately complex, without running into any issues that an arduino would have resolved other than a couple cases where the extra memory would have been handy.

  11. Has anyone used the LDC1612 or LDC1614? I am looking for input, as it looks like it might be what I want for a load cell application with an MSP430G talking to it. The price is right for non-contact sensing, and the specs look good, but not sure if it will do it in the field, so I figured I'd ask for input before diving in.

  12. Shouldn't need to constantly adjust. Unless you expect major changes in operating conditions (supply voltage, temperature) during operation, you should only need to check the calibration at startup. Stability of the oscillator is sufficient for the serial clock if conditions don't change.


    You can do both serial and BPM with the DCO, but I would use the crystal for BPM (using a TimerA) and DCO for serial, myself. A couple percent variation is OK for serial if the DCO drifts a little, and the crystal is much, much more than fine for the BPM, and much more stable.

  13. Your error calc isn't correct. At 676,46 counts nominal and 676 counts actual, the error is at most half of (1/676)*100, which is 0,0014*100, or 0,14%, for a max error of 0,07% (this matches your calculation). At 121,2bpm, the error will be much less, as the actual rate with a count of 676 is 121,18. You will have a 0,1% worst case error at a freq of roughly 180bpm. At your 121bpm range, you have an accuracy of approximately +/-0.1bpm.


    If you need more accurate than this, you can jitter the count in a manner analogous to the way the DCO clock and the clock divider for the serial module do. In fact, if it was me (which it is not) I probably would. I would have the timer interrupt at count, and reset the terminal count in the interrupt handler. Each time, rotate a 16 bit word with the appropriate bits set for the nearest 1/16th of a count. Mask the low order bit and add that to the count so when there is a '0' to the low order bit, the count is the for higher BPM, when a '1' it is a cycle longer for the lower exact BPM. This will get your error to less than 0,01% (100ppm) for all rates up to approximately 1000BPM. The max error will be less than one half period of the highest audible tone (ok, a bit more than 1/2 period if the listener happens to be a newborn, or a cat, or a dog). This is probably sufficient for most music applications.


  14. This device will not directly drive a high freq crystal, but there are a number of options as an external source can be used for internal timing:


    a) Use an external oscillator or clock generator module. Benefit: a programmable module will give you exactly the frequency you want (within error limit) Drawback: additional components


    B) calibrate the SCO to the 32KHz crystal. This will remain stable for a reasonable time, and the recalibration can be done periodically if needed. The DCO is rated at about 6% over the operating range of the device, but is quite stable over moderate term as long as temp and power supply are also fairly stable. In many cases, the calibration is more than stable enough for long term use.


    c) Use the 32KHz clock for the beat timing, and use the DCO for serial, deriving the serial parameters by comparison against the crystal.


    d) if you can count on the other device to talk first, use the crystal for beat timing, use the DCO for serial timing, and sync the serial to the other devices bitrate. This only works if you know you can count on the timing from the other end and you can force the other device to transmit first. I don't recall if the 2553 supports this in hardware, but it is pretty easy to set up in software.




    Of these, I would probably use © as a low cost, easy choice. The serial clock can be tuned quite tightly (fraction of a clock cycle), and the calibration is pretty straightforward in software. I think one or another of the application notes deals with this, but if not, and you need a hand on this, many people here can outline methods.


    That said, I have used the factory calibration values for the DCO with good success for serial timing. 8-bit serial needs stability of approx 3% to avoid losing bit frame registration (3% in opposing directions at opposite ends of a link is 6% total, which is about where the last bit frame will be out of timing bounds), which is reasonable for the DCO over most of the qualified operating range, though it is risky.

  15. I think I understand, but why don't they keep it at the same pins (software wise)so it's pin compatible? Just du make sure that the user is always aware that he is using hardware UART or software UART?


    No idea why the pins are swapped. If I were to make a guess, the G series software came before the hardware UART, and the way the hardware modules worked out ended up with exchanging the pins. I doubt it has anything to do with making sure the user knows what they are working with. More likely it has to do with parallel development between the software side and hardware side, and the use of standard macro cells and compatibility with previous devices for port assignment and hardware blocks, but that is only a guess.

  16. The dedicated hardware pins, on the processors that have a hardware UART, such as the 2553, are swapped from the pins used by the software serial on the non-hardware UART devices. One position is for use with hardware UART *or* software serial that uses the same Tx and Rx as the hardware UART. The other position is for  use with the TI software serial Tx and Rx.


    Why are they different? I don't know.

  17. My first thought would be to agree about the use of volatile. External variables should be treated as volatile by default, but not all compilers do.


    My next thought would be that a reset is being done before you are looking at the values. Can you watch the vlue during operation?

  18. What he said about soldering the crystal. I would also suggest using paste rather than wire solder form. Then you can hold the component down with a dental pick or a toothpick while heating with your iron. This reduces the risk of moving it, as tape won't hold it against a twitch with the iron tip.


    I would not use a different crystal if you want reliable operation. Well, ok, maybe I would, but I don't recommend it unless you have all of the data for the crystal you use. Don't forget that the board and lead capacitance was designed into the LP for the supplied crystal, and you will need to compensate either with the internal programmed cap selection or using external caps.


    Outdoor enclosures were discussed a number of months ago, but I would summarize with-- Unless you pot it solid in waterproofing compound, moisture WILL get in. You need a way for it to get out. Other than that, anything from a fancy custom box to a blue plastic project box should work. The cast aluminum outdoor outlet boxes are a nice size and have standard covers available. Better designs are those like used for optical fibre internet connections. The covers aren't gasketed, but the opening on the face of the box has full guttering like a well designed car door. The boards are mounted vertically, and they are well vented on the bottom, as well. If you don't believe moisture will get in, I will note the outdoor lighting I replaced a few years ago at one job. Weathertight boxes, with gaskets and all. Standard fare in the US. Pulled the cover plate off and there was 4 or 5mm of standing water in the bottom of the box due to the lip around the edge. The gasket was saturated as well. Reason the light failed was that one of the connections was pushed all the way down tot he bottom and was in the water. The other wire nut was oriented open up (wire ends pointing down) and was also full of water. Corrosion did things in.

  19. For your application, I'd definitely agree to go with non-latching. Latching relays are the cats meow for cases where the time between switching is relatively long and persistent  state is needed without power, such as power fail tolerance or very low power battery operations. This is why they are seen in thermostats, where low power is key, but not in motor controls, where you want it to drop to the off state on power loss, so the motor doesn't start right up when power is restored.

  20. Better than my first experience with the 0603 by hand. To the extent that I do anything this size by hand (not much as I am too shakey and my eyes are shot), I use a solder paste rather than wire. Holds the component in place, easier to get the appropriate quantity, and leaves my other hand free to hold the component down with a dental pick so I don't displace it. I would definitely suggest getting several small tips, both points and chisel end.


    If you want to experiment with tip shape, file an old tip to the shape you want to try. It won't last too long once filed, as the core alloy-- usually copper based-- will erode from heat driven oxidation and flux action, but it is a good way to try different point geometries before buying new tips.

  21. Depending on the application, you might try a latching relay instead.


    In a low power ap, you can't beat them, but there are a few drawbacks, such as they do not drop out on power loss like a standard relay. Even in a non-low power ap, not needing to power the coil continuously is a nice feature. If you haven't seen a latching relay, among other places you see them is in electronic thermostats.

  22. Q4 is going to see greater than 20Vgs, and may fail. Generally not a lot of leeway in these ratings. I wouldn't even count on a long life if you are running at just below 20V, as even small transients beyond 20V can damage the FET.


    As for the two BJT's, I don't see any particular issue with Q2 until the gate of Q4 fails, as there shouldn't be dissipation greater than about 225mW while switching for Q2 at 30V supply (15mA*15V), and a few mW when full on. That shouldn't be sufficient to lead to heating issues. Once the gate fails for Q4, though, there is indeterminate current limiting for the collector of Q2, and likely Q2 will fail.


    I would also put a 100K to ground from the base, though, to prevent leakage from turning it on, as the LED in the base line keeps the output pin from pulling it hard off.


    I can say nothing about Q1 failing without knowing the diode you used. What is its reverse breakdown?



    Once you are switching a load, things get more involved, as the dissipation in Q1 can be significant, especially if Ib is deficient. You need about 10mA Ib to hold the transistor in saturation at 200mA Ic, and I don't think you will have that here, which means you may end up with significant dissipation under load, if you are running at 200mA. You may also have dissipation issues with Q4 under load, but I am too lazy to look up the full data sheet right now. Things may be OK-- unless there is a major issue looking at the data sheet, I would go with this as a start for 100 to 200mA-- but I wouldn't put a product in the field without a lot of testing, as you are closer to the bounds than I might be comfortable with based solely on a paper design.

  23. Now I miss tim horton's. Been a good while for me. (I didn't live in an igloo when I lived north of the border, but I did enjoy more than my share of tim hortons and poutine, as well as all of the television choices available in any US city, in addition to CBC and a few others not available in the US)

  • Create New...