Posts with «arduino» label

Can Arduino shields be used on Picaxe

Hi,

I'm new to robotics, and just bought my first "LMR start here" robot kit. I haven"t recived it yet, but I am all ready having great plans about how to modify it (as I guess all newbies do).

So I have searched around to see what is out there, and I see that there are a lot of modules (or shields as they seems to be called in the robotics world) that can be conected stright to the Arduino.

So my question is, having just bought a Picaxe-28 Project Board, with a Picaxe-28X1 Microprocessor; can the Arduino shield be used with the Picaxe-28 Project Board?

read more

Let's Make Robots 14 Apr 03:43
arduino  picaxe  shield  

Need help with a steering algorithm...

 

This may be more of a general programming question than arduino specific; I guess the principles apply to all programming languages.

read more

New and Awesome on Make: Projects

Make: Projects navigation tip: You can sort the projects by Make (from the pages of MAKE and CRAFT magazines), and User (user-submitted).

Small Word Clock

This guide describes how to make your own word clock. There are lots of other word clock projects on the web, but this one is a bit smaller than most at only 6 inches by 6 inches.

Author: Robert Gill

Telephone and WLAN Router Cabinet

Hide your cable spaghetti and router behind this nice cabinet.

Author: luke

Mintronics: Menta

Build the Mintronics: Menta, the Arduino-compatible microcontroller that fits in a mint tin, complete with on-board prototyping area.

Author: Keith Hammond

4-Foot Wooden Digital Clock

Need to know what time it is, but don’t own a phone, computer, microwave, or any of the other 100 clocks you probably already have? How about a huge mahogany digital clock to prove your geek prowess?

Author: Wes


Programming an Arduino in C.

I know my new robot runs (and runs nicely) on a ZBasic chp, but I will always have a great fondness for the Arduino, the first microcontroller board I ever used. (I used the PICAXE for a while too.)

Right now I have been programming a Arduino Uno with C. I really like the MikroC AVR C from Mikroelectronika. I am using the free version (limited to like 4k, decent space for C programs!). The full version is kind of pricey.

I then use AVRdude (love that name) to send the resulting hex file to the Arduino non-volitile memory. Works great!

read more

Let's Make Robots 12 Apr 17:00
arduino  avr  c  compiler  programming  uno  zbasic  

WineShade: Hipster Stack-Powered Voting Gizmo for O’Reilly’s Strata Conference

I was asked to make something for the O’Reilly Strata Conference, which was held in Santa Clara at the end of February 2012. We needed some devices to capture vote from attendees who participated in Coco Krumme‘s Data Crush: Where Wine and Data Meet:

This new event at Strata will host wine tastings for participants, whose feedback data will be compiled and analyzed to extrapolate behavioral trends and factors influencing their responses.

I decided the best way to accomplish this was to shovel a bunch of new technologies into the project: MakerBot, XBee, Arduino, Node.js. I believe it was Alasdair Allan who dubbed this the hipster stack. I believe it was Alex Howard who dubbed it the WineShade. But between the wine and solder fumes, my memory is suspect!

MakerBot
If I’m going to make something physical, I knew my MakerBot Thing-O-Matic could make my life easier. At first, I thought I’d use the MakerBot to print out something to hold buttons and indicators in place, but I decided to go with some foam core for this. I had decided to use lampshades as the chassis for each station, and I needed something to cap it off. So I made a little tower to go on top of each one. I eventually went with something smaller than what you see here.

Arduino Mega
I knew I’d need a lot of I/O, since each station would have three bargraphs and three buttons (though we ended up using only two each). I didn’t want to put too many components into this since I’d need to build them, so I decided to drive the bargraphs directly from the Arduino pins. To minimize the number of transistors, I decided to take advantage of persistence of vision, and multiplex the bargraph. I wrote a small library for the Adafruit LED bar graphs to do this, and posted it to GitHub. I’m just using one color, but the library could easily be extended to handle both of the bar graph’s colors.

Digi’s XBee
These voting stations would be spread out all over the place, and needed a way to talk to a central server. I’ve had a lot of experience with Digi’s XBee modules, and I’ve always wanted to use the XBee Internet Gateway (XIG) in a project. XIG lives on a Digi ConnectPort X, and acts as a gateway between the XBee network and web servers (XIG can also talk to the IDigi cloud). I reached out to Rob Faludi, author of Building Wireless Sensor Networks, and he arranged to loan me a ConnectPort X2 Industrial and four XBee Pro modules. Thanks, Rob (and Digi)! I liked XIG so much that I bought a ConnectPort X2 Commercial (less RAM than the Industrial, but it works well for me).

Node.js
If I’m going to have the XBees talking to the network, they better have a server to talk to. I usually reach for PHP or Perl for this sort of thing, but I decided I’d heard enough about Node.js (Beagle Bone‘s adoption of it got me really interested in it) that I better look into it. It worked great. It would have taken me longer to write this in PHP (or any of my usual languages) than it did for me to learn Node.js and implement it. Once I got my head around the asynchronous insanity, I could add whatever feature struck my fancy in a matter of minutes (OK, so some features needed more minutes than others).

The trickiest part of building each unit was connecting the Arduino Mega to all the pins on the buttons and LED displays. I decided to take an Adafruit perma-proto breadboard, solder some long male pins to it, and shape them so they’d plug into the double row of headers on the Arduino Mega. It was a kind of makeshift Arduino Mega tail shield, but it works. I threaded each strand of ribbon cable into a breadboard hole and up before soldering it down, which gave me quite a bit of strain relief.

I’ve got some documentation in process in the form of a GitHub repository that includes the Arduino code. It’s a pretty simple system: when the Arduino boots up, it sends a URL over the serial port that the XBee’s connected to (you’ll want to modify the server string in the Arduino source), and XIG relays this to the server, and sends the response back to the Arduino over the XBee network. The server is a Node.js server that handles the requests from the Arduino: press a button, and a vote is registered. At each bootup (and after each button press), the Arduino gets the current vote tally from the Node server. That way, the Arduino doesn’t have to store any state at all! There’s also a primitive UI (/dash on the server) that lets you view the votes and manipulate them or reset them if needed. The index.js file lists all the handlers, and the corresponding handler code is in requestHandlers.js.

Flick set: WineShade for Strata
GitHub repo: bjepson/WineShade


MAKE » Arduino 10 Apr 23:30

Simple Simon

Primary image

What does it do?

Obstacle avoidance, education

I built this super basic robot as a start-here style bot for a presentation I'm doing in a few weeks. I wanted something I could demonstrate building in realtime to a group of boyscouts. Simon is built with an arduino, dfrobot protoshield, breadboard, 2 parallax continuous rotation servos, 2 solarbotics wheels, a caster and a digital ir sensor. The whole thing is built with double sided tape (fritz start-here bot style). I should be able to demonstrate assembling him and uploading his program in about 15 minutes during my presentation.

Cost to build

$80,00

Embedded video

Finished project

Complete

Number

Time to build

0.75 hours

Type

wheels

URL to more information

Weight

read more

Voice Pitch Shifting – Scrambler.

After I’ve made astonishing breakthrough in speed of the FFT algorithm based on RADIX-4 version, I decided to create a new project, which would take a full advantage of Radix-4 “rocket science” performance. Reviewing my “Voice Recognition” blog it looks logically to create just exactly opposite application – Voice Scrambler. To make it happened, I need FFT subroutine to be completed twice, in forward and reverse ( iFFT ) direction. Than simply manipulating individual frequencies (bins) position in the array, I could scramble a voice in well known old fashioned manner, inverting the spectrum of the human voice, making it sounds completely non intelligible (alien’s voice).  For Pitch Shifting, bins have to be “progressively” spaced between each other, driving timbre up on the scale. It is possible to lower a Pitch as well, shrinking and over-lap bins, but I made only up shifting part for now.

Making preliminary calculation, I get:   10.1 milliseconds x 2 / 256 samples = 78.9 microseconds / sample.  Or turning up side down,  12.67 kHz sampling frequency. It’s rough estimation, but regular “public phone quality” – 8 kHz sampling rate looks quite achievable.  Next, as always, if CPU is o’k, let check into memory management. Unfortunately, arduino Uno (2 kB) wouldn’t allow to use fft-256, because:  input buffer (256) + output (256) +  fft processing ( real + imaginary) (512), plus multiply by 2 (integer size, 1024 x 2 = 2048) would occupy all available 2 kB. So, I have to decrease fft size on one level down, to fft-128, or even two level down – make fft-64, from original fft-256 (presumably good quality, comparable with MP3 codec).  After completing a couple sketchy tests, fft-64 shows pure quality of speech and was rejected. Can’t say I did thoroughful  research on this matter, may be fft-64 could still be good in other circumstances or with musical material content instead of speech.

O’k, fft-128 – compromise version was selected by God. But my code, published in “RADIX-4″ blog hasn’t included RADIX-8 section, which is required when size of the array isn’t a power of 4. Nothing to do, the only way to bring  Scrambler project to life, is  to write a missing section of the RADIX-8 code… So I did. Timing measurements show, that Radix-4 with new patch is running even faster, than extrapolated from fft-256 down to fft-128 speed of RADIX-4 without it, measurements result: 4.2 milliseconds (compare to extrapolated 4.6 milliseconds). By the way, as I mention in other post about Split-Radix, if it would be my next adventure. It was, I have re-written from “Matters Computational” http://www.jjj.de/  Split-Radix C/C++ code in my tools-box now, which is to my surprise shows practically no difference in speed with Radix-4 algorithm, same  10.1 (fft-256) milliseconds execution time, and loosing ! competition giving 4.6 milliseconds (fft-128).

 
Other things to explain, as Pitch Shifting considered to be most complicated task even for monstrous DSP processors, I’ve skipped two important procedures: windowing on input samples and add-overlap on the output flow, just because no processor’s time left. Luckily, due speech’s spectrum concentration around most noticeable “middle” area, cutting off “windowing” is only slightly increases noise level. On the other hand, missing add-overlap procedure has greater negative impact on the voice quality,  ”robotize” it via parasitic amplitude modulation. When frequency bins re-mapped in the pull, running inverse iFFT doesn’t produce continuity  ”match” with previous block as it should, because input has no a continuity disruption between samples blocks (128 samples, ~16 milliseconds of voice frame).  Well, if I do everything right, there wouldn’t be any fun with arduino, would it be?  Btw, there are two outputs buffer in the software, especially to track this issue. I was thinking to implement some kind of distortion estimator based on this information. Meanwhile, one of them could be removed to save some memory for other part of the program.

Hardware.

Arduino has 10 bits ADC, this is why I decided to build a DAC for audio output based on PWM TIMER0 feature, 5 to 5 bits split equally between pin 5 and 6. One PWM pin could only play 7 bits sound (don’t forget sign bit), which is too low. Weighted 32R-R ladder potentially allows to increase PWM frequency up to 250 kHz or so, and simplify requirements for output filter design. Nevertheless, I left “default” 31 kHz settings for TIMER0, just in case I need more research with 16 bits output later on, All it would takes to switch on “full” 16 bits, just add one 256 k resistor and divide integer in  high and low byte.

Please, be advised, that included scrambler function was not fully tested, as I don’t have second arduino to do a decoding in real time-);  (Probably, I can record a scrambled sound and decode it in the second passage trough the system – things TO DO.)  The same time Pitch Shifting was successfully tested, as you can see in posted video clip. YouTube Video

Summary:

  • Sampling rate 8 kHz. (easily to adjust by TIMER2 variable.)
  • Output rate 8 kHz. (same as sampling, two processes are synchronous.)
  • Delay 16 milliseconds. (1 block, or two blocks 32 milliseconds.)
  • Input/Output resolution: 10 bits.

There are build-in command line interface:

  • if (incomingByte == ‘m’) { // FREE MEMORY BYTES
  • if (incomingByte == ‘x’) { // PRINT OUT INCOMING SAMPLING BUFFER
  • if (incomingByte == ‘s’) { // SWITCHES – SCRAMBLING ON / OFF
  • if (incomingByte == ‘y’) { // PRINT OUT OUTGOING  BUFFER
  • if (incomingByte == ‘f’) { // DATA AFTER FFT, FREQUENCIES BINS
  • if (incomingByte == ‘p’) { // DATA AFTER PITCH SHIFTING – SCRAMBLING
  • if ((incomingByte >= ’0′) && (incomingByte <= ’9′)) { // DIGITS  ”1″ to “9″ – REGULATE MAGNITUDE OF SHIFTING, “0″ – SPECTRUM INVERSION.

Link to download an Arduino sketch: Pitch Shifting – Scrambler 


Rocket Brand Studios Transmitter

Primary image

What does it do?

A transmitter kit for just about any robot project

 

Cost to build

Embedded video

Finished project

Complete

Number

Time to build

Type

URL to more information

Weight

read more

How-To: Build a Room-Sized Skill Crane

Becky covered the first prototype of Instructables user marc.cryan’s homemade claw picker game about this time last year, when it was still just a two-axis machine in a doorframe. Now, Marc has added a third dimension, expanded the crane’s envelope to cover an entire room, and upgraded the business end with a SparkFun robotic claw. A universal TV remote serves as controller, communicating by IR with Arduinos in each of the two big motor housings.

Build a big crane game

More:
Mindstorms skill crane


Maker Shed Exclusive: MintDuino Game Pack

The MintDuino Game Pack provides a fun and informative way to learn about the world of Arduino compatible microcontrollers. This exclusive Maker Shed kit combines the Mintronics: MintDuino, Mintronics: Survival Pack, and the MintDuino book to give you all the necessary parts and instructions to create your very own 2-player reaction game. Even if you’ve never dabbled in electronics have no idea how to program, the MintDuino Game Pack will give you a firm foundation with Arduino and the confidence and ability to create your very own projects!

Using book as your guide and the included components you will:

  • Build the Mintduino and see first hand the relationship between the wires, capacitors, resistors and integrated circuits that come together to create an Arduino compatible microcontroller.
  • Learn how how to create basic circuits and program your microcontroller to blink an LED.
  • Discover how to use of the random() function to blink the LED unpredictably.
  • Interact with your MintDuino by using buttons as inputs.
  • Combine your skills to build a two player reaction based game you can play with your friends!

Features