10. Make my device talk, move, etc¶
This week was about learning how to deploy different output devices, such as motors, LED, sound, etc.
👉An output device is any piece of computer hardware that converts data or information from a computer into a form that a human can perceive, such as visual (text, images, videos), audio, or tactile output. - Wikipedia
This week was one of the most unfruitful and disappointing week of FabAcademy (though arguably not as unfruitful as the upcoming Wildcard Week!). I had many big hopes for this week, but was met with many failures due to a combination of inadequate understanding and planning, and lack of time.
In the end, I didn’t manage to get a working system within the week; as the board I made was barely functional, and my motors didn’t move properly. The biggest takeaway from this week was to not be too ambitious with making progress on the final project, but break goals down into realistic learning objectives, so that they can be achieved in the limited time.
So a lot of the work for this week was completed in the following weeks, and I have documented them under “Take 2”.
Group assignment:
- Measure the power consumption of output device(s).
Individual assignment:
- Add an output device to a microcontroller board I've designed and program it to do something.
Groupwork: Measure power consumption of output devices¶
In this week’s assignment, we learnt about the first step to power supply, i.e., being aware of the working voltage and curent requirements of our devices. All output devices have specific power requirements, so we always need to start by understanding those requirements in order to prepare the right power source that can supply the required current/voltage for our devices to function as intended.
We also received a very helpful lecture on Basics of Electricity from the FabLab Kamakura guru, Yamamoto-san, and we gained a much more thorough understanding of basic Electrical concepts such as Ohm’s Law.
📝My learnings:
- I was finally able get my head around the relationship between current and voltage;
Current occurs when there is Voltage across 2 points, and the bigger the voltage, the bigger the current, unless there is Resistance, which acts inversely proportional to the current. - I was also surprised to learn that when there is a voltage divider, the voltage is halved, but the current nearly doubles as a result of having 2 channels - making the power double!
- I also learned a very important point about motors; since they usually involve high current, it’s important to understand the safety precautions before handling them (read below).
❓Further Questions:
- What’s an H Bridge??
- I’d like to understand better the numerical relationship between Resistance (Ohms) and Current/Voltage.
Power electronic devices like motors require very high current, so remember;
Grounding: Always connect Ground first, to de-energise
Avoid short circuits: Tape the chords down to prevent them accidentally touching
Effects of Current on the body:
The current's effect is influenced by factors like AC/DC, duration, path through the body, and individual resistance. In general, keep these values in mind;
1mA: You can feel a tingle, but it's fairly harmless.
5mA: Slight shock is felt.
6-25 mA: Painful shocks. Loss of muscle control. Especially for women.
9-30 mA: The freezing current or “let go” range. If extensor muscles are excited by shock, the person may be thrown away from the power source. Individuals cannot let go.
50 to 150 mA: Extreme pain, respiratory arrest, severe muscle reactions. Death is possible.
Over 1 Amp: Highly lethal
Add output devices to my board (Take 1)¶
My hope for this week was to experiment with different motor options in order to narrow down on a device that can signal the location of different spices in an effective (as well as cost and power-efficient) way.
Unfortunately, as I will outline, this week ended with a dysfunctional board, due to a combination of inadequate understanding about actuating motors, inadequate planning, and too little time (only 2 days).
1. Planning¶
For my spice rack, I wanted to play with the idea of spices making animated motions to signal the location.
Because I would be deploying a large number of whatever devices I choose, I needed to find an effective output signal that is low power, small and light-weight. I also wanted it to be long-lasting, as needing to replace parts frequently would create a lot of burden for the user. Due to these reasons, I initially scoped out LEDs, not realising that Motors would be even more challenging!
2. Understanding Motors¶
2.1 Basics of Motors¶
I started by doing some reading up on different types of Motors to select the appropriate one.
👉The basic principle of motors is the electromagnetic force that’s generated when current flows through coil of wire. The strength of the rotating force depends on either 1. the amount of current, or 2. strength of magnetic field, which is the number of turns of coil. This is why stronger motors tend to be heavier and larger in size.
The different types of motors below differ in terms of their Power Source (AC or DC), and their control mechanisms;
👉What are the main types of Motors?
* As name suggests, uses Alternating Currents to create the rotating mechanism.
* Used often in industrial applications, due to its high-power, robustness and lower maintenance.
* Uses direct current and a mechanism that consists of spinning coil and stationary magnets around the coil.
* Often used in smaller electronics and vehicles, especially when there’s need for precise speed control.
* Most common types are Brushed typess and Brushless types.
* Usually operates with DC power.
* It has the ability to turn its shaft at precise angles (steps), due to its dedicated driver which can read digital on/off signals.
* 1 “step” is approximately 1.8°.
* Has high torque at lower speeds, but generally not very good at high speeds.
* Often used in digitally controlled machines such as printers, CNC machines, security cameras, etc.
* Can be AC or DC.
* Utilizes a feedback system (like an encoder) in a closed-loop control loop to ensure they reach and maintain a commanded position.
* It offers excellent speed and precise control over a wide range of speeds.
* Used in areas where exact movements are crucial, such as arm control in robotics, CNC machining, automated manufacturing,medical imaging, consumer electronics, etc.
I also read that apparently there are 4 important factors to consider when selecting motors;
- How heavy the motor needs to lift
- How fast you want the motor to move
- How quietly you want it to move
- How light you want the motor to be
Eventually, I decided to try 2 low-cost approaches suggested by my instructors; the vibration motor and electromagnetic coils.
Because there were no vibration motors in FabLab Kamakura’s inventory, I decided to make my debut in Tokyo’s electric town, Akihabara, and got myself 4 different vibration motors to compare.
2.2 Measuring Power Requirements¶
I started by connecting the motors to the Regulated power supply to test that they work, and to figure out the power requirements (i.e., working voltage and current).
As we have learnt above, motors typically require significant current, and it’s important to understand the specific power requirements of each devices first, and design a circuit that supplies the right amount of current.
These were the readings I got:
Motor | 円盤形 ブラシレス振動モーター (Disk-shaped brushless vibration motor) | リニア振動アクチュエーター (Linear Oscillatory Actuator) | 円筒形 振動モーター (Cylindrical vibration motor) | Mini vibration motor 2.0mm (Seeed) |
---|---|---|---|---|
Image | ![]() |
![]() |
![]() |
![]() |
Price | 50 JPY | 80 JPY | 60 JPY | 180 JPY |
Site | Link | Link | Link | Link |
Working Voltage | 2V (1.8-4.5V) | 3~6V | 2V | 3V (2.5-3.5V) |
Working Current | 50mA | 70mA | 80mA |
3. Designing and fabricating my board¶
I decided to make a board for comparing different output devices such as my vibration motors and electromagnetic coils. The idea was to make a board on which I can test and compare different motors with different power.
However, I missed quite a few critical steps in designing this board, such as not thoroughly considering and testing the circuit before moving onto board fabrication.
I also missed some critical components. One of the motor recommended adding Zener Diode or capacitor, but others had no specific guidelines, and since my motors worked fine when I connected them to the Regulated Power Supply, I thought it should be as simple as connecting them up to 3V and Ground pins.
As a result, I ended up with a mostly non-functional board.
I also ran out of time soldering my board, so did a poor job with it.
4. Reflections¶
There is a reason this week’s group assignment centered around Power Requirements.
Because output devices have specific Power Requirements, we need design in specific mechanisms to supply the right Current/Voltage.
To start with, the method I used to supply the right voltage was misinformed. My instructor told me I could either use a voltage divider or regulator to reduce my supply voltage from 3V to 2V, so I decided to go with the familiar Voltage Divider. However, Yamamoto san told me this approach is dangerous as the motor draws large current, causing the voltage to widely fluctuate
In addition, we also typically need to consider adding below components when implementing Motors:
act as high-speed electronic switches in motor driver circuits, allowing a low-power control signal to manage the high currents and voltages required to power a motor. By rapidly turning the motor’s power on and off using techniques like Pulse Width Modulation (PWM), MOSFETs control the motor’s speed and position, providing efficient and smooth operation for various motor types, including DC, brushless DC, and stepper motors.
- MOSFET: To control xxx There are 2 types, depending on the amount of supply voltages. With motors, they typically work on more than 2V, so we tend to use N-MOSFETS.
- 3-Terminal Regulators: Is a component that outputs a constant voltage, and can be used as an alternative to MOSFETS. It constantly checks whether the voltage it supplies deviates from the target voltage, and if it does, adjusts it so that the voltage does not exceed the target value. Any excess voltage greater than the target voltage is released as heat. Often require heat-sinks.
- Pull-up/Pull-down resistor (1k/10kΩ): recommended to make sure the MOSFET is fully off when there is no signal.
- Transistor: Recommended to filter out noises. Usually around 10 to 100pF.
- Diode: To protect against reverse current flow.
5. Electromagnetic coil contraption¶
The other approach I wanted to explore was sending electricity through copper wire coils to create an electromagnetic field that would move the spice bottle. I thought that if I could generate enough torque to lift the bottles, it would be fun seeing the spice bottles bob up and down.
Nagano-san had showed me how to make a simple circuit for an air core coil (electromagnetic copper wires simply wrapped around hollow core).
Referring to Nagano san’s Fabricademy Documentation, I breadboarded a circuit for the same simple coil electromagnet, using MOS-FET and battery power source. A 9V battery worked well, but in hindsight, I should have tested the coil at a lot wider range to identify the specific voltage at which the coil functions.
I should have also measured the resistance, which should be very small, in order to also figure out the current.
In the end, I realised achieving enough tourque will be quite a challenge, especially with such small budget and shelf space.
Perhaps I could compromise by making little flag contraptions like this one that Yamamoto san made.
Or I could take inspiration from flip disc displays.
The disc rotates on the shaft that is carried in the two triangular posts. The magnet that powers the rotation can be seen embedded in the disc. Under the disc is the driving solenoid; when powered, a field is induced into the two posts, flipping the discs. Rotation stops when the disc hits the post.
but I will leave these ideas for another time.
Solenoids are a specially engineered electromagnet in which a coil of wire is wrapped around a specially shaped core made of steel or iron, it is an integral component in all sizes of motors.
Solenoids work like this: when electrical current goes through the loop of wire, a magnetic field accumulates around it. A iron or steel path for this force to flow into significantly increases the strength of the magnetic field. Because magnetic energy attempts to take a specific path, flowing from the center of a coil, out one end, down the sides and then reversing that path. If a iron or steel core, called a solenoid, is shaped to fit this path, it will then direct the flow of magnetism through it.
Take 2¶
After my failed attempts, I concluded that, given the difficulty of actuating motors, trying to actuate so many at a time was too big a challenge to try achieve in 1 week of FabAcademy. Moreover, considering the large number of motions I will have to make, 80 JPY per device, plus added costs for all the other necessary components, would be too expensive for the little benefit they bring.
Based on this conclusion, I decided that I should continue to prioritise price and long-life as the priority for the output device, and decided to settle on LEDs for now.
Useful links:¶
- Flip Dot Magnet
- Flip Dot 2
- Vibration motor documentation
- Flip Disc on Wikipedia
- Flip dot on hackaday
- Flip disk on gigazine
- flipdisc.io
- Flip disc Documentation
- Flip disc youtube video
Files:¶
Reflections:¶
This week I learnt to…
- Demonstrate workflows used in controlling an output device(s) with MCU board I have designed.
Looking back, I was over-ambitious at the planning stage, and I tried to cram too many things which led to me skipping some critical steps to finish in time.
Sometimes we can’t deploy all our ideas for the final project in one week, so we need to start with scoping out realistic learning objectives for the week
I learnt that voltage dividers are not a smart way to control voltage, since it makes current
I would like to learn about implementing PWM
Assignment Checklist:¶
- Linked to the group assignment page
- Documented how I determined power consumption of an output device with my group
- Documented what I learned from interfacing output device(s) to microcontroller and controlling the device(s)
- Linked to the board I made in a previous assignment, or documented my design and fabrication process if I made a new board
- Explained the programming process/es I used
- Explained any problems I encountered and how I fixed them
- Included original source code and any new design files
- Included a ‘hero shot’ of my board
-
Reference for Motors: Seeed, Documentation, HVH, Engineers Guidebook ↩