Following on from seeing nearby nRF24’s on the nRF24 Multi-Network, we’ll now be adding the functionality of forwarding data to other nRFs so they can forward it on to the intended nRF if you can’t reach the other nRF directly. It would be interesting to have a couple nRF’s in a line so that each nRF can only see two others to see how it all performs. I’ve decided to increase the clock speed of the ATtiny to 8MHz to speed things up.
https://www.youtube.com/watch?v=Ht2Y5NRWQmQ
(The left nRF sends a packet to the middle nRF which forwards it to the right nRF and then it goes in the opposite direction)
For the code below – as part of reading packets and processing them, we check if the type is a forward or forward response and if the to address matches our address and it’s a forward, then we send an forward response back. Otherwise if we received the forward response and it was to our address then we’re done. Lastly if the from address doesn’t match our address (i.e we won’t respond to nRFs forwarding our packet back to us) and the TTL doesn’t equal 0, we decrement the TTL and re-forward the packet.
Since other nRFs will be transmitting too in our forwarding scenario, it’s best to wait a little while before re-transmitting so that we are less likely to interfere with other nRFs transmitting the same forward packet.
Today we’ll be taking a look at the Netgear ReadyNAS NV RND4410 NAS (version 1) which was released back in 2007, has 4 drive bays, front LCD, gigabit ethernet and 3 USB ports. This particular unit wouldn’t power on anymore.
Quite a bit of screws later and we’re in.
It’s a fairly modular design (I took the power supply out beforehand). We have the LCD connector running up to the top of the case, the memory module up top. The backplane has a standard ATX power connector has PCI connector to connect it to the main board; the main board can easily slide out.
I recently purchased one of those U-blox GPS modules from Ebay for $20 and after downloading the TinyGPS library for the Arduino, it works well once it has valid GPS data (I had to have mine close to the window) plus there’s an LED on the module itself which blinks every second to tell you this, it’s set to 1 PPS by default.
The GPS module outputs it’s data in NMEA format which starts off with a $ dollar sign, has commas in-between values and ends with a line break. At the moment I’m only interested in the longitude and latitude which is in the GPRMC line. My GPS gave 10 bytes for the latitude and 11 bytes for the longitude. If you were travelling all over the world, it’s important to note the N(and S) and W (and E) which indicate whether the number should be positive or negative relative to the equator and prime meridian respectively.
It’s time to compact the size from the Arduino to the ATtiny2313A as it has USART which we’ve used before for sending, receiving is very similar. All we have to do is connect the GPS’s TX to the ATtiny RX, just listen for incoming data, parse that and then I’m logging this to an I2C EEPROM. I’m using a 3.7V Li-poly to power it.
Just a quick post on oscillators – about every recent microcontroller out there has an oscillator circuit built in, so you just add a crystal with capacitors (sometimes optional) and the MCU does the rest. But what happens for devices that don’t have the oscillator circuit built in, such as a low end CPLD?
We have two choices – purchase a crystal oscillator or build one yourself. Seeing how I don’t have a crystal oscillator handy, I thought I’d build one.
The configuration I’ll be using is the pierce one, where you have a inverter, a large value resistor such as 1M and the crystal with two capacitors.
It’s time for a teardown, this time we have a Kodak EasyShare CX4200 2MP Digital Camera which was manufactured in 2002 so it’s now 11 years old!
A few screws later and we’re in.
We’ve got the top side which has the AA battery, flash and camera and bottom side which has a Casio LCD. It’s a two board construction with a small interface board just below the CCD.
Following on from Part 2, we added a rotary encoder and performed more testing in which we found that since we’re using an LDO (a type of linear regulator), that the mosfet is dissipating the voltage drop, something which I forgot about.
I checked out the LM2596 module again as I was testing designs of making a switch mode regulator like it. On closer examination of it, I found a feedback resistor which I didn’t notice before (next to the 10K por). When removing that resistor I found that re-adding the digital pot this time with a high side resistor of 4.4K allowed me to have a voltage range of 1.8V to 12V however it’s still the case when at the lower voltages it takes more turns of the encoder to increase the voltage, at the higher end the reverse happens but it’s still workable.
Another solution is to use the LM2596 as a pre-tracking regulator as someone mentioned in the comments, so it would absorb most of the voltage drop and then we’d have the mosfet with the op-amp as before – maybe I’ll implement this for the next version.
Following on from Part 1, we started to build ourselves a programmable power supply which is working but we’ll be adding more refinements such as adding LEDs for the buttons, using a rotary encoder instead of the voltage up/down button.
(update to SPPS)
The first thing we need to do is use LEDs for each programmable button instead of the 4th segment, we have 4 outputs left from our second shift register, so that’s where we’ll add these LEDs to. Now we can leave the first segment of the LED display blank if it’s under 10V and leave the dot point at the same place. I also moved the set button to be read by the ADC reading the programmable buttons. I’m considering moving to an ATtiny461 to give each button it’s own pin.
Next we’ll add in the rotary encoder, the way the rotary encoder works is when you rotate the knob it jumps to the next step and when doing so one output goes low before the second output. Rotary encoders can have a different amount of steps, I went with a 24 step one. We can also see the circuit to use above, just 2 resistors from VCC to terminal A and B.
I thought that it’s about time I purchased or made an easy to adjust power supply as all I have at the moment is the LM2596 power supply module from Ebay; one problem is that it’s hard to adjust the 10K pot as you need a screwdriver and another is that it’s not programmable.
(sneak peak)
I’ve chosen the build it yourself route as I don’t think I’ll need more than 1 amp of current. I could just use a computer power supply however I want it to be a bit smaller than that. Another feature I’d like is to be able to program voltages to different buttons.
First off, potentially we could adjust the LM2596 using a 10K digital pot however if you wanted voltages more than 5.5 volts then that won’t work out as the digital pot (MCP4017T) I’m using has a maximum voltage of 5.5 volts. If you wanted 0 to 5.5V this would work but I want up to 12V. You can buy digital pots with higher voltage range however they are like $9 each. A quick way around this is to use a resistor divider (like 330 ohm / 10K pot) and use that on the feedback loop however testing this only resulted in a minimum voltage of 2.6V. Depending on the first resistor, when adjusting the pot it lead to a high or low amount of voltage change (e.g 0-5K would only change 1V), so this won’t work out.
I happened to find a document on LDO Regulators and there was an circuit with a P Mosfet with an op-amp and the ability to set voltage reference – the op-amp is constantly adjusting the output compared to the feedback and voltage reference. I’d like a range of 1.8V to 12V, the op-amp should be able to handle that too – an LM358 should do the trick with its 36V max input voltage.
GBCartRead has been updated to v1.4 which now uses C instead of Python to communicate with the Arduino. It’s been a fair while since I last worked on it but I’ve been meaning to do this for at least a year. I found a simple to use RS232 serial library and it’s a bit quicker than the Python version.
A little while ago I saw one of mikeelectricstuff’s videos about interfacing with the iPod nano’s screen using a CPLD. A CPLD is a complex programmable logic device, it’s similar to an FPGA, has a bit less capacity but has its configuration file stored on chip where as the FPGA has its configuration on a memory chip and generally only uses 1 voltage rail.
So what can we use CPLDs for? We can use CPLDs for high speed devices such as an I/O expansion, interfacing with SDRAM, LCDs, combining lots of logic of various chips into one device and so on. An advantage over MCUs is that CPLDs can have multiple logic operations occurring in parallel however it should be noted that with some CPLDs you can only re-program them up to 100 times.
The CPLD we’ll be looking at is the Altera MAXII EPM240 which contains 192 macrocells (the more you have the more logic you can configure), 80 IO pins and can operate at 304 MHz at the highest speed grade. There are also lower macrocell/pin/cost versions of CPLDs too, the Max3000A EPM3064ALC44-10 (100MHz) has 64 macrocells with 34 user pins, is about $3 AUD. It’s in a PLCC package which allows you to use sockets if you don’t want to solder the TQFP package.
AdvanceVGA – Play your GBA on the big screen! Swap out the LCD for our board, solder some wires, connect 5V USB and VGA and you’re ready to go.
GBxCart RW allows you to backup GB/GBC/GBA ROMs, save or restore game saves and re-write supported flash carts. Mini RW option available for GB/GBC only.
Wireless Gameboy Controller – Use your Gameboy, mGB, GBC, GBA, GBA SP, GB Micro, NDS and NDS Lite as a wireless controller on Windows, Linux, Raspberry Pi, etc, and on your NES, SNES, N64, Gamecube and Wii.