Advertisement

Blog

Tiny, Boring Engineering Designs Can Be Fun

Interfacing on-off sensors and dealing with bouncing and flickering can become almost a boring and routine job. But in rare occasions we need to go beyond wiring a couple of cables.

For one application we needed to use one speed control unit (see Figure 1) under some slightly different operating conditions inside a controlled environment. Firmware sources were not available, so our only entry point into the system was the sensor terminals block. The need to “fool” the control unit by tweaking its sensor signals made this application a good candidate for exercising skills and having some fun.

Figure 1

System overview.

System overview.

The sensor operates like a very low impedance contact switch. Power for the sensor is provided by means of a 560 Ω pull-up resistor in series with the internal regulator. Sensed state information comes in both, pulse width and pulse-to-pulse time interval. Our goal was to extend the pulse width, t1, without overlapping more than two consecutive pulses (see Figure 2).

Figure 2

Modification of the signal.

Modification of the signal.

There were several relatively simple solutions, but we wanted our device to act like a small, battery-less, pluggable dongle with some “intelligence” inside.

The main constraint in the design was the need to be pluggable and un-pluggable without disconnecting the sensor. The small set of requirements served the challenging and fun part of the design: battery-less operation, low power consumption, fairly precise timing (ms resolution), small size, and ability to distinguish between self-driven LOW output from sensor-driven LOW.

Ahem! Why not using a microcontroller? Why not mix some analog and digital modules? The resulting conceptual design idea is shown below in Figure 3.

Figure 3

Conceptual design.

Conceptual design.

The Power module “steals” a fraction from the energy provided by the control unit for the sensor. Key components are D2, Vref and the Analog Comparator , and operation is fairly simple. When the output is driven low by the logic, the positive (+) wire is driven low, too. D2 ensures a detectable (+) wire voltage below the logical “0” threshold but above 0 V . The analog comparator’s function here is to detect when the (+) wire is pulled down again by the remote sensor (see Figure 4).

Figure 4

Modified (+) wire signal.

Modified (+) wire signal.

There are several rail-to-rail, single-supply opamps and small pin-count CPUs that could do the job here. But real fun was looking for something really “tiny”. An ATtiny10 microcontroller from Atmel was a perfect fit for this application. It comes with an analog comparator, analog-to-digital converter, timer, watchdog, 32 bytes of RAM and 1 kbyte of Flash, all in one single 6-pin SOT23 package.

Almost all firmware tasks were done in the analog comparator output change and watchdog interrupts. The CPU stays in low power mode for most of the time. We selected one low-power silicon rectifier diode for D2 and one Schottky diode for generating the analog comparator’s reference voltage. A couple of R-C low-pass filters helped in reducing noise at the comparator inputs. I did not take pictures from real prototypes, but Figure 5 shows a partial 3D render taken from the PCB design tool. It fits inside one standard 3 mm male jack cover.

Figure 5

3D rendering of the resulting prototyped PCB.

3D rendering of the resulting prototyped PCB.

I am almost certain that most of our engineering jobs can be anything but boring. Facing new challenges and tasks is undoubtedly one of our motivation sources.

It will be interesting to hear from other colleagues about how engineers and technicians make routine tasks more fun.

41 comments on “Tiny, Boring Engineering Designs Can Be Fun

  1. antedeluvian
    December 15, 2014

    Victor,

     

    Next time you are faced with a similar challenge, you should consider the Silego GreenPAK2. It has no micro nor any need for one, but has all the logic and analog components you need to realise this projct as far as I can tell. They call it a Programmable Mixed Signal Array. It has comparators, A/D converter, timer/counters, LUTs and more, all in a package 2mm x 2mm!

    Configuration is via a graphical user interface.

    I have written a blog for MCU Designlines on it which will appear in January. I will post a link when it appears. 

  2. Davidled
    December 15, 2014

    GreenPAK2 seems like a power tool to design analog circuit. Also, if this design is for STEM, Figure 1 design of blog presents all detail of how sensor is operated with HMI interface. Then, engineer and Sr. student could understand basic circuit.  They might be challenged to design the PCB board.

  3. Victor Lorenzo
    December 15, 2014

    Thanks for reading and commenting, Aubrey, and especially for pointing us to those interesting devices from Silego. The SLG46400 seems very interesting and fits in several simple applications.

    When we started playing with the control unit we found that it applies some input checks on the sensor signal and shows error messages on the display. After entering in error mode the user must manualy reset the unit. Adding some “intelligence” allowed avoiding generation of those errors.

    Under noisy environment (passing near by a strong interferences source) the comparator gets a little bit crazy. With the Tiny we can change our operating mode and use the ADC+very simple digital filtering to detect the sensor activation/de-activation and act accordingly.

  4. Victor Lorenzo
    December 15, 2014

    DaeJ, the design is very simple, exactly as you point out, and can be used for academic purposes as well. I did not include the schematic… but you will most surely not need it.

    There could be more challenges in the design, and miniaturizing the PCB design is one of them. The final design was 5.8mmx16mm, single sided, and fits exactly inside the plug cover. There you have a challenge 😉

  5. etnapowers
    December 16, 2014

    “Our goal was to extend the pulse width, t1, without overlapping more than two consecutive pulses”

     

    @Victor: thank you for this interesting article. I wonder why did you try to extend t1? Did you want to measure more accurately the angular speed for a particular task?

  6. etnapowers
    December 16, 2014

    “The Power module “steals” a fraction from the energy provided by the control unit for the sensor”

     

    @Victor: Is D1 a LED that reveals the presence of power from the remote sensor? Did you have to regulate the impedance of the diode, to ensure that the amount of power “stolen” should not be too much respect the amount of energy provided by the control sensor?

  7. Victor Lorenzo
    December 16, 2014

    @etnapowers, >> I wonder why did you try to extend t1?

    We changed the mechanical part, due to that the existing relation between the angular and tangencial (linear) speed also changed.

  8. Victor Lorenzo
    December 16, 2014

    @etnapowers >> Is D1 a LED that reveals the presence of power from the remote sensor?

    Energy is stored in a low capacity capacitor so D1 avoids discharging when the sensor activates its output and becomes almost a short circuit.

  9. samicksha
    December 16, 2014

    Thank You Victor for bringing this down here, Sounds like good training material as well.

  10. etnapowers
    December 18, 2014

    @Victor: thank you for your answer. I guess the extension of the t1 allowed a more accurate precision of the measurement and it enhanced of the overall efficiency of your system.

  11. etnapowers
    December 18, 2014

    D1 is then a unidirectional path for current. Diodes are very cheap and at the same time useful components to be utilized in this kind of situation.

    I guess that also a MOSFET whose GATE terminal controlled by a clock signal might be a suitable option to avoid the discharge of the low capacitance, but probably this solution would be more expensive.

     

  12. fasmicro
    December 18, 2014

    >> I am almost certain that most of our engineering jobs can be anything but boring. Facing new challenges and tasks is undoubtedly one of our motivation sources.

    There are many ways great product leaders can inspire interests and motivations even for a product or design that looks not very exciting. My old boss used to show us sales forecasts on what that design can accomplish. There are many ways fun can come just from the technical part of the work but also from the execution phase.

  13. fasmicro
    December 18, 2014

    >> There could be more challenges in the design, and miniaturizing the PCB design is one of them.

    Simple solution – make a system on chip so that one chip does most of the jobs on the board. That gives the highest level of miniaturization though the risk of extending development time is there.

  14. Victor Lorenzo
    December 18, 2014

    etnapowers >> I guess that also a MOSFET whose GATE terminal controlled by a clock signal might be a suitable option to avoid the discharge.

    It is possible to use a commercial load switch, or a MOSFET as you suggest, controlled by the CPU and detect the moment when VCC starts to drop, but as you say it will require a higher components count.

    A schottky diode with 0.15~0.2V forward voltage seemed perfect for the ocasion, simple and effective.

  15. Victor Lorenzo
    December 18, 2014

    fasmicro >> Simple solution – make a system on chip

    Years ago several colleagues were developing an AC power consumption measurement and monitoring system based on Zilog's Z80A CPU. The system was relatively big as it included many different analog modules: amplifiers, filters, I-V converters, sample&hold, ADC, current transformers and several other things.

    At that time there was a very active discussion about the maximum achievable CPU frequency and the maximum achievable HDD storage capacity. Several microcontrollers integrating flash memory and RAM came to life one after the other in a very short period of time.

    It was difficult to imagine, at least at that time, a less-than 15$ CPU running at 120MHz including 1M flash and more than 128K RAM, 12/16/24bits ADC with DMA, D/A, PWM,………., all of that in the same die and running most instructions in a pipelined achieving for single cycle performance.

    Things will evolve and probably in a not so far future we will be able to order a “custom” user configured analog+digital SoC at an affordable price for a hobbiest. Just like today's PCBs.

  16. ue2014
    December 18, 2014

    @ fasmicro – >>>>>>>>> There are many ways great product leaders can inspire interests and motivations even for a product or design that looks not very exciting.>>>>>>

    Yes indeed. I think one another important factor is that your excitement of the designer in getting the Design done. 

  17. etnapowers
    December 19, 2014

    “A schottky diode with 0.15~0.2V forward voltage seemed perfect for the ocasion, simple and effective.”

     

    @Victor: I totally agree with you. the good engineer has to realize the optimal compromise between costs and effectiveness of the solution,a good balancing is ever the best strategy.

  18. geek
    December 30, 2014

    @Victor: Were you allowed to “Free Think” in your organization and work on your own innovative ideas that you felt had the potential? I think more and more companies should encorage that. One, that serves as a good motivating factor for employees. Two, you never know what important product you may end up designing going through this process.

  19. geek
    December 30, 2014

    “My old boss used to show us sales forecasts on what that design can accomplish. There are many ways fun can come just from the technical part of the work but also from the execution phase.”

    @fasmicro: I think it's very important for engineers, particularly the ones working on basic components, to have an idea of what the end-product turns out to be and how the market responds to their products. This greatly serves as a motivational factor because as an engineer you feel proud that your contributions are being appreciated by the consumers.

  20. geek
    December 30, 2014

    “good engineer has to realize the optimal compromise between costs and effectiveness of the solution,a good balancing is ever the best strategy.”

    @etnapowers: I don't think this is always the engineer's job. Given the nature of organizations I have worked in, the engineers were more focused on the functionality aspect while the procurement team took care of the costs. I think that's a norm in the industry.

  21. dassa.an
    December 30, 2014

    @tzubair: Yes now you cannot expect one role itself assigned to you. If you need to succeed you do need to do multi-tasking. 

  22. dassa.an
    December 30, 2014

    @tzubair: Exactly and that's is the only greatest thing that money cannot give.

  23. SunitaT
    December 31, 2014

    @tzubair: Most of the time this happens, however some clever practices include engineers to swap their jobs with the business departments to see how much their design changes while discussing the market factors. Most engineers do not like to see the view but sometimes they understand their design flaw and don't repeat the same mistake again. Similarly the business department employees also come to know about the principles of working in the engineering department and how they handle efficient working. A kind of a communication between developing and marketing departments is a must in companies for them to succeed.

  24. Victor Lorenzo
    December 31, 2014

    @tzubair >> “Were you allowed to “Free Think” in your organization and work on your own innovative ideas that you felt had the potential?

    During my early years as member of an information technology and biomedical engineering research team I felt free to innovate and had full support from my colleages in many areas. The same applies for the time I spent as a point of sale devices programmer for a software company.

    Things were slightly different in a medium sized smartcards manufacturing company I worked for as part of the R&D department. In my last three years there I was in charge of developing several production automation machines with almost total freedom for all levels of decision making, reporting to general director. I also made a short trip as a consultancy firm co-founder/co-owner but it was too stressing, put too rigid limits to creativity and got too “dangerous” for my health.

    At present I work as R&D Manager for a medium sized lightnings protection company. This position requires precisely someone who is expected to be creative, innovative, proactive, independent, rational and open minded, amongst many other things.

     

  25. chirshadblog
    December 31, 2014

    It does require some set of skills isn't it ? 

  26. Victor Lorenzo
    December 31, 2014

    chirshadglog>> “It does require some set of skills isn't it ?

    Exactly! It's much like a one man band. On one side some products are instruments requiring accurate analog front-ends, digital signal processing chains and wired/wireless communication interfaces and on the other side some others are relatively simple (compared to the former ones) but must be designed for surviving direct lightning impacts.

    In terms of technical skills it requires being an experienced analog and digital designer, an skilled firmware and linux/windows applications programmer and have a background on mechanical design (enclosures, molding, packaging, production automation) and systems integration.

  27. geek
    December 31, 2014

    “This position requires precisely someone who is expected to be creative, innovative, proactive, independent, rational and open minded, amongst many other things.”

    @Victor: What do you think is the greatest challenge for an engineer/designer in such a role that involves a great deal of creativity? From what I have experienced, a lack of structure and the ability to streamline creative projects can at times be difficult if there's absolutely no control.

  28. geek
    December 31, 2014

    “A kind of a communication between developing and marketing departments is a must in companies for them to succeed.”

    @SunitaT0: I think this makes the role of the top management more cruicial in how they create a culture that encourages collaboration and coordination amongst cross-functional team. This can really make a huge difference in the output.

  29. SunitaT
    December 31, 2014

    @victor: some people aren't so lucky. They have the same old tedious job for a score of years and they get tired and start questioning about “free innovative thinking”. It also depends on how much you know about different kind of things and how much you want to burn the bridges you built and start a complete makeover on how you see the world and how you innovate.

  30. SunitaT
    December 31, 2014

    @dassa.an: I agree with you. Multi tasking, although very tough in a technical company, has its own set of rewards like better raises, more visibility in your department. You can also get visibility if you accept tough projects that involve a lot of brain work.

  31. dassa.an
    December 31, 2014

    @SunitaTO: Yes they are the ones who have the edge when it comes for critical decisons

  32. dassa.an
    December 31, 2014

    @SunitaTO: Yes making things is something but doing something different is another thing

  33. dassa.an
    December 31, 2014

    @tzubair: Yes as long as everything goes as planned. I have my doubts because its not easy to predict right now

  34. Sachin
    December 31, 2014

    I think this makes the role of the top management more cruicial in how they create a culture that encourages collaboration and coordination amongst cross-functional team. 

    @tzubair, I totally agree with you. Collaboration and coordination amongst cross-functional team is the key to success of the team and the company. Management should always try to maintain positive environment which encourages collabroration and coordination.

  35. Victor Lorenzo
    January 1, 2015

    @tzubair >> “What do you think is the greatest challenge for an engineer/designer in such a role that involves a great deal of creativity?

    To stay focused, that's a big challenge as so many inputs about new technologies bring new ideas about things you could or would like to do.

    The lack of structure poses obstacles by the time one idea transforms into a project.

    In my opinion all projects must be executed under a controlled environment, especially when it comes to be on-time for the planned deadlines. But project planning and execution are, by themselves, areas of active controversy in the projects management arena.

  36. Victor Lorenzo
    January 1, 2015

    @SunitaT0 >> “some people aren't so lucky

    I agree with you. Take this is as a very personal opinion

    I could call “luck” the fact that we, at least the human beings as this applies to some animals too, have two very powerful characteristics: the ability to be constantly learning new things and the ability to synthesize our acquired knowledge in “doing something”, the ability to apply our knowledge, I would say. That can be put plain in what we use to call “new skills development”.

    Something I try to transmit to my colleagues and workmates all the time is the need to keep on learning, stay informed and bring new ideas to life, extract all the knowledge you can even from your most stupid failures. New ideas come to life even in a single piece of paper, you don't need to transform them always into products. Trying to put a few things together over a blank sheet of paper can be a very productive exercise, even if you think it could be a waste of time.

    I always said to my students that learning just for accumulating knowledge would not make them an engineers. Making some silly simil, many brilliant classical guitar players are unable to play “flamenco” guitar, they simply lack what gipsy guitar players call “duende” (elf?). Perhaps this applies to engineering too.

    I think it is a good thing to push our limits as far as we can in a day-by-day basis by “developing new skills” (applying our knowledge), that develops new needs of acquiring new abilities, not only at our job but also with our hobbies.

    All of that, and some more things we could discuss too, is what makes us “lucky” at the moment we envision the “oportunity” to do what we liked and wanted to do.

  37. chirshadblog
    January 7, 2015

    @Victor: Thank you for the lovely explanation. I too guess that you cannot do it with only education as well as only with experience. You do need both to be successful in it. 

  38. etnapowers
    January 16, 2015

    @tzubair: that's true, expecially in big companies. The key point here is that the engineering department and the planning departement have to share the same vision, this will result in an effective balancing of costs and gains.

  39. ue2014
    January 30, 2015

    >>>>>>>>>>>  I too guess that you cannot do it with only education as well as only with experience. You do need both to be successful in it.  >>>>>>>>>>>

    Agree with you and I would like to add one more thing to this. How Passionate are you towards trying new things will also play a major role in this. Some people find failures and demotivators while others take them as challengers and enjoy every bit of their work. 

  40. ue2014
    January 30, 2015

    >>>>>>  The key point here is that the engineering department and the planning departement have to share the same vision, this will result in an effective balancing of costs and gains. >>>>>

    This will also create a motivative environment to the employees and happy work atmosphere too. 

  41. etnapowers
    March 3, 2015

    Yes, I agree on that. A good work atmosphere facilitates a increased productivity, it's very important to achieve it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.