Feeds:
Posts
Comments

GUI Bot, a overview…

I few months ago, I started a prject of a little robot, to be able to self study some control, resolve maze algorithms and do something fun. The robot needs to be small with very quickly and smart movements.

The prototype was a success, made with some materials that I already have and with little issues, work’s great!. It can do:

  • Move, turn and gyro with speed and agility;
  • Speed up and Stop when you need;
  • Generates little sounds/alerts (and some music too, like a old cell phone);
  • Detects and follow a black line over white plane;
  • Easy programs changes, via USB/Serial adapter connection and a bootloader on the microcontroller;

This is my prototype, called GUI v1 (honor my son, Guilherme), build with universal PCB and some wires:

nice work!

Lithium Battery (like the new cell phones)

some wires...

The chassis was made with PCB it self, because I don’t like spend time to find some special enclosure to it. The universal PCB was cutted with Dremel and all components are soldered with a common solder iron. I need to confess: when the prototype was finished, it’s length and robustness impressed me. I don’t spect. See it in action:

After some tests that comprove some abilitys, I started to design a well polished and projected PCB. Now the hard work begun. I used Eagle software to design the circuit and PCB, but I don’t have all parts I want. So, I’ll go at SparkFun to find some devices I like to use in the robot. They have all really nice stuff you can think.

The processor (a Microchip PIC18F452) running at 20MHz and control motors speeds, LEDs, Buzzer, Wireless and all the embbeded stuff. It’s using a Bootloader to facilite the program upload, so the user don’t need complex flash programers to load their own software on the board. Just compile your program and upload via USB cable using a serial program like Hyperterminal or Putty.

Now, with the PCB designed, I’m going to BacthPCB and ordering some pieces. BacthPCB do a nice and decent job to amateurs designs, because they accept even a one board was order. The time to process your order is about 20 days. You can view my design (up board) and the processed PCB below:

design...

...produced.

After have almost all parts soldered and load some basic program to test, the result is:

low profile...

...breadboard...

...clean.

It’s power come from a little 3,7V Lithium-Polymer battery, charged via USB mini-B connector. I’m calculating the robot autonomy, as son as possible I’ll post this important data.

And if you can see this little robot in action:

As you can see, your movements are clean and fast, but with the control it’s can be smooth and slow. Now I need finish the Wireless comunication. I’m wonder if the program upload can be done via wireless…

The total cost of the robot it’s about $200 (excluding post services of board and components). The robot don’t stay in comercial prodution…maybe after some corrections and testes I change my mind.

I haven’t finished my last board yet and other are designed. That’s time with USB connector made with the own PCB. Thank’s to Sparkfun for the Eagle library, that have this option of USB port. Now more then one version is comming!

I hope us enjoy this board when it’s arrive. See it:

Recently I’ve working with the little but smart PIC18F14K50 (or your low voltage version, PIC18LF14K50). These chips are cheap (about $2,5 at Mouser) and have low pin count, but very impressive specs:

  • USB V2.0 (low and high speed);
  • NanoWatt feature (sleep with 24nA!);
  • 10-bit A/D converters with auto-acquisition;
  • PWM;
  • Several Internal Clock modes;
  • EUSART;
  • 16KB Program Flash Memory;
  • 768B SRAM;

They help me with USB development. The low pin count don’t became a problem because most of times, my projects don’t use all them (in case os PIC18F4550 or PIC18F2550).

I think that it’s a good choice to design some little USB devices, like:

  • A USB accelerometer;
  • A USB thermometer;
  • A USB logger;
  • A USB GPS;

The possibilities are awesome!

Microchip develops a kit, called “Low Pin Count USB Development Kit” to present this chip. But the Microchip kit have dimensions, don’t very suitable to work like a real USB peripheral.

So I design a little board, with minimum parts to make it work. The board is a first prototype, a experiment. If works, I’ll improve it with more polish design and features, and design one with PIC18LF14K50 for 3.3v native support  and etc.

You can see the circuit and board below:


GUI v2 – Final

It’s finished! (almost). The Motor Board PCB arrives and I’ve soldered all components together. The final results looks awesome to me! Most beautiful that I’ve planed. There’s some parts that I don’t solder, because I need purchase a SMD rework station (all solders on this robot are made with a ordinary solder station).

GUI v2

GUI v2

GUI v2 - Power ON!

 

I found two problems with this design:

  • I’ve used the RA4 pin of PIC18LF452 for digital I/O, but unfortunately according to datasheet, that pin is a open drain. To operate like a common digital I/O it’s need a pullup resistor, but I don’t put it on my design. I need to solder the pullup 10kΩ SMD resistor. Lesson: All the times, read the entire datasheet before use any device pin.
  • In my Eagle motor library, I don’t provide horizontal restrictions to the motors area. Then, a little decouple capacitor stay above the motor, touch the white bracket motor house. This make a bad contact between boards. This capacitor it’s for crystal stabilization, so I removed it.

Well, even with all the issues:

  • Inverted connectors on boards;
  • Capacitors with wrong package (remember: 3406 don’t is 0603!);
  • Open drain pin without pullup;
  • Parts that I can’t found where purchase them;

… I think the whole project was a success. The robot works well, silent, smoothly. They are solid, very small and useful. The final result is a perceived evolution of the prototype, you see next:

Prototype and Final

Prototype and Final

GUI v2 - two boards

That’s the video of your first tests:

Now, the wireless part (NRF24L01+ transducer) waits to be soldered. It’ll on the party next month. So, the whole project has been closed and I’ll work on the software development, that I only write a very basic functions for test and maze solves.

Bye!

GUI v2 – part 1

When I start the PCB design I’ll think that some modifications can be done, like that a more power MCU and other goodies, like wireless communication.

Today most of DIY electronics projects use ZigBee or XBee for wireless communication. But i like to use a very low power device. I think that use one of the devices from Nordic, like nRF2401 or nRF24L01+ is a good choice. They aren’t full-duplex, but it’s don’t become a problem to me because most of I want is for telemetries, where the robot send data and receive in distinct moments.

This is nF24L01+ characteristics:

• 11.3mA TX at 0dBm output power
• 13.5mA RX at 2Mbps air data rate
• 900nA in power down
• 26µA in standby-I
• On chip voltage regulator
• 1.9 to 3.6V supply range
• On-air compatible in 250kbps and 1Mbps
with nRF2401A, nRF2402, nRF24E1 and
nRF24E2
• Low cost BOM (Bill Of Materials)
• 5V tolerant inputs (everyone like devices with tolerant inputs)

After much headache I’ve finished the design of the two boards. I’ve made some mistakes with the design and some of mistakes I only know when the boards arrive to me. I’ts very frustrating…

Some of these mistakes besides on design with components that you don’t have in your hands or that you can’t find to purchase. This is a tip for everyone starting a new design: only use components that you really now where obtain. Some parts may appear to be easy to find, but they don’t.

Because some of that mistakes the controller board is finished but the motor board not. View the pictures:


This a video with the board in test.

The motor board, with the motors, h-bridge and other parts are in late because a great mistake: one of the connectors between boards are reversed (Duh!).

Was soon the motor board comes I’ll post the final mount and tests.

Next post I’ll show circuit details. Bye.

GUI v1 – Final Protype

After so much solder and wires, I’ve finished my prototype with a great degree of quality:

This is a little video demo:

Disassembled boards:

Than, after this little challenge, I started to design a professional PCB for my robot. I used the great Eagle for that. I’ll post more brief.

GUI v1 – part 2

Continue from part 1…

About the H-Bridge and motors.

There’s a lot of H-Bridge CI’s on market today. The most used on DIY robots are:

My experiency with SN754410 is good. It’s a good device, friendy DIP package (don’t say the same about L298). But (always there’s a “but…”) it’s have a great voltage drop across the internal transistors. If you put 6V at Vmotor and a 1A load, you get Vmotor – 2V, so only 4V to the motors. For my robot I want a more efficient H-Bridge. L298 and L293D are bigger devices, have the same problem than SN754410 and… I hate L298 package. So, I move to a new device.

Fortunately, at same time I find the Toshiba’s TB6612FNG dual motor driver. It’s a really nice device, with a good package (SSOP24 300MIL). TB6612FNG specifications:

  • Motor voltage (VMOT): 4.5 – 13.5 V
  • Logic voltage (VCC): 2.7 – 5.5 V
  • Output current maximum: 3 A per channel
  • Output current continuous: 1 A per channel (can be paralleled to deliver 2 A continuous)
  • Maximum PWM frequency: 100 kHz

Pololu have it in a nice breakout board, very friendly (above). After some test, they are chosen for GUI v1.

H-Bridge

TB6612FNG H-Bridge

GUI v1 – part 1

GUI v1 is little robot I was design over the last months. I have already made some other robots, but I don’t even finishing most of them. This design has various issues, and challenges. But it’s almost finished. Now I’ll post some steps of your design and construction. If you like it, visit my project page a LetsMakeRobots. It’s a awesome site with a lot of robots and good people.

First, going to my desires: I want a little robot, with little wheels and little motors. They need to be battery powered, but a little battery.

Some things I want my robot to do:

  • Line following;
  • Maze resolve;
  • Wireless communication;
  • USB wired communication;
  • Self-charge your battery;
  • Have a lot of LEDs (because LEDs are fun!);

So, with this great inspiration I begin it’s prototype. Maybe what I said now sounds a little amateur, but, when I have started, I don’t have a clear idea of how the final robot looks like, but I knew that your lines should be clear, without wires growing up.

I hate deals with hardware, so I decide that for the robot body I want use a PCB. The initial result was good enough to encourage me:

GUI PCB Based Body

Now, the nightmare begin: solder every part to PCB and wire all. I like, but I hate this.

The robot have the follow parts:

  • PIC18F252 was MCU, running at 20MHz;
  • 7 reflectance sensors, QTR-1RC;
  • Dual Motor Controller, TB6612FNG;
  • 2 Micro Gear Motor 30:1;
  • Step-Up converter, NCP1400 for 5V;
  • 3.7V LiPo battery;

About the MCU:

The PIC18F252 has the PIC Tinybootloader inside, for speed up the code development. Bootloaders have their issues, but my design is for a robot with easy upgrade capabilities. I like that everyone how like to change their software, can do this without bought a PIC programmer.

I don’t use all pins, but a think that for the final version, some other PIC is a better choice (like PIC18F452).

About the sensors:

The reflectance sensors are the QTR-1RC from Pololu. They have a QRE1113GR, that is a emitter-receiver pair. Pololu sells this sensor with two versions, one digital and other analog.

The digital version translates the reflectance into the capacitor discharge time, so with a common digital I/O port, and a counter, you can differentiate from a  White surface (more reflective) from a Black surface (less reflective).  The circuit below is show their use with a ordinary digital I/O on the MCU:

Reflectance Sensor - Digital Use

The analog version (QTR-1RA) needs a ADC line on MCU. Most of MCUs today have one, so don’t worry about your choice.

Now I have to sleep. Tomorrow I’ll post the next steps. Bye.

Many things happen since the last post, but now this blog won new projects. First one is a USB Single Cell LiPoly Charger. I have many Lithium Polymer Batteries for my projects and charge them maybe a tricky borring if you don’t have the correct charger.

Really, this batteries needs a specific charger, and may explode if you use other type of charger.

So, we start to find the correct circuit for my DIY charger. After some Google research I find the MAX1811 IC. I’ts a single-cell lithium battery charger that can be powered directly from a USB or from an external supply up to 6.5V. Use a SO-8 Package, easy to solder and can be sampled at Maxim.

It’s only need a feel external components to work. Above you see the schematics and PCB of my version 1:
schematic_v2

board_v2

After the PCB fabrication, solder and wiring, this is the charger working:
S5032988

S5032984

S5032994

Some things about the charger and the MAX1811:

  • The SO-8 Package can handle 1.4 Watts.
  • You can select between 4.1v and 4.2v battery regulation point.
  • You can select between 100ma and 500ma current drain from USB.
  • There’s a open drain pin (pin_8) for signaling end of charge condition (2.5V < VBATT < BATT Regulation Voltage). Normal charging resumes when the battery voltage exceeds 2.5V.
  • A internal thermal loop limits the MAX1811 die temperature to
    +135°C by reducing the charging current as necessary.

Now that i saw my circuit work, I’m design it to be a USB stick. After some mistakes and bad design, this is the final version:

Actually more and more device’s with direction, move or orientation sensing rising in market. This revolution is done by the fact that the price of a type of sensor, the accelerometer, suffer o down in later years. With this, the new sensor comes to the old stuff, aggregating more functions. Products like Iphone and Nokia N95 have accelerometers embedded. Notebook’s, for hard-drive shock protection, are another example. Even the Wii Remote have one… God! I need a accelerometer!!

Well, maybe the true reason is that the technology of MEMS’s is growing up. MEMS – Micro-Electro-Mechanical Systems – is the integration of mechanical elements, sensors, actuators, and electronics on a common silicon substrate, through microfabrication technology. And when i say microfabrication, stand for really microfabrication! See…

MEMS - Micro-Electro-Mechanical Systems

Accelerometers technology is made by this kind of technology. You can find more and more information in Analog Devices website. They have a great family of ADXL named devices that are great 2 or 3 axis MEMS accelerometers in a small encapsulation like LCC (Terminal Ceramic Leadless Chip Carrier), LFCSP (Leadframe Chip Scale Package or other “evil-made-package”.

LFCSP - Good for hobbie

Thank God (or no) that Sparkfun have made greats breakout boards for accelerometers like ADXL202, ADXL330. With this breakout, you have no difficulties to integrate the accelerometers with your breadboard.

ADXL213 Accelerometers

Some ADXL sensors output Analog, some sensors output both Analog and PWM. The Analog output is a voltage relation with the acceleration perceived by sensor. PWM outputs, have a Duty Cycle length relation. In any case, a Microcontroller with ADC for analog, or a counter (for PWM) is a solution easy to integrate. PWM can be easier because don’t need ADC capabilities, and any simple Microcontroller can be used. Reading voltage, getting acceleration. Start a counter, reading the value and getting the acceleration. So easy…

Now, is time to test a accelerometer. Above, I’m listing some common types and your characteristics

  • ADXL213 +/-1.2g, 2-Axis, High precision PWM and Analog;
  • ADXL203 +/-1.5g, 2-Axis, High precision Analog;
  • ADXL202 +/-2g, 2-Axis, PWM and Analog;
  • ADXL311 +/-2g, 2-Axis, Analog;
  • ADXL210 +/-10g, 2-Axis, PWM and Analog;
  • ADXL330 +/-3g, 3-Axis, Analog;

I’m have the ADXL213 and ADXL330 in a friendly 0.1″ pins breakout board. The ADXL330 are extremely low noise and low power consumption (only 320uA!!!).

My intention with this post is start a study about the use of accelerations, with simple circuits and more explanations. In the next post I’m show my first test circuit. Thanks.

Older Posts »