A downside of the AT Mini Matrix Ctrl is that if you have your animation only playing a few times an hour that you are very likely to miss it. You could have it running every minute for a specific time but it’s not that great if no one is there to see it.
The solution to this is to use a PIR module (H8157 on Ebay) to detect if someone is around. The problem is that the PIR module is quite large compared to the led matrix so it would look out of place.
I started looking at IR transmitters/receivers and using them to reflect off a surface which would detect if someone was there however to have decent accuracy you really needed to use quite a bit of current which isn’t what I wanted. So back to square one, what can we do with the PIR module?
After researching the PIR sensors themselves, some datasheets (above is a random datasheet I found) said that they already had some noise reduction and some had application examples. The PIR sensors themselves can cost $2 or more even on Ebay which was odd as the PIR module was about $2 itself.
I’ve been meaning to play around with accelerometers and found the MMA7361 on Ebay for $3.
I checked if there was a MMA7361 library for the Arduino which there was so I tried it out but I kept receiving the same readings even if I disconnected the accelerometer from the Arduino – maybe I was doing something wrong. I briefly looked at the code and it seems they were doing a lot but the pin out of the MMA7361 made me believe it should be easy. Edit: I found there is a working example in Arduino > Sensors > ADXL3xx
I looked up the datasheet and found it’s pretty straight forward if you just want to read the x, y, z axis, a simple ADC reading of each pin should be all that we need. There is a sleep pin (SL) which puts it to sleep which makes it only draw 3uA. Some other pins include the 0g pin which goes high when all axis’s are at 0g, a self test pin (ST) and a g select pin (GS) that allows you to choose 1.5g or 6g sensitivity.
With some other accelerometers I believe you can have it pull a pin high if it detects movement but the one I got it doesn’t have that functionality – it would be very useful for battery powered designs. One thing to note is that 0g is about half of the VCC. The Z axis is only half VCC when the board vertical.
When I was placing an order for some parts I happened to find an I2C digital potentiometer (MCP4017T) on special at 4 cents each, so I bought some and now that I re-check the price they are 70 cents each.
The package it comes in is a SC70-6 which is even smaller than the ATtiny10 (side by side comparison above, ATtiny85 on the right too).
Digital potentiometers can be useful if you want to change your resistance without tweaking your pot with a screwdriver, the example which I’ll be showing is adjusting the contrast on an 16×2 LCD module, it can make your project be more professional if you had it all inside a case. Another use could be an op-amp with an adjustable gain.
There are different pot options you can go with – 5K, 10K, 50K or 100K, I went with the 10K version. With a 10K pot, you can adjust it from 0 ohms to 10K ohms in this case in 128 steps of 75 ohms.
It’s been nearly 2 years since I last worked on my Gameboy Cartridge Reader (GBCartRead) and I never released a PCB but it has been something I’ve been meaning to do for a while which I can now check off my list.
I received the PCBs for the Gameboy Cart Shield a few days ago, soldered all the components and noticed that somewhere along the lines I didn’t connect up the VCCs together so I have a bodge wire on the bottom of the board. Something I should have done was make the silkscreen text much larger than what it current is.
The ATtiny2313A/4313 features Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) with the features above. The Nokia F-bus uses 115,200 bps with 8 data bits, no parity bit and 1 stop bit.
To use USART we need a clock input, there are 3 clock options – Asynchronous Normal, Asynchronous Double and Synchronous Master. For Asynchronous, the clock is generated from the system oscillator where as the Synchronous option is where we provide an external clock signal input. Using the UBRR register we can dial into the baud rate that we want but it depends on the system oscillators frequency.
A few months ago I was looking into how to use Fbus with a Nokia phone but didn’t have much luck and instead just wired up the keypad. I decided to revisit Fbus and this time happened to find some AVR code which could send/receive SMS’s so now I’m able to send an SMS using the Arduino and I’ll explain how we do this.
Firstly you need a Nokia phone which the F-bus commands are known, the best documentation is available for the Nokia 6110 and derivatives (Nokia 6130, 6150, 6190, 5110, 5130, 5150, 5190, 3210, 3310) – this was found in \gnokii-0.6.31\Docs\protocol\nk6110.txt
I was able to purchase a Nokia 6150 from Ebay for under $20. You can search up the Nokia pinout for your mobile phone – I found the TX, RX and GND for my phone.
About a year ago I purchased an ATtiny10 with one of my orders but didn’t get to program it because I didn’t have a programmer and didn’t bother getting one. I was looking at Hackaday – it looks like someone wrote up with an ATtiny10 programmer using the Arduino! You program it by pasting the hex file into the serial window.
If you haven’t seen the ATtiny10 before it’s really small (above is a picture of it next to the ATtiny85) but has minimal features, program space, SRAM, registers and functions. It can run up to 12MHz, has 1KB space, 32bytes SRAM, no EEPROM and an 8-bit ADC.
The majority of users whom use the ATtiny10 seem to use assembly instead of C; some examples of ASM files can be seen on the link above. I wanted to use C on it, however WinAVR which uses avr-libc doesn’t support it so we’ll have to use AVR Studio.
So the Arduino software has been easy to use but I’m thinking about using V-USB in one of my projects. V-USB is an implementation of the USB protocol that can run on an Atmel AVR microcontroller but in order to integrate it into one of my projects it’s time to move away from the Arduino software.
I’ll show you how we can create our own version of the ATtiny45/85 Blink without the Arduino software. We will use setup/timer functions from the internal Arduino wiring.c file because it’s easier to use something that works.
But before we start with WinAVR we need a starting template, so what I did was download AVR Studio 5 Beta and start a new blank project. The reason I’m using Programmers Notepad instead of AVR Studio is that it’s a very simple interface and from my testing actually compresses things better when compiling.
So I’ve been able to read/write to a Gameboy cartridge so the next step is emulating one using an Arduino. I wasn’t be able to emulate the whole cartridge using my current methods but I did emulate the cartridge sending the Gameboy the Nintendo Logo. I’ll show you how we can analyse the data coming from the Gameboy and the various steps I went through to get it working.
Let’s jump to the Youtube video straight away to see the results.
The first thing required is a Gameboy that we can solder some wires to; the Gameboy that I took the cartridge header from was perfect for this and then just place those wires into a breadboard.
GBCartRead the Arduino based Gameboy Cart Reader project is now completed. I’ve done everything I set out in terms of saving and restoring my Gameboy saves . GBCartRead has been updated to version 1.3 which has all the features of reading the ROM, reading RAM and writing to RAM.
The video above shows all features being used.
Now I just need to think about what my next project will be… the logical thing would be do the same with the SNES or I was thinking of working more on the gameboy by emulating a gameboy cartridge with the Arduino