BUGGY – Development Platform with Wheels
What a cool Idea is to make BUGGY from the beautifully, smart designed and shaped Separate PCBs. Talking is the Mikroelektronika nice BUGGY.
15 years ago, a development board was not only hard to find but seriously expensive. Buying a development board and the compiler to go along with it was an extreme commitment. Kind of like buying a house but this house was one you had to constantly work on. Not only that but compilers were primitive by today’s standards. Fast-forward to the present and a development board can be found just about anywhere. Ordering online has never been easier and the compiler / IDE can be downloaded. What a beautiful time we live in.
There is one flaw in the board selections, they are all geared to a flat virtual world. What about the case of movement and articulating physical representations of code? I’m talking about motors and sensors living in harmony as they perform a valuable task.
Sure, you can wire in the motors and power supplies. You can put together something like Frankenstein’s monster, but what if the development system you use were more customized to work in the physical world? No need for a wiring nest.
AMAZON.CO.UK Affiliate Link: Buggy + clicker 2 for STM32 + BLE P click
All the talk lately about drones has taken away from the beautiful platform of a wheeled drone. Flying development boards have a hard time with flight time as well as tight spaces. With a wheeled development platform, the closed spaces become a welcomed environment. How about inspection of air ducts? How would a flying board accomplish this? What if you didn’t want to disturb the surrounding environment? Fairly difficult to create an autonomous vacuum with a flying drone.
Although the appearance of the BUGGY can resemble a toy, it’s nothing less than a full development foundation. Let’s look at some of the features that define the BUGGY as a development platform.
- 4 count them 4 DC drive motors
- Mainboard pad that accepts multiple platforms ( ARM, PIC, PIC32, and more to come )
- 3 Mikrobus sockets for sensors, radios, GPS, mems devices, lighting, NFC, RFID, camera, voice recognition, speech synthesizer
- Connections for external analog sensors
- High capacity Li-ion rechargeable battery with power management onboard
- Basic lighting front, turning and rear LED indicator Diodes.
All of which you won’t find on a toy.
The Drive Mechanism
Having the ability to transport your sensors to the location you need is critical. For the driving system, we find the 4 motors driven by 2 DRV8833RTY MOSFETs. These are controlled with simple PWM from the main board. The motors can be controlled independently from one another. 4 motors = 4 PWM channels. The beautiful thing about controlling a motor by PWM is the fact that the MCU Timers take care of this signal without any MCU processing time. When you add the simplicity of the PWM Library in the MikroE IDE, a movement is practically done.
PWM is used in many things and can fill almost a book. What is important to know is that when looking at DC motors is that when looking at speed, they are regulated by the level of voltage. Higher voltage means higher rotational speed. So how do you vary the voltage from a battery? PWM. The ratio of the time on / off in comparison to the input voltage is what the final voltage is. For example, an input of 5V and duty cycle of 50% means a voltage of 2.5V.
Period: the length of time between beginning and end of a cycle of the timer. The larger the frequency of this period the smoother the motor motion becomes. This becomes clearer when you mix in the concept of a duty cycle.
Duty cycle: The length of time the signal is high over the span of 1 period. 50% = 50% on / %50 off
Needed for PWM: Timers
Setup Timers:
These simple commands set the timer to a period of 20,000 Hz. This will give us a very smooth voltage. If you experiment, you will find as the frequency is low, the motors will still operate, but the motion will be like driving over a bumpy road. What is stored in the variables PWM_X_PERIOD is the timer period based on the value of the timer.
We also set the PWM duty to 0 which is a complete stop.
Moving Forward / Reverse
Forward motors are on channels A for left and D for right
Reverse motors are on channels B for left and C for right
Setting the duty on the forward motors the same means a movement forward since we are going to be using a range of duty, we can use a scale with the PWM_X_PERIOD.
Example:
This will be a movement forward at %50 of the maximum speed.
This is a reverse speed of %75 of maximum.
Turning
Turning is done with differential power between the corners of the buggy. Meaning that if you want to turn left you would turn the duty up for the right motor and down for the left motor. The tighter turning radius the larger the proportional rate between the 2 motors will be. This scaler value between the motors could be mapped between the values of a joystick read from an ADC.
Ideas for Motion Control
Maybe the joystick is too old school for you. How about controlling the movement of the buggy with gesture:
Speak to your drone. What about a game of keep-away. As your pet approaches your drone, have the IR Detection move to a safe distance.
Communication
Communicating the gathered sensor data is going to be paramount for a motorized data collection drone. Several options exist and all depend on your range, power, and data throughput. If you are creating an indoor air quality collection unit, WiFi is a good choice but tends to be power hungry. A more miserly power consumer would be BlueTooth, BluetoothLE, nRF24L01, or other low-powered radios. A distance answer would be LoRA or 6LoWPAN or Z-Wave.
Expansion
2 Mikrobus slots exist on the front for usage of sensor or radios. Faced perpendicular to the travel direction lends itself well to distance sensors.
Mainboard
Several choices are in this category. PIC, STM32, PIC32, FTDI.
The choice is a purely personal one. It’s like asking which is better Windows or Linux. We all know the right answer, so we don’t even need to discuss it.
The form factor of the connector is the same as the Mikromedia. You can use the Mikromedia, but with you will loose the 2 Mikrobus sockets on the board in exchange for a display.
Projects Made with Buggy
Line Following Buggy
Collision Avoidance
GUI Based Buggy Programming
PIC Based Line Follower
Summary
Although there are some flames on the PCB which makes the buggy look like a toy, in reality, it isn’t. Toys don’t allow for 6 expansion slots, or the ability to add your own logic. A more appropriate name for it would be “development board on wheels”. My personal choice for these units is a personal annoyance tool for pets. An algorithm that seeks the radio tag of the dog’s collar then keeps a safe distance from it. The joy lasts as long as the battery.
AMAZON.CO.UK Affiliate Link: Buggy + clicker 2 for STM32 + BLE P click
{Material: Microelectronika}