Smart Response XE Re-purposed into Arduboy

(Larry Bank) #303

I have 46 “currently unassigned”. I’m working on some potential projects with clients where I might actually use them. I stuffed the IMU and RTC into one today for a new prototype device to be used “in the medical field”. The final device will probably be based on an nRF52 + IMU, but the XE presents a good opportunity to prototype my idea:

  1. Rugged case
  2. Long lasting power source
  3. Display
  4. Easy programming from the Arduino IDE

(serisman) #304

Makes me want to get a few more! :wink: I ‘only’ have 5 right now.

I agree… for the price this is a great hacking/learning/prototyping platform.

I do wish the LCD provided better contrast. Wonder how easy it would be to add a LED backlight?

(serisman) #305

Oops… I’m not sure what I will do with them all, but I just purchased another 31 units plus a receiver!

(Josh Goebel) #306

Just skimmed the code.

Impressive, but also super, super low level. I don’t think before I realized you were working at such a low level. The only real hardware assistance feature you’re using is the auto-CRC. I think I imagined you’d use a tiny IEEE 802.15.4 stack so as to take advantage of some of the extended operating mode stuff such as automatic ACK, re-transmission, collision avoidance - which I’d imagine makes the experience a lot smoother (and I think I suggested earlier).

I’m much less confused now - it’s much easier to believe it’d be difficult to build something reliable if you’re starting from ground zero and building the whole stack yourself.

Good job.

Really cool to know the chip lets you work at such a low-level.

(Larry Bank) #307

This is my basic “MO”. I get some display/sensor/MCU/etc, read the datasheet and write the code. I don’t want to rely on other people’s software, I want to learn by writing everything from the ground up. Once it’s functional and documented reasonably well, I release it on Github and move on to the next challenge.

P.S. It’s not that the chip “lets” you work at such a low level, it’s just that hardware will only get you so far in implementing a network stack/protocol. It’s very typical for network chips to provide the “MAC - Media access control” layer and software does the rest. ZigBee’s mesh network is pretty complicated to implement and would not be worth doing in hardware. My wireless implementation for this project was simplistic; I’m not an RF/network expert. I just wanted to get something working and not be too complicated. I sincerely hope that someone takes my code and improves it.

(Larry Bank) #308

I finally found some time to add my little CP2102 board to another XE. Came out pretty good and works great. Not pretty, but hot glue is easy.

New photo by Larry Bank


Looks good. I’m not sure if you know, but instead of looping that red wire on the right side from the IC pin to the pad, you can just link a small slither of wire across from the top left pad, to the top right pad (just below where it has the U6 printed) which would do the same thing.

(Larry Bank) #310

I know. It was easier to solder one end to the larger pad.

(Larry Bank) #311

I’ve been gifting some of my XE’s to engineering friends to ‘seed’ some new project ideas. It’s been kind of quiet in here lately; what’s everyone up to?

I also found a few of my “cheaper batch” of XE’s had battery acid in the battery compartment. Maybe I can use one of Dr. Cadic’s 3D printed cases to replace the back :wink:

(serisman) #312

Excellent! Keep us updated if they come up with any cool uses for the hardware.

Yeah, I have been focusing on other things for the last few days, although I did get my shipment of 31 units plus a receiver in yesterday.

I was messing around with the receiver last night and somehow broke the ATmega16U2 MCU. :frowning: For some reason I was not able to successfully communicate with it via the ISP header. It wouldn’t even read the signature right. At some point the MCU seems to have completely died and it no longer enumerates over USB. I pulled it off the board and wired it up on a test board, and still nothing. I double and triple checked my ISP header and tested it on a Arduino Uno R3 board, so I don’t think the issue is with my programmer. But, I was able to access the ATmega128RFA1 and re-program it via the other pads on the bottom. So, I need to either get a new ATmega16U2, or maybe just hack in a USB-to-serial adapter.

Yeah, this new set of 31 units all have battery acid in the compartment. Kind of annoying, but I got them for real cheap and they still seem functional. Just will take a lot of cleaning (or replace the back like you mentioned!)


Fuses might have been corrupted or something which would explain it not working over USB. You might need a high voltage isp flasher to bring it back.

(Larry Bank) #314

Same thing happened to me. I couldn’t get the 16u2 to work, so I just worked around it. I sliced off the USB cable since it was just getting in the way. The receiver unit has UART1 exposed near the lower left of the PCB. This allows it to work as an Arduino target from the IDE (with a modified bootloader).

(Larry Bank) #315

News - it appears that the Nordic nRF52 can send raw 802.15.4 packets. This potentially means that an inexpensive nRF52 chip can be used as the “hub” to send sketches wirelessly to a XE unit. I will probably be experimenting with this idea this weekend.

(serisman) #316

Yeah, I was thinking the same thing, although I’m not sure how they could have been corrupted. All I was trying to do was read the existing fuses. I did get the fuses to read successfully one time but I have no idea why it worked one time and not before or after. Now it doesn’t even respond anymore.

I have built a high voltage serial programmer in the past that was useful to recovere some ATtiny85 ICs with the RESET pin disabled, but I don’t yet have a high voltage parallel programmer. I may throw one together to see if I can recover the IC that way.

Interesting. I thought it was just me. That leads me to think that it isn’t worth trying to replace the ATmega16U2, and I should instead just throw a CH340G USB-to-serial module on there directly and call it a day. I am still really curious why it wasn’t working and how I made it so much worse by just trying to read the fuses through a pretty standard 3.3V ISP programmer.

Excellent! I haven’t messed around with nRF52 myself, but I am curious on your progress. Too bad we can’t use the super cheap nRF24L01+ modules.

(serisman) #317

What chip/module do you have in mind? I did a quick search and nRF52832 modules are fairly cheap (~$3-$5), but don’t specifically mention 802.15.4. The nRF52840 does mention support for 802.15.4, but the modules seem much more expensive ($20-$30). At that price, the CC2531 modules may be a better option.

(Larry Bank) #318

The nRF5 SDK documentation notes that the nRF52xxx chips support both bluetooth and 802.15.4 Thread/ZigBee and that raw PHY/MAC can be accessed. I have an Adafruit Bluefruit nRF52 board (pictured).
The adafruit board uses the nRF52832:

New photo by Larry Bank

(serisman) #319

That page seems to only reference the nRF52840.

The nRF52840 definitely seems to support 802.15.4. It is called out on the product page and specifications PDF.

I’m not so sure about the nRF5283 though. It is not called out as supported on the product page or specifications PDF.

Some other information online seems to indicate that the nRF52832’s radio only supports GFSK/FHSS, and 802.15.4 requires PSK/OQPSK/DSSS. This is also apparently one of the reasons the nRF24L01+ won’t work.

Hopefully I am wrong though.

(serisman) #320

This is from the ULP Product Selection Guide of the ULP Wireless Quarter magazine:

So unless, the 2.4GHz Proprietary is hiding some low level magic, it doesn’t look good for the nRF52832. :frowning:

(serisman) #321

I just picked one of these up for $6.52 (shipped).

If we can get a firmware for it created, this seems like the best option for a ‘hub’ that I have seen so far.

If not, it should still be useful as a 802.15.4 network sniffer.

(Larry Bank) #322

Thanks for getting that info. The CC2531 is a no go for me. Onerous software development environment (IAR $3000 + requires Windows + requires $50 adapter to talk to the JTAG of your board). The CC2xxxx chips are a very ugly hack of an ancient and free CPU (8051) with new junk latched on to operate as a modern MCU. There may be packet sniffing software for that board, but to modify for use as a hub would probably require you to dive into the TI pool and that’s too expensive for me.