carr3r

Installing Arduino 1.6.3 on Ubuntu 32 and enabling Optiboot

$ wget http://downloads.arduino.cc/arduino-1.6.3-linux32.tar.xz
$ tar -xJf arduino-1.6.3-linux32.tar.xz
$ sudo mv arduino-1.6.3 /opt
$ sudo rm -f /usr/bin/arduino
$ sudo ln -s /opt/arduino-1.6.3/arduino /usr/bin/arduino
$ sudo usermod -a -G dialout yourUserName
$ sudo gedit /opt/arduino-1.6.3/hardware/arduino/avr/boards.txt

Add optiboot parameters for boards (take a look here to see all configurations available) you have at the end of file:

##############################################################
atmega328o.name=[Optiboot] Arduino Duemilanove or Nano w/ ATmega328
atmega328o.upload.tool=avrdude
atmega328o.upload.protocol=arduino
atmega328o.upload.maximum_size=32256
atmega328o.upload.speed=115200
atmega328o.bootloader.tool=avrdude
atmega328o.bootloader.low_fuses=0xff
atmega328o.bootloader.high_fuses=0xde
atmega328o.bootloader.extended_fuses=0x05
atmega328o.bootloader.path=optiboot
atmega328o.bootloader.file=optiboot_atmega328.hex
atmega328o.bootloader.unlock_bits=0x3F
atmega328o.bootloader.lock_bits=0x0F
atmega328o.build.mcu=atmega328p
atmega328o.build.f_cpu=16000000L
atmega328o.build.core=arduino:arduino
atmega328o.build.variant=arduino:standard
$ gedit ~/.local/share/applications/arduino.desktop

Add file contents:

[Desktop Entry]
Name=Arduino
Comment="Arduino IDE 1.6.3"
Exec=arduino
Icon="/opt/arduino-1.6.3/lib/arduino_icon.ico"
Terminal=false
Type=Application
StartupNotify=true
$ sudo desktop-file-install ~/.local/share/applications/arduino.desktop
$ ln -s ~/.local/share/applications/arduino.desktop ~/Desktop/
 

Arduino Smart Window Sticker for vehicles - Part 4

As I've had my Smart Window Sticker around my desktop table for programming purposes for so long, it kind of became part of this environment and started to gain functions in it. At first, I implemented few features for testing matters, to validate my drawing functions, transitions effects and so on, but eventually it got really cool functions so I had no choice other than keeping it here. And that's how my Smart Window Sticker got transformed into my... LED matrix taskbar/display/helper/thing/whatever. Through PHP (command line script), I could integrate it with my working station and make it help me on my daily tasks and habits.

It can:

  • alert me whenever a new e-mail message arrives at my inbox;
  • show me the weather conditions and forecast whether it's going or not to rain at 6 o'clock PM (when I usually leave work - as I usually use my motorcycle for going to work, it's nice to know if I can leave earlier in order to avoid the rain) 
  • remind me to take coffee breaks (stop for a bit and rest)
  • inform whenever to have a quick lunch, like a fruit (nutritionists say we shouldn't stay over 3 hours without eating something)
  • make me drink water regularly

 

 

As can be checked at video above, I removed the Infra Red receiver and made a frame-box with a 3D printer for housing the circuits.

undefined

undefinedI chose to paint it black with tint spray. The PHP script makes use of World Weather Online®'s and Forecast.IO's API service for weather forecasting and a PowerShell script for perceiving e-mail reception at Outlook. I intend to create something for showing my football team's position/calendar at the national league and do something related to market interest rates, etc. I did implement a news feed reader, but reading something at it required took too much time/effort and the resulting experience wasn't good enough to keep it.

 

Source code:

Arduino Laser Spirograph

I believe I always wanted to build something with lasers, mainly because lasers are cool. It's like playing with fire: it's dangerous, but fun. As a kid, I had a stamp collection and won a magnifying glass to see and analyze my stamps. I think I only used it for putting things on fire.

Fundefinedew days ago I saw some cool projects (this one uses laser to put things on fire as well) using lasers and I got tempted to do something as well, since I already had a red laser diode in hands. When I realized how the laser Spirograph worked, I knew it would require very few components to build it and I also found the whole idea behind it very interesting (this illustration made by the Interactive Electronics Design is very explanatory). I'm not talking about the Spirograph itself, but the persistence of vision phenomenon, which allows us to draw things/lines/curves using a single dot of light and see it in a continuous form.

"The essence of the mini-laser Spirograph is two mirrors attached to small dc motors. A laser beam striking the rotating mirrors will produce a wide array of patterns. With one mirror rotating, the reflected beam “paints” an ellipse on a screen. When both mirrors are spinning, two elliptical patterns superimpose to produce more complex shapes. The pattern observed depends on the ratio of the speeds and direction of rotation of the mirrors." - as well stated by Chris Chiaverina here.

A friend of mine gave me a broken remote-controlled helicopter, from which I removed all (5!) DC motors (they are just like this). They don't have much torque, but they're very, very fast and very, very small.

People seem to always use potentiometers to control motor speed, but I wanted my Arduino to do all the job. So I started worrying about controlling a motor speed through the Arduino. I could had used a motor driver to do so, but I found an interesting article at Adafruit that described an inexpensive circuit to control it. So, following the tutorial, I built the circuit, tested it and approved it. Then I transferred the circuit into a PCB protoboard, duplicating it for controlling two motors instead.

I think the most difficult part of assembling the components was to adjust the mirrors in a way they would reflect the laser's projections properly. This was done using a trial and error approach. I used hot glue to fix cables and holders.


undefined

The schematic/wiring diagram is as shown below. Some people will notice upfront that the diagram is a little bit messed up. I was reluctant to publish a post with a "problematic" diagram, but since it is how it was truly done and I intent to improve it, I think it's okay. The problem is that, as I'm using the speed-controlling circuits in parallel under the same power supply (Arduino's 3.3V power pin), whenever I let too much current passes through one circuit, it drains out the current available to the other one, eventually collapsing Arduino, making it reboot. I know, terrible, but it can be easily fixed by adding a separated power supplier (probably I'll make another post whenever I get it done). After few tests I found out that, as far as I use speed values below 90 for both motors, it works fine the way it is now. 

undefined

 

Demo video:

Be aware of the potential hazards when working with lasers. Read this.

Home