I had no batteries at hand that could deliver the 24V I plan to use for the finished Segway clone construction, so I had to borrow a battery from my lawn trimmer, providing 21V. The circuit proved to work fine, at least on a quick minimal load test.
Embedded Spare Time
A blog about my spare time projects in the microcontroller electronics area. My recent projects include a simple PIC-based television remote control and an MP3 player, based on the PIC 18F25J10 and the VS1011 MP3 decoder. Currently I am learning more about the Cortex M3 CPU, developing a simple RTOS running on the STM32 microcontroller.
Wednesday, June 29, 2011
Starting construction of H-bridge module.
I got the components from ELFA and Lawicel a few days ago. The first step was to set up the LM2574-based step-down converter, supposed to deliver a stable 12V supply to the HIP4081, on a breadboard. The schottky diode which is part of the circuit had pins so thick, I had to sandpaper them down to be able to push them into the breadboard holes... :)
Thursday, June 23, 2011
More components ordered.
Next step is to design a powerful H-bridge that can drive larger DC motors that can actually drive a full-scale Segway clone. Yesterday I ordered a bunch of components, most notably:
- 1 HIP4081AIP H-bridge driver IC.
- 4 IRFZ44N N-channel MOSFET transistor, capable of controlling 49 amps at 55 volts.
- 1 LM2574N-12 step-down switch regulator to provide the 12 volts required by the HIP4081AIP, from a 24-28 volt power supply (sealed lead-acid batteries).
One source of inspiration (an open-source, open-hardware motor driver):
Balancing robot starts to work.
After a little Arduino sketch hacking the robot is now balancing. It works pretty well on carpets, not so well on wooden floors, probably due to small friction. Carpets seem to reduce oscillations in the control algorithm.
Tuesday, May 10, 2011
Testing the H-bridge.
I assembled the motors, wheels and electronics in a rather ugly way, but hopefully it will be enough to test all concepts. Behold:

I hacked some Arduino sketches to test the H-bridge. It seems to work fine, but I'm a little worried about the dead band around zero percent PWM duty cycle. Hopefully it doesn't matter, or I can compensate for it in software.
Friday, April 22, 2011
IMU Measurements
Just got the components from Sparkfun now, and started experimenting, initially with the Arduino and the IMU. I was impressed by how easy it was to get started with the development environment. I hooked up the IMU's XACCEL output to the A0 input of the Arduino Pro Mini and basically just adapted to AnalogInOutSerial example to output the raw accelerometer value, together with two averaging functions. These were dumped to a file and I fed them into gnuplot to get a hint of how a low-pass filter would perform. This is how it looks:
Red line is the unfiltered input from the accelerometer. Green is filtered using a weighted average algorithm. So is the blue line, but it takes very little of the the fresh input into consideration.
Friday, April 15, 2011
New project
Time for a new project, just like most of them it will probably not be finished in less than 3 or so years. However; the intention this time is to learn a little more about the following things:
- Electronics, especially handling analog sensors such as gyros and accelerometers
- Motor drivers, based on H bridges and MOSFETs
- The Arduino platform (and thus, the AVR-based ATmega328 µC)
- Mechanical constructions
- Control theory and basic digital implementations of control loops
Today, the first components arrived (from Sweden-based http://www.lawicel-shop.se/):

Saturday, February 13, 2010
Debugging serial device driver with the Jyetech oscilloscope
Subscribe to:
Posts (Atom)